summaryrefslogtreecommitdiffstats
path: root/java/eclipse/files/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'java/eclipse/files/Makefile')
-rw-r--r--java/eclipse/files/Makefile134
1 files changed, 46 insertions, 88 deletions
diff --git a/java/eclipse/files/Makefile b/java/eclipse/files/Makefile
index 3a7d02d..6e7eba9 100644
--- a/java/eclipse/files/Makefile
+++ b/java/eclipse/files/Makefile
@@ -3,127 +3,85 @@
ECHO= /bin/echo
FIND= /usr/bin/find
MKDIR= /bin/mkdir -p
-SED= sed
-ANT= ant -Dos=$(ECLIPSE_OS) -Dws=$(ECLIPSE_WS)
+SED= /usr/bin/sed
+CP= /bin/cp
+CSH= /bin/csh
+SH= /bin/sh
+GMAKE= $(LOCALBASE)/bin/gmake
+ANT= $(LOCALBASE)/bin/ant
+UNZIP_CMD= $(LOCALBASE)/bin/unzip
PORTDESTDIR= $(PREFIX)/eclipse
CFLAGS+= -I$(JAVA_HOME)/include \
- -I$(JAVA_HOME)/include/bsd \
- -I$(JAVA_HOME)/include/freebsd
+ -I$(JAVA_HOME)/include/bsd \
+ -I$(JAVA_HOME)/include/freebsd
LIBUPDATE= libupdate.so
LIBUPDATE_DST= plugins/org.eclipse.update.core.freebsd/os/freebsd/x86
LIBUPDATE_SRC= plugins/org.eclipse.update.core.freebsd/src
-
+
SWT_VERSION= $(ECLIPSE_BUILD)
-LIBSWT= libswt-gtk-$(SWT_VERSION).so
-LIBSWTPI= libswt-pi-gtk-$(SWT_VERSION).so
-LIBSWT_DST= plugins/org.eclipse.swt.gtk/os/freebsd/x86
-LIBSWT_SRC= plugins/org.eclipse.swt/Eclipse_SWT
-
+LIBSWT= libswt-$(ECLIPSE_WS)-$(SWT_VERSION).so
+LIBSWTPI= libswt-pi-$(ECLIPSE_WS)-$(SWT_VERSION).so
+LIBSWT_DST= plugins/org.eclipse.swt.$(ECLIPSE_WS)/os/freebsd/x86
+LIBSWT_SRC= plugins/org.eclipse.swt/Eclipse_SWT
+
LAUNCHER= eclipse
-LAUNCHER_DST= plugins/platform-launcher/bin/freebsd/gtk
-LAUNCHER_SRC= plugins/platform-launcher/library/gtk
+LAUNCHER_DST= plugins/platform-launcher/bin/freebsd/$(ECLIPSE_WS)
+LAUNCHER_SRC= plugins/platform-launcher/library/$(ECLIPSE_WS)
LAUNCHER_SRCS= $(LAUNCHER_SRC)/../eclipse.c \
$(LAUNCHER_SRC)/../eclipseUtil.c \
+ $(LAUNCHER_SRC)/../eclipseShm.c \
$(LAUNCHER_SRC)/eclipseGtk.c
LAUNCHER_OBJS= $(LAUNCHER_SRCS:S/.c/.o/g)
-LAUNCHER_CFLAGS= -s \
- -DPROGRAM_NAME="\"$(LAUNCHER)\"" \
- -DDEFAULT_OS="\"$(ECLIPSE_OS)\"" \
- -DDEFAULT_OS_ARCH="\"$(ECLIPSE_ARCH)\"" \
- -DDEFAULT_WS="\"$(ECLIPSE_WS)\"" \
- -I$(LAUNCHER_SRC) \
- -I$(LAUNCHER_SRC)/.. \
- `pkg-config --cflags gtk+-2.0`
-LAUNCHER_LIBS= `pkg-config --libs gtk+-2.0`
-
-ECLIPSE_TOPLEVEL_FILES= \
- startup.jar splash.bmp cpl-v10.html \
- install.ini notice.html .eclipseproduct
-
-all: binaries java
-
-binaries: libupdate libswt launcher
-
-libupdate: $(LIBUPDATE_DST)/$(LIBUPDATE)
-
-$(LIBUPDATE_DST)/$(LIBUPDATE): $(LIBUPDATE_SRC)/update.cpp
- @$(ECHO) "===> Building $(LIBUPDATE)."
- $(MKDIR) $(LIBUPDATE_DST)
- $(CXX) $(CFLAGS) -shared -fpic -fPIC -I$(LIBUPDATE_SRC) -o $(.TARGET) $(.ALLSRC)
-
-libswt: $(LIBSWT_DST)/$(LIBSWTPI) $(LIBSWT_DST)/$(LIBSWT)
-
-$(LIBSWT_DST)/$(LIBSWT): $(LIBSWT_SRC)/callback.o
- @$(ECHO) "===> Linking $(LIBSWT)."
- $(MKDIR) $(LIBSWT_DST)
- $(CC) -shared -Wl,-x -o $(.TARGET) $(.ALLSRC)
+all: binaries java
-$(LIBSWT_DST)/$(LIBSWTPI): $(LIBSWT_SRC)/structs.o $(LIBSWT_SRC)/swt.o
- @$(ECHO) "===> Linking $(LIBSWTPI)."
- $(MKDIR) $(LIBSWT_DST)
- $(CC) -shared -Wl,-x -o $(.TARGET) $(.ALLSRC) \
- `pkg-config --libs gthread-2.0` \
- `pkg-config --libs gtk+-2.0`
+binaries: libswt launcher libupdate
-.for i in callback.c structs.c swt.c
-$(LIBSWT_SRC)/${i:R:S/$/.o/g}: $(LIBSWT_SRC)/$i
- @$(ECHO) "===> Compiling $i."
- $(CC) $(CFLAGS) -c -s -fpic -fPIC -o $(.TARGET) $(.ALLSRC) \
- `pkg-config --cflags gthread-2.0` \
- `pkg-config --cflags gtk+-2.0`
-.endfor
+libswt:
+ @$(ECHO) "===> Building libswt."
+ cd "plugins/org.eclipse.swt/Eclipse SWT PI/$(ECLIPSE_WS)/library" && \
+ $(SH) ./build.sh && \
+ $(CP) *.so ../../../../org.eclipse.swt.$(ECLIPSE_WS)/os/freebsd/x86/
-launcher: $(LAUNCHER_DST)/$(LAUNCHER)
+launcher:
+ @$(ECHO) "===> Building Eclipse launcher."
+ cd plugins/platform-launcher/library/$(ECLIPSE_WS) && \
+ $(CSH) build.csh -os freebsd && \
+ $(CP) eclipse ../../bin/freebsd/$(ECLIPSE_WS)/eclipse
-.for i in $(LAUNCHER_SRCS)
-${i:R:S/$/.o/g}: $i
- @$(ECHO) "===> Compiling $i."
- $(CC) -c $(CFLAGS) $(LAUNCHER_CFLAGS) -o $(.TARGET) $(.ALLSRC)
-.endfor
+libupdate:
+ @$(ECHO) "===> Building libupdate."
+ cd plugins/org.eclipse.update.core.freebsd/src && \
+ $(ANT) -Djava.home=$(JAVA_HOME)
+ @$(ECHO) "===> Building libcore."
+ cd plugins/org.eclipse.core.resources.freebsd/src && \
+ env JDK_INCLUDE="/usr/local/jdk1.4.2/include -I/usr/local/jdk1.4.2/include/freebsd" $(GMAKE) && \
+ $(CP) *.so ../../org.eclipse.core.resources.freebsd/os/freebsd/x86
-$(LAUNCHER_DST)/$(LAUNCHER):: $(LAUNCHER_OBJS)
- @$(ECHO) "===> Linking $(LAUNCHER)."
- $(MKDIR) $(LAUNCHER_DST)
- $(CXX) -o $(.TARGET) $(.ALLSRC) $(LAUNCHER_LIBS)
-
-java: build-java build-doc build-install
-
-build-java:
- @$(ECHO) "===> Compiling Java sources."
- $(ANT) -f build.xml compile
-
-build-doc:
- @$(ECHO) "===> Building Javadoc."
- $(ANT) -f build.xml init buildDoc
+java: build-install
build-install:
- $(ANT) -f build.xml install gatherFeatureBinaries gatherFeatureSources
+ @$(ECHO) "===> Building Eclipse platform."
+ ./build -os $(ECLIPSE_OS) -ws $(ECLIPSE_WS) -arch $(ECLIPSE_ARCH)
install:
- @$(ECHO) "===> Creating destination directory..."
+ @$(ECHO) "===> Installing Eclipse platform."
@$(MKDIR) $(PORTDESTDIR)
+ $(UNZIP_CMD) result/$(ECLIPSE_OS)-$(ECLIPSE_WS)-$(ECLIPSE_ARCH)-sdk.zip -d $(PREFIX)
@$(ECHO) "===> Installing a shell script..."
@$(SED) \
-e "/%%ECLIPSE_HOME%%/s//$(PORTDESTDIR:S/\//\\\//g)/g" \
-e "/%%JAVA_HOME%%/s//$(JAVA_HOME:S/\//\\\//g)/g" \
- eclipse.in > eclipse.tmp
+ eclipse.in > eclipse.tmp
$(BSD_INSTALL_SCRIPT) eclipse.tmp $(PREFIX)/bin/eclipse
- @$(ECHO) "===> Installing Eclipse platform."
- @$(MKDIR) $(PORTDESTDIR)
- $(BSD_INSTALL_PROGRAM) $(LAUNCHER_DST)/$(LAUNCHER) $(PORTDESTDIR)
-.for i in $(ECLIPSE_TOPLEVEL_FILES)
- $(BSD_INSTALL_DATA) plugins/org.eclipse.platform/$i $(PORTDESTDIR)
-.endfor
- @$(FIND) features -name *.zip -exec unzip -o {} -d $(PORTDESTDIR) \;
clean:
- rm -rf $(LIBUPDATE_DST)/$(LIBUPDATE)
+ ./build -os $(ECLIPSE_OS) -ws $(ECLIPSE_WS) -arch $(ECLIPSE_ARCH) clean
rm -rf $(LIBSWT_DST)/$(LIBSWTPI) $(LIBSWT_DST)/$(LIBSWT)
rm -rf $(LAUNCHER_DST)/$(LAUNCHER)
- rm -rf $(LAUNCHER_OBJS)
rm -rf $(LIBSWT_SRC)/*.o $(LAUNCHER_OBJS)
+ rm -rf $(LIBUPDATE_DST)/$(LIBUPDATE)
OpenPOWER on IntegriCloud