aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-01-22 19:42:23 +0100
committerSven Gothel <[email protected]>2012-01-22 19:42:23 +0100
commitd19cd1049d55f93580c37f6a9599f7583e160258 (patch)
tree9c53ac69137744222bc2883c220595eedf0fda49 /make
parent4635eb9f78456f14376ae524c8aee74019f770c5 (diff)
Fix Bug 516 (Determine Java Version) / Fix OS X 10.5 linkage (weak framework, NEWT)
- Fix Bug 516 (Determine Java Version). See gluegen: 64639b805a32338385421f168e12c1ef7f749d00 - Fix OS X 10.5 linkage (weak framework, NEWT) - Use weak framework linkage for all modules and frameworks: AppKit, QuartzCore, Cocoa, OpenGL, JavaNativeFoundation - NEWT: Handle NS exception while calling OS X >= 10.6 only methods: - 'setAllowsConcurrentViewDrawing()' - 'setCanDrawConcurrently()'
Diffstat (limited to 'make')
-rw-r--r--make/build-common.xml13
-rw-r--r--make/build-jogl.xml60
-rw-r--r--make/build-nativewindow.xml11
-rw-r--r--make/build-newt.xml9
-rw-r--r--make/build-staticglgen.xml10
-rw-r--r--make/build-test.xml6
-rw-r--r--make/build.xml12
-rwxr-xr-xmake/scripts/make.jogl.all.linux-x86_64.sh8
-rwxr-xr-xmake/scripts/make.jogl.all.macosx.sh8
9 files changed, 98 insertions, 39 deletions
diff --git a/make/build-common.xml b/make/build-common.xml
index a7fef8ba6..b1e5159af 100644
--- a/make/build-common.xml
+++ b/make/build-common.xml
@@ -192,18 +192,9 @@
</condition>
<echo message="isSWTRuntimeAvailable=${isSWTRuntimeAvailable}" />
- <property name="target.sourcelevel" value="1.5" />
- <property name="host.sourcelevel" value="1.5" />
-
<!-- property name="javadoc.link" value="http://java.sun.com/j2se/1.4.2/docs/api/" /-->
- <property name="javadoc.link" value="http://download.oracle.com/javase/1.5.0/docs/api/" />
-
- <!-- NOTE: the value of the debug and optimise attributes will not be overridden if already set externally -->
- <property name="javacdebug" value="true" />
- <property name="javacdebuglevel" value="source,lines" />
- <!--property name="javacdebuglevel" value="source,lines,vars" /-->
- <!-- property name="javac.memorymax" value="128m" /--> <!-- I ran out of memory with these .. linux x86_64 6u14 -->
- <property name="javac.memorymax" value="512m" />
+ <!-- property name="javadoc.link" value="http://download.oracle.com/javase/1.5.0/docs/api/" /-->
+ <property name="javadoc.link" value="http://docs.oracle.com/javase/6/docs/api/" />
<!-- Names of directories relative to the project root.
Some of these are used in FileMappers later for dependence information
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index a4edec582..ef2ca4820 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -83,10 +83,13 @@
<echo message="setup.addNativeNVidiaCG: ${setup.addNativeNVidiaCG}" />
<property name="java.part.gluegen-gl"
- value="com/jogamp/gluegen/opengl/** com/jogamp/gluegen/runtime/opengl/*"/>
+ value="com/jogamp/gluegen/opengl/**"/>
+
+ <property name="java.part.gluegen-gl-rt"
+ value="com/jogamp/gluegen/runtime/opengl/*"/>
<property name="java.part.core"
- value="javax/media/opengl/* javax/media/opengl/fixedfunc/* javax/media/opengl/glu/* javax/media/opengl/glu/gl2es1/* com/jogamp/gluegen/runtime/opengl/* com/jogamp/opengl/* jogamp/opengl/* jogamp/opengl/glu/* jogamp/opengl/glu/error/*"/>
+ value="${java.part.gluegen-gl-rt} javax/media/opengl/* javax/media/opengl/fixedfunc/* javax/media/opengl/glu/* javax/media/opengl/glu/gl2es1/* com/jogamp/opengl/* jogamp/opengl/* jogamp/opengl/glu/* jogamp/opengl/glu/error/*"/>
<property name="java.part.core.exclude" value="javax/media/opengl/Debug* javax/media/opengl/Trace*"/>
<property name="java.part.nv-cg"
@@ -688,18 +691,34 @@
-->
<target name="build.gluegen-gl.jar" depends="init, common.gluegen.build, setup-manifestfile">
<javac destdir="${classes}"
- includes="${java.part.gluegen-gl}"
+ includes="${java.part.gluegen-gl-rt}"
fork="yes"
+ includeAntRuntime="true"
memoryMaximumSize="${javac.memorymax}"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}"
+ debug="${javacdebug}" debuglevel="${javacdebuglevel}">
+ <classpath refid="gluegen-gl.classpath"/>
+ <src path="${src.java}" />
+ </javac>
+
+ <javac destdir="${classes}"
+ includes="${java.part.gluegen-gl}"
+ fork="yes"
includeAntRuntime="true"
- source="${target.sourcelevel}" debug="${javacdebug}" debuglevel="${javacdebuglevel}">
+ memoryMaximumSize="${javac.memorymax}"
+ source="${host.sourcelevel}"
+ target="${host.targetlevel}"
+ bootclasspath="${host.rt.jar}"
+ debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="gluegen-gl.classpath"/>
<src path="${src.java}" />
</javac>
<jar manifest="${build.jogl}/manifest.mf" destfile="${gluegen-gl.jar}" filesonly="true">
<fileset dir="${classes}"
- includes="${java.part.gluegen-gl}"/>
+ includes="${java.part.gluegen-gl-rt} ${java.part.gluegen-gl}"/>
</jar>
</target>
@@ -996,9 +1015,12 @@
<javac destdir="${classes}"
includes="javax/media/opengl/fixedfunc/** javax/media/opengl/GLDrawableFactory.java javax/media/opengl/GLDrawable.java javax/media/opengl/GLContext.java javax/media/opengl/GL.java javax/media/opengl/GL2ES1.java javax/media/opengl/GL2ES2.java javax/media/opengl/GL2GL3.java javax/media/opengl/GL2.java javax/media/opengl/GLES1.java javax/media/opengl/GLES2.java javax/media/opengl/GL3.java javax/media/opengl/GL3bc.java javax/media/opengl/GL4.java javax/media/opengl/GL4bc.java"
fork="yes"
- memoryMaximumSize="${javac.memorymax}"
includeAntRuntime="false"
- source="${target.sourcelevel}" debug="${javacdebug}" debuglevel="${javacdebuglevel}">
+ memoryMaximumSize="${javac.memorymax}"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}"
+ debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="nativewindow_gluegen.classpath"/>
<src path="${src.java}" />
<src path="${src.generated.java}" />
@@ -1009,10 +1031,12 @@
<!-- Perform the second pass Java compile; everything except portion of fixed function emulation depending on generated code. -->
<javac destdir="${classes}"
excludes="com/jogamp/opengl/util/glsl/fixedfunc/FixedFuncUtil.java,${java.excludes.all}"
- source="${target.sourcelevel}"
fork="yes"
- memoryMaximumSize="${javac.memorymax}"
includeAntRuntime="false"
+ memoryMaximumSize="${javac.memorymax}"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="nativewindow_gluegen.classpath"/>
<src path="${src.java}" />
@@ -1026,10 +1050,12 @@
<!-- Perform the third pass Java compile; everything including fixed function emulation. -->
<javac destdir="${classes}"
excludes="${java.excludes.all}"
- source="${target.sourcelevel}"
fork="yes"
- memoryMaximumSize="${javac.memorymax}"
includeAntRuntime="false"
+ memoryMaximumSize="${javac.memorymax}"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="nativewindow_gluegen.classpath"/>
<src path="${src.java}" />
@@ -1130,6 +1156,8 @@
<linker id="linker.cfg.macosx.jogl" extends="linker.cfg.macosx">
<linkerarg value="-weak_framework" />
+ <linkerarg value="AppKit" />
+ <linkerarg value="-weak_framework" />
<linkerarg value="QuartzCore" />
<linkerarg value="-weak_framework" />
<linkerarg value="Cocoa" />
@@ -1138,7 +1166,7 @@
</linker>
<!--linker id="linker.cfg.macosx.jogl.cg" extends="linker.cfg.macosx.jogl">
- <linkerarg value="-framework"/>
+ <linkerarg value="-weak_framework"/>
<linkerarg value="Cg"/>
</linker-->
@@ -1638,9 +1666,9 @@
destdir="${javadoc}" windowtitle="${javadoc.windowtitle}"
overview="${javadoc.overview}"
source="${target.sourcelevel}"
- maxmemory="512m"
+ maxmemory="${javac.memorymax}"
linkoffline="${javadoc.link} 142-packages"
- bottom="${javadoc.bottom}" >
+ bottom="${javadoc.bottom}" >
<classpath refid="nativewindow_gluegen.classpath"/>
<taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" />
</javadoc>
@@ -1653,7 +1681,7 @@
destdir="${javadoc.spec}" windowtitle="${javadoc.windowtitle}"
overview="${javadoc.overview}"
source="${target.sourcelevel}"
- maxmemory="512m"
+ maxmemory="${javac.memorymax}"
linkoffline="${javadoc.link} 142-packages"
bottom="${javadoc.bottom}" >
<classpath refid="nativewindow_gluegen.classpath"/>
@@ -1668,7 +1696,7 @@
destdir="${javadoc.dev}" windowtitle="${javadoc.windowtitle}"
overview="${javadoc.overview}"
source="${target.sourcelevel}"
- maxmemory="512m"
+ maxmemory="${javac.memorymax}"
linkoffline="${javadoc.link} 142-packages"
bottom="${javadoc.bottom}" >
<classpath refid="nativewindow_gluegen.classpath"/>
diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml
index 1b28a5d92..336ab0277 100644
--- a/make/build-nativewindow.xml
+++ b/make/build-nativewindow.xml
@@ -315,10 +315,12 @@
<!-- Perform the second pass Java compile; everything. -->
<javac destdir="${classes}"
excludes="${java.excludes.all}"
- source="${target.sourcelevel}"
fork="yes"
includeAntRuntime="false"
memoryMaximumSize="${javac.memorymax}"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="swt_gluegen.classpath"/>
<src path="${src.java}" />
@@ -453,10 +455,12 @@
<linker id="linker.cfg.macosx.nativewindow" extends="linker.cfg.macosx">
<linkerarg value="-weak_framework" />
+ <linkerarg value="AppKit" />
+ <linkerarg value="-weak_framework" />
<linkerarg value="QuartzCore" />
<linkerarg value="-weak_framework" />
<linkerarg value="Cocoa" />
- <linkerarg value="-framework" />
+ <linkerarg value="-weak_framework" />
<linkerarg value="JavaNativeFoundation" />
<linkerarg value="-F${java.osx.frameworks.dir}" />
</linker>
@@ -886,6 +890,7 @@
destdir="${javadoc}" windowtitle="${javadoc.windowtitle}"
overview="${javadoc.overview}"
source="${target.sourcelevel}"
+ maxmemory="${javac.memorymax}"
linkoffline="${javadoc.link} 142-packages"
bottom="${javadoc.bottom}" >
</javadoc>
@@ -900,6 +905,7 @@
destdir="${javadoc.spec}" windowtitle="${javadoc.windowtitle}"
overview="${javadoc.overview}"
source="${target.sourcelevel}"
+ maxmemory="${javac.memorymax}"
linkoffline="${javadoc.link} 142-packages"
bottom="${javadoc.bottom}" >
</javadoc>
@@ -914,6 +920,7 @@
destdir="${javadoc.dev}" windowtitle="${javadoc.windowtitle}"
overview="${javadoc.overview}"
source="${target.sourcelevel}"
+ maxmemory="${javac.memorymax}"
linkoffline="${javadoc.link} 142-packages"
bottom="${javadoc.bottom}" >
</javadoc>
diff --git a/make/build-newt.xml b/make/build-newt.xml
index c812d98f3..34ea50e6b 100644
--- a/make/build-newt.xml
+++ b/make/build-newt.xml
@@ -206,10 +206,12 @@
<!-- Perform the second pass Java compile; everything. -->
<javac destdir="${classes}"
excludes="${java.excludes.all}"
- source="${target.sourcelevel}"
fork="yes"
includeAntRuntime="false"
memoryMaximumSize="${javac.memorymax}"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<src path="${src.java}" />
<classpath refid="jogl_nativewindow_gluegen.classpath"/>
@@ -312,6 +314,8 @@
<linker id="linker.cfg.macosx.newt" extends="linker.cfg.macosx">
<linkerarg value="-weak_framework" />
+ <linkerarg value="AppKit" />
+ <linkerarg value="-weak_framework" />
<linkerarg value="Cocoa" />
</linker>
@@ -763,6 +767,7 @@
destdir="${javadoc}" windowtitle="${javadoc.windowtitle}"
overview="${javadoc.overview}"
source="${target.sourcelevel}"
+ maxmemory="${javac.memorymax}"
linkoffline="${javadoc.link} 142-packages"
bottom="${javadoc.bottom}" >
<classpath refid="jogl_nativewindow_gluegen.classpath"/>
@@ -777,6 +782,7 @@
destdir="${javadoc.spec}" windowtitle="${javadoc.windowtitle}"
overview="${javadoc.overview}"
source="${target.sourcelevel}"
+ maxmemory="${javac.memorymax}"
linkoffline="${javadoc.link} 142-packages"
bottom="${javadoc.bottom}" >
<classpath refid="jogl_nativewindow_gluegen.classpath"/>
@@ -791,6 +797,7 @@
destdir="${javadoc.dev}" windowtitle="${javadoc.windowtitle}"
overview="${javadoc.overview}"
source="${target.sourcelevel}"
+ maxmemory="${javac.memorymax}"
linkoffline="${javadoc.link} 142-packages"
bottom="${javadoc.bottom}" >
<classpath refid="jogl_nativewindow_gluegen.classpath"/>
diff --git a/make/build-staticglgen.xml b/make/build-staticglgen.xml
index 325b737bb..ea19bc6d2 100644
--- a/make/build-staticglgen.xml
+++ b/make/build-staticglgen.xml
@@ -30,7 +30,11 @@
<!-- Compile BuildStaticGLInfo -->
<javac srcdir="${src.java}" destdir="${classes}" includes="**/BuildStaticGLInfo.java" source="${target.sourcelevel}" debug="true" debuglevel="${javacdebuglevel}"
- includeAntRuntime="false">
+ includeAntRuntime="false"
+ memoryMaximumSize="${javac.memorymax}"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}">
<classpath refid="antlr.classpath" />
</javac>
@@ -51,7 +55,9 @@
- NOTE: ONLY the StaticGLGen is built at this time. BuildStaticGLInfo
- itself is built in a separate task. -->
<javac destdir="${classes}" includes="**/StaticGLGenTask.java" source="${target.sourcelevel}" debug="true" debuglevel="${javacdebuglevel}"
- includeAntRuntime="false">
+ includeAntRuntime="true"
+ memoryMaximumSize="${javac.memorymax}"
+ source="1.6">
<src path="${src.java}" />
<classpath refid="classpath" />
</javac>
diff --git a/make/build-test.xml b/make/build-test.xml
index 0f176de92..1462289ea 100644
--- a/make/build-test.xml
+++ b/make/build-test.xml
@@ -72,10 +72,12 @@
<target name="test.compile" depends="test.compile.check" unless="test.compile.skip">
<!-- Perform the junit pass Java compile -->
<javac destdir="${classes}"
- source="${host.sourcelevel}"
fork="yes"
- memoryMaximumSize="${javac.memorymax}"
includeAntRuntime="false"
+ memoryMaximumSize="${javac.memorymax}"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="junit_jogl_newt_android.compile.classpath"/>
<src path="${src.test}" />
diff --git a/make/build.xml b/make/build.xml
index 791e69aed..8d6d459b5 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -195,10 +195,12 @@
<mkdir dir="${build}/android/lib" />
<javac destdir="${build}/android/classes"
includes="com/jogamp/android/launcher/**"
- source="${target.sourcelevel}"
fork="yes"
includeAntRuntime="false"
memoryMaximumSize="${javac.memorymax}"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<src path="${project.root}/src/android" />
<classpath location="${android.jar}"/>
@@ -418,7 +420,7 @@
overview="${javadoc.overview}"
access="public"
source="${target.sourcelevel}"
- maxmemory="1024m"
+ maxmemory="${javac.memorymax}"
bottom="${javadoc.bottom}" >
<classpath refid="jogl_all.classpath"/>
<link offline="true" href="${javadoc.link}" packagelistLoc="${gluegen.root}/make/142-packages" />
@@ -439,7 +441,7 @@
overview="${javadoc.overview}"
access="public"
source="${target.sourcelevel}"
- maxmemory="1024m"
+ maxmemory="${javac.memorymax}"
bottom="${javadoc.bottom}" >
<classpath refid="jogl_all.classpath"/>
<link offline="true" href="${javadoc.link}" packagelistLoc="${gluegen.root}/make/142-packages" />
@@ -461,7 +463,7 @@
overview="${javadoc.overview}"
access="protected"
source="${target.sourcelevel}"
- maxmemory="1024m"
+ maxmemory="${javac.memorymax}"
bottom="${javadoc.bottom}" >
<classpath refid="jogl_all.classpath"/>
<link offline="true" href="${javadoc.link}" packagelistLoc="${gluegen.root}/make/142-packages" />
@@ -482,7 +484,7 @@
overview="${javadoc.nw.overview}"
access="public"
source="${target.sourcelevel}"
- maxmemory="1024m"
+ maxmemory="${javac.memorymax}"
bottom="${javadoc.bottom}" >
<classpath refid="jogl_all.classpath"/>
<link offline="true" href="${javadoc.link}" packagelistLoc="${gluegen.root}/make/142-packages" />
diff --git a/make/scripts/make.jogl.all.linux-x86_64.sh b/make/scripts/make.jogl.all.linux-x86_64.sh
index 6fe80312b..4642326d5 100755
--- a/make/scripts/make.jogl.all.linux-x86_64.sh
+++ b/make/scripts/make.jogl.all.linux-x86_64.sh
@@ -24,6 +24,11 @@ fi
# -DisLinux=true \
# -DisLinuxAMD64=true \
# -DisX11=true \
+#
+# -Dtarget.sourcelevel=1.6 \
+# -Dtarget.targetlevel=1.6 \
+# -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
+
#LD_LIBRARY_PATH=/opt-linux-x86_64/mesa-7.8.1/lib64
#export LD_LIBRARY_PATH
@@ -44,6 +49,9 @@ echo LIBGL_DEBUG: $LIBGL_DEBUG 2>&1 | tee -a $LOGF
# BUILD_ARCHIVE=true \
ant \
$CUSTOMLIBDIR \
+ -Dtarget.sourcelevel=1.6 \
+ -Dtarget.targetlevel=1.6 \
+ -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
-Djavacdebuglevel="source,lines,vars" \
-Drootrel.build=build-x86_64 \
-Dsetup.addNativeOpenMAX=true \
diff --git a/make/scripts/make.jogl.all.macosx.sh b/make/scripts/make.jogl.all.macosx.sh
index 1c22efe48..23a276c72 100755
--- a/make/scripts/make.jogl.all.macosx.sh
+++ b/make/scripts/make.jogl.all.macosx.sh
@@ -8,7 +8,15 @@ fi
# -Dc.compiler.debug=true \
# -Djavacdebug="true" \
# -Djavacdebuglevel="source,lines,vars" \
+#
+# -Dtarget.sourcelevel=1.6 \
+# -Dtarget.targetlevel=1.6 \
+# -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
+
ant \
+ -Dtarget.sourcelevel=1.6 \
+ -Dtarget.targetlevel=1.6 \
+ -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
-Drootrel.build=build-macosx \
$* 2>&1 | tee make.jogl.all.macosx.log