summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-06-18 19:48:51 +0200
committerSven Gothel <[email protected]>2013-06-18 19:48:51 +0200
commitaf426c53f818a8dac39e43b441dde261aa360536 (patch)
tree00f6f7e4c6819c284201d8ae34c0197415741791 /make
parentde67cde91cb99e3a1a3b8182b119671d112c553b (diff)
Add optional JOAL dependency, enabling JOAL usage for our 'av' package. Note: May be relocated to external project later!
Assumption: gluegen/ joal/ jogl/ For OpenAL / JOAL code: - use the package jogamp.opengl.openal (like jogamp.opengl.android) - will be build _before_ the other 2nd pass java files - do not expose OpenAL/JOAL APIs, if being used by other packages, since only this package is being compiled w/ JOAL jar files!
Diffstat (limited to 'make')
-rw-r--r--make/build-common.xml19
-rw-r--r--make/build-jogl.xml29
-rwxr-xr-xmake/scripts/setenv-jogl.sh28
-rw-r--r--make/scripts/tests.sh11
4 files changed, 76 insertions, 11 deletions
diff --git a/make/build-common.xml b/make/build-common.xml
index dd33b1683..2061d55c9 100644
--- a/make/build-common.xml
+++ b/make/build-common.xml
@@ -19,6 +19,9 @@
<import file="${gluegen.root}/make/jogamp-androidtasks.xml" />
<import file="${gluegen.root}/make/jogamp-env.xml" />
+ <!-- Add JOAL (optional) -->
+ <property name="joal.root" value="../../joal" />
+
<property name="ant-contrib.jar" value="${gluegen.root}/make/lib/ant-contrib-1.0b3.jar" />
<condition property="rootrel.build" value="build">
@@ -202,6 +205,8 @@
<property name="ant.jar" value="${ant.home}/lib/ant.jar" />
<property name="ant-junit.jar" value="${ant.home}/lib/ant-junit.jar" />
+ <property name="build.joal" value="${joal.root}/${rootrel.build}" /> <!-- optional -->
+
<property name="nativewindow.make" value="." />
<property name="nativewindow.build.xml" value="${nativewindow.make}/build-nativewindow.xml" />
<property name="build.nativewindow" value="${build}/nativewindow" />
@@ -414,6 +419,13 @@
<property name="jogl-all-android.jar" value="${jar}/jogl-all-android.jar" />
<property name="jogl-all-android.apk" value="${jar}/jogl-all-android-${android.abi}.apk" />
+ <!-- JavaSE combinations . JOAL (optional) -->
+ <property name="joal.jar" value="${build.joal}/joal.jar" />
+ <condition property="joal-jars.available">
+ <available file="${joal.jar}"/>
+ </condition>
+ <echo message="joal-jars.available: ${joal-jars.available} ${joal.jar}" />
+
<!-- NativeWindow Compilation .. -->
<path id="swt_gluegen.classpath">
<pathelement location="${gluegen-rt.jar}" />
@@ -427,6 +439,13 @@
<path refid="nativewindow_all_atoms.classpath" />
</path>
+ <path id="nativewindow_gluegen_joal.classpath">
+ <pathelement location="${gluegen-rt.jar}" />
+ <pathelement location="${swt.jar}" />
+ <pathelement location="${joal.jar}" />
+ <path refid="nativewindow_all_atoms.classpath" />
+ </path>
+
<path id="nativewindow_gluegen_android.classpath">
<pathelement location="${android.jar}" />
<pathelement location="${gluegen-rt-android.jar}" />
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index ce532c2b4..f53c3ba29 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -125,6 +125,9 @@
<property name="java.part.android"
value="jogamp/opengl/android/**"/>
+ <property name="java.part.openal"
+ value="jogamp/opengl/openal/**"/>
+
<property name="java.part.gldesktop"
value="jogamp/opengl/**/gl2/** jogamp/opengl/**/gl3/** jogamp/opengl/**/gl4/**"/>
@@ -1025,10 +1028,28 @@
</javac>
</target>
+ <target name="java.compile.secondpass.openal" if="joal-jars.available">
+ <!-- Perform the second pass Java compile; everything except portion of fixed function emulation depending on generated code. -->
+ <javac destdir="${classes}"
+ includes="${java.part.openal}"
+ fork="yes"
+ includeAntRuntime="false"
+ memoryMaximumSize="${javac.memorymax}"
+ encoding="UTF-8"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}"
+ debug="${javacdebug}" debuglevel="${javacdebuglevel}">
+ <classpath refid="nativewindow_gluegen_joal.classpath"/>
+ <src path="${src.java}" />
+ <src path="${src.generated.java}" />
+ </javac>
+ </target>
+
<target name="java.compile.secondpass.javase">
<!-- 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},${java.part.android}"
+ excludes="com/jogamp/opengl/util/glsl/fixedfunc/FixedFuncUtil.java,${java.excludes.all},${java.part.android},${java.part.openal}"
fork="yes"
includeAntRuntime="false"
memoryMaximumSize="${javac.memorymax}"
@@ -1062,12 +1083,12 @@
</target>
<!-- Perform the second pass Java compile; everything except portion of fixed function emulation depending on generated code. -->
- <target name="java.compile.secondpass" depends="java.generate.composable.pipeline, java.compile.secondpass.javase, java.compile.secondpass.android" />
+ <target name="java.compile.secondpass" depends="java.generate.composable.pipeline, java.compile.secondpass.openal, java.compile.secondpass.javase, java.compile.secondpass.android" />
<target name="java.compile.thirdpass.javase">
<!-- Perform the third pass Java compile; everything including fixed function emulation. -->
<javac destdir="${classes}"
- excludes="${java.excludes.all},${java.part.android}"
+ excludes="${java.excludes.all},${java.part.android},${java.part.openal}"
fork="yes"
includeAntRuntime="false"
memoryMaximumSize="${javac.memorymax}"
@@ -1649,7 +1670,7 @@
</jar>
<jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-util.jar}" filesonly="true">
<fileset dir="${classes}"
- includes="${java.part.util} ${java.part.util.glsl}"
+ includes="${java.part.util} ${java.part.util.glsl} ${java.part.openal}"
excludes="${java.part.util.awt} ${java.part.util.gldesktop} ${java.part.util.fixedfuncemu} ${java.part.util.graph}"/>
<fileset dir="resources/assets" includes="jogl/util/**" />
</jar>
diff --git a/make/scripts/setenv-jogl.sh b/make/scripts/setenv-jogl.sh
index 0945f44d1..b6df348dc 100755
--- a/make/scripts/setenv-jogl.sh
+++ b/make/scripts/setenv-jogl.sh
@@ -56,6 +56,25 @@ GLUEGEN_JAR=$GLUEGEN_BUILDDIR/gluegen-rt.jar
GLUEGEN_OS=$GLUEGEN_BUILDDIR/obj
JUNIT_JAR=$GLUEGEN_DIR/make/lib/junit.jar
+joalpf=`find ../../joal -name joal.iml`
+if [ -z "$joalpf" ] ; then
+ joalpf=`find .. -name joal.iml`
+fi
+if [ -z "$joalpf" ] ; then
+ echo JOAL_BUILDDIR not found
+ print_usage
+ exit
+fi
+
+JOAL_DIR=`dirname $joalpf`
+JOAL_BUILDDIR=$JOAL_DIR/$JOGL_BUILDDIR_BASE
+if [ ! -e "$JOAL_BUILDDIR" ] ; then
+ echo JOAL_BUILDDIR $JOAL_BUILDDIR does not exist
+ print_usage
+ exit
+fi
+JOAL_JAR=$JOAL_BUILDDIR/joal.jar
+
if [ -z "$ANT_PATH" ] ; then
ANT_PATH=$(dirname $(dirname $(which ant)))
if [ -e $ANT_PATH/lib/ant.jar ] ; then
@@ -71,6 +90,7 @@ fi
ANT_JARS=$ANT_PATH/lib/ant.jar:$ANT_PATH/lib/ant-junit.jar
echo GLUEGEN BUILDDIR: $GLUEGEN_BUILDDIR
+echo JOAL BUILDDIR: $JOAL_BUILDDIR
echo JOGL DIR: $JOGL_DIR
echo JOGL BUILDDIR: $JOGL_BUILDDIR
echo JOGL BUILDDIR BASE: $JOGL_BUILDDIR_BASE
@@ -84,12 +104,12 @@ CP_SEP=:
LIB=$THISDIR/lib
-JOGAMP_ALL_AWT_CLASSPATH=.:$GLUEGEN_JAR:$JOGL_ALL_AWT_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS
-JOGAMP_ALL_NOAWT_CLASSPATH=.:$GLUEGEN_JAR:$JOGL_ALL_NOAWT_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS
-JOGAMP_MOBILE_CLASSPATH=.:$GLUEGEN_JAR:$JOGL_MOBILE_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS
+JOGAMP_ALL_AWT_CLASSPATH=.:$GLUEGEN_JAR:$JOAL_JAR:$JOGL_ALL_AWT_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS
+JOGAMP_ALL_NOAWT_CLASSPATH=.:$GLUEGEN_JAR:$JOAL_JAR:$JOGL_ALL_NOAWT_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS
+JOGAMP_MOBILE_CLASSPATH=.:$GLUEGEN_JAR:$JOAL_JAR:$JOGL_MOBILE_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS
export JOGAMP_ALL_AWT_CLASSPATH JOGAMP_ALL_NOAWT_CLASSPATH JOGAMP_MOBILE_CLASSPATH
-CLASSPATH=.:$GLUEGEN_JAR:$JOGL_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS
+CLASSPATH=.:$GLUEGEN_JAR:$JOAL_JAR:$JOGL_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS
export CLASSPATH
# We use TempJarCache per default now!
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index 8c3b16daa..33270edc6 100644
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -288,8 +288,6 @@ function testawtswt() {
#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestLandscapeES2NEWT $*
#testawtswt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasSWT $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieSimple $*
#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestElektronenMultipliziererNEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestRedSquareES2NEWT $*
@@ -305,6 +303,13 @@ function testawtswt() {
#testnoawt com.jogamp.opengl.test.junit.jogl.demos.gl3.newt.TestGeomShader01TextureGL3NEWT $*
#
+# av demos
+#
+testnoawt jogamp.opengl.openal.av.ALDummyUsage $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieSimple $*
+
+#
# core/newt (testnoawt and testawt)
#
#testnoawt com.jogamp.nativewindow.NativeWindowVersion $*
@@ -440,7 +445,7 @@ function testawtswt() {
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock01AWT $*
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock02AWT $*
-testawt com.jogamp.opengl.test.bugs.Bug735Inv0AppletAWT $*
+#testawt com.jogamp.opengl.test.bugs.Bug735Inv0AppletAWT $*
#testawt com.jogamp.opengl.test.bugs.Bug735Inv1AppletAWT $*
#testawt com.jogamp.opengl.test.bugs.Bug735Inv2AppletAWT $*
#testawt com.jogamp.opengl.test.bugs.Bug735Inv3AppletAWT $*