diff options
author | Billy Biggs <bbiggs> | 2005-10-04 18:57:13 +0000 |
---|---|---|
committer | Billy Biggs <bbiggs> | 2005-10-04 18:57:13 +0000 |
commit | 130113cb1d488c7fc8ae07924d6a4ae140ecaed0 (patch) | |
tree | 6cdb409ff9e60d4bb62afb11244553d5e8771f61 /bundles/org.eclipse.swt/Eclipse SWT PI/gtk | |
parent | 49d98795d960f9f50ead4c71d415d4ad029b63d9 (diff) | |
download | eclipse.platform.swt-130113cb1d488c7fc8ae07924d6a4ae140ecaed0.tar.gz eclipse.platform.swt-130113cb1d488c7fc8ae07924d6a4ae140ecaed0.tar.xz eclipse.platform.swt-130113cb1d488c7fc8ae07924d6a4ae140ecaed0.zip |
Build script improvements.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk')
3 files changed, 47 insertions, 82 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh index 708f4b052f..289669b9fa 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh @@ -14,18 +14,49 @@ cd `dirname $0` +if [ "${JAVA_HOME}" = "" ]; then + echo "Please set JAVA_HOME to point at a JRE." +fi if [ "${CC}" = "" ]; then CC=gcc + export CC fi +# Determine which OS we are on if [ "${OS}" = "" ]; then OS=`uname -s` fi +case $OS in + "SunOS") + SWT_OS=solaris + MAKEFILE=make_solaris.mak + ;; + *) + SWT_OS=`uname -s | tr -s '[:upper:]' '[:lower:]'` + MAKEFILE=make_linux.mak + ;; +esac + +# Determine which CPU type we are building for if [ "${MODEL}" = "" ]; then MODEL=`uname -p` fi +case $MODEL in + "x86_64") + SWT_ARCH=x86_64 + AWT_ARCH=amd64 + ;; + i?86) + SWT_ARCH=x86 + AWT_ARCH=i386 + ;; + *) + SWT_ARCH=$MODEL + AWT_ARCH=$MODEL + ;; +esac -# Fix the pointer size for AMD64 +# For 64-bit CPUs, we have a switch if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ppc64' -o ${MODEL} = 'ia64' ]; then SWT_PTR_CFLAGS=-DSWT_PTR_SIZE_64 export SWT_PTR_CFLAGS @@ -35,86 +66,20 @@ if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ppc64' -o ${MODEL} = 'ia64' ]; then fi fi -case $OS in - "Linux") - case $MODEL in - "x86_64") - if [ "${GECKO_SDK}" = "" ]; then - GECKO_SDK=/mozilla/mozilla/1.7/amd64/gtk2/mozilla/dist/sdk - GECKO_INCLUDES="-include ${GECKO_SDK}/include/mozilla-config.h -I${GECKO_SDK}/include" - GECKO_LIBS="-L${GECKO_SDK}/lib -L${GECKO_SDK}/bin -lembed_base_s -lxpcomglue_s -lxpcom -lnspr4 -lplds4 -lplc4" - fi - OUTPUT_DIR=../../../org.eclipse.swt.gtk.linux.x86_64 - makefile="make_linux.mak" - echo "Building Linux GTK AMD64 version of SWT" - ;; - i?86) - if [ "${GECKO_SDK}" = "" ]; then - GECKO_SDK=/mozilla/mozilla/1.4/linux_gtk2/mozilla/dist/sdk - GECKO_INCLUDES="-include ${GECKO_SDK}/mozilla-config.h -I${GECKO_SDK}/nspr/include -I${GECKO_SDK}/xpcom/include -I${GECKO_SDK}/string/include -I${GECKO_SDK}/embed_base/include -I${GECKO_SDK}/embedstring/include" - GECKO_LIBS="-L${GECKO_SDK}/embedstring/bin -lembedstring -L${GECKO_SDK}/embed_base/bin -lembed_base_s -L${GECKO_SDK}/xpcom/bin -lxpcomglue_s -lxpcom -L${GECKO_SDK}/nspr/bin -lnspr4 -lplds4 -lplc4" - fi - OUTPUT_DIR=../../../org.eclipse.swt.gtk.linux.x86 - makefile="make_linux.mak" - echo "Building Linux GTK x86 version of SWT" - ;; - "ppc") - OUTPUT_DIR=../../../org.eclipse.swt.gtk.linux.ppc - makefile="make_linux.mak" - echo "Building Linux GTK PowerPC 32 bit version of SWT" - ;; - "ppc64") - if [ "${JAVA_HOME}" = "" ]; then - echo "JAVA_HOME is missing. Build will probably fail." - fi - OUTPUT_DIR=../../../org.eclipse.swt.gtk.linux.ppc64 - makefile="make_linux.mak" - ;; - "ia64") - if [ "${JAVA_HOME}" = "" ]; then - echo "JAVA_HOME is missing. Build will probably fail." - fi - OUTPUT_DIR=../../../org.eclipse.swt.gtk.linux.ia64 - makefile="make_linux.mak" - ;; - *) - echo "*** Unknown MODEL <${MODEL}>" - ;; - esac - ;; - "SunOS") - if [ "${JAVA_HOME}" = "" ]; then - JAVA_HOME=/usr/j2se - fi - if [ "${CDE_HOME}" = "" ]; then - CDE_HOME=/usr/dt - fi - PATH=/usr/ccs/bin:/usr/local/bin:$PATH - export PATH - OUTPUT_DIR=../../../org.eclipse.swt.gtk.solaris.sparc - makefile="make_solaris.mak" - echo "Building Solaris GTK version of SWT" - ;; - *) - - echo "*** Unknown OS <${OS}>" - ;; -esac - # Find AWT if available -case $MODEL in - "x86_64") AWT_ARCH=amd64 ;; - i?86) AWT_ARCH=i386 ;; - *) AWT_ARCH=$MODEL ;; -esac -if [ -d ${JAVA_HOME}/jre/lib/${AWT_ARCH} ]; then - AWT_LIB_PATH=${JAVA_HOME}/jre/lib/${AWT_ARCH} - export AWT_LIB_PATH -else - AWT_LIB_PATH=${JAVA_HOME}/jre/bin - export AWT_LIB_PATH +if [ "${AWT_LIB_PATH}" = "" ]; then + if [ -d ${JAVA_HOME}/jre/lib/${AWT_ARCH} ]; then + AWT_LIB_PATH=${JAVA_HOME}/jre/lib/${AWT_ARCH} + export AWT_LIB_PATH + else + AWT_LIB_PATH=${JAVA_HOME}/jre/bin + export AWT_LIB_PATH + fi fi -export CC LD JAVA_HOME AWT_LIB_PATH GECKO_SDK GECKO_INCLUDES GECKO_LIBS CDE_HOME OUTPUT_DIR +# Announce our target +echo "Building SWT/GTK+ for $SWT_OS $SWT_ARCH" +OUTPUT_DIR=../../../org.eclipse.swt.gtk.${SWT_OS}.${SWT_ARCH} +export OUTPUT_DIR -make -f $makefile ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} +make -f $MAKEFILE ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak index aaa6db6919..506ea359c9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak @@ -55,7 +55,7 @@ GNOMECFLAGS = `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui- GNOMELIBS = `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2 GLXCFLAGS = -GLXLIBS = -shared -fpic -fPIC -L/usr/X11R6/lib -lGL -lGLU -lm +GLXLIBS = -shared -fPIC -L/usr/X11R6/lib -lGL -lGLU -lm # Uncomment for Native Stats tool #NATIVE_STATS = -DNATIVE_STATS diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_solaris.mak b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_solaris.mak index b9cd41520b..c7502c2dc4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_solaris.mak +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_solaris.mak @@ -55,7 +55,7 @@ GNOMECFLAGS = `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui- GNOMELIBS = `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2 GLXCFLAGS = -GLXLIBS = -shared -fpic -fPIC -L/usr/X11R6/lib -lGL -lGLU -lm +GLXLIBS = -shared -fPIC -L/usr/X11R6/lib -lGL -lGLU -lm # Uncomment for Native Stats tool #NATIVE_STATS = -DNATIVE_STATS |