diff options
author | Sven Gothel <[email protected]> | 2014-01-26 02:14:26 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-01-26 02:14:26 +0100 |
commit | aac4c5fc4ab7c77eff3b71f518100dd182ec2c33 (patch) | |
tree | 3883e6e9a97146a0cbf503ff67f7b58870fe22dd /make | |
parent | ac84afd26ad3b34851a423fb90e6c819b9dc9495 (diff) |
Cleanup Build: GlueGen config files, stub_includes; Add JoclVersion, Android JoclVersionActivity
Cleanup Build:
- Move gluegen config files into make/config (cleanup)
- Move stub_includes into respective folder make/stub_includes
and keep resources 'clean'
JoclVersion:
- Analoge to JoglVersion, replaces JOCLVersion (deprecated for now)
- Added text based CL info dump.
JoclVersionActivity:
- Analog to JoclVersionActivity
- Added full launch .. tested on Android (but no OpenCL avail.)
Diffstat (limited to 'make')
-rw-r--r-- | make/build.xml | 141 | ||||
-rw-r--r-- | make/config/cl-buffer-if.cfg (renamed from make/resources/cl-buffer-if.cfg) | 0 | ||||
-rw-r--r-- | make/config/cl-common.cfg (renamed from make/resources/cl-common.cfg) | 0 | ||||
-rw-r--r-- | make/config/cl-context-if.cfg (renamed from make/resources/cl-context-if.cfg) | 0 | ||||
-rw-r--r-- | make/config/cl-device-if.cfg (renamed from make/resources/cl-device-if.cfg) | 0 | ||||
-rw-r--r-- | make/config/cl-event-if.cfg (renamed from make/resources/cl-event-if.cfg) | 0 | ||||
-rw-r--r-- | make/config/cl-if.cfg (renamed from make/resources/cl-if.cfg) | 0 | ||||
-rw-r--r-- | make/config/cl-image-if.cfg (renamed from make/resources/cl-image-if.cfg) | 0 | ||||
-rw-r--r-- | make/config/cl-impl.cfg (renamed from make/resources/cl-impl.cfg) | 0 | ||||
-rw-r--r-- | make/config/cl-kernel-if.cfg (renamed from make/resources/cl-kernel-if.cfg) | 0 | ||||
-rw-r--r-- | make/config/cl-mem-if.cfg (renamed from make/resources/cl-mem-if.cfg) | 0 | ||||
-rw-r--r-- | make/config/cl-platform-if.cfg (renamed from make/resources/cl-platform-if.cfg) | 0 | ||||
-rw-r--r-- | make/config/cl-program-if.cfg (renamed from make/resources/cl-program-if.cfg) | 0 | ||||
-rw-r--r-- | make/config/cl-queue-if.cfg (renamed from make/resources/cl-queue-if.cfg) | 0 | ||||
-rw-r--r-- | make/config/cl-sampler-if.cfg (renamed from make/resources/cl-sampler-if.cfg) | 0 | ||||
-rw-r--r-- | make/config/clImplCustomCode.c (renamed from make/resources/clImplCustomCode.c) | 0 | ||||
-rw-r--r-- | make/config/clImplCustomCode.java (renamed from make/resources/clImplCustomCode.java) | 0 | ||||
-rw-r--r-- | make/config/clgl-if.cfg (renamed from make/resources/clgl-if.cfg) | 0 | ||||
-rw-r--r-- | make/config/createTagletProps.sh (renamed from make/resources/createTagletProps.sh) | 0 | ||||
-rw-r--r-- | make/config/native-taglet.properties (renamed from make/resources/native-taglet.properties) | 0 | ||||
-rw-r--r-- | make/resources/android/AndroidManifest-jocl.xml | 11 | ||||
-rw-r--r-- | make/resources/android/AndroidManifest-test.xml | 20 | ||||
-rw-r--r-- | make/resources/android/res-jocl/values/strings.xml | 4 | ||||
-rw-r--r-- | make/resources/android/res-test/drawable-hdpi/icon.png | bin | 0 -> 2516 bytes | |||
-rw-r--r-- | make/resources/android/res-test/drawable-ldpi/icon.png | bin | 0 -> 1172 bytes | |||
-rw-r--r-- | make/resources/android/res-test/drawable-mdpi/icon.png | bin | 0 -> 1570 bytes | |||
-rw-r--r-- | make/resources/android/res-test/layout/main.xml | 12 | ||||
-rw-r--r-- | make/resources/android/res-test/values/strings.xml | 8 | ||||
-rw-r--r-- | make/resources/assets-test/placeholder.txt | 1 | ||||
-rw-r--r-- | make/resources/assets/placeholder.txt | 1 | ||||
-rwxr-xr-x | make/scripts/adb-install-all-armv6.sh | 4 | ||||
-rwxr-xr-x | make/scripts/adb-logcat.sh | 4 | ||||
-rwxr-xr-x | make/scripts/adb-reinstall-all-armv6.sh | 5 | ||||
-rwxr-xr-x | make/scripts/adb-uninstall-all.sh | 4 | ||||
-rwxr-xr-x | make/scripts/java-win.bat | 5 | ||||
-rwxr-xr-x | make/scripts/make.jocl.all.android-armv6-cross.sh | 4 | ||||
-rwxr-xr-x | make/scripts/setenv-jocl.sh | 131 | ||||
-rwxr-xr-x | make/scripts/tests-osx-x32.sh | 7 | ||||
-rwxr-xr-x | make/scripts/tests-osx-x64.sh | 14 | ||||
-rwxr-xr-x | make/scripts/tests-solx32.sh | 10 | ||||
-rwxr-xr-x | make/scripts/tests-solx64.sh | 10 | ||||
-rwxr-xr-x | make/scripts/tests-win.bat | 1 | ||||
-rwxr-xr-x | make/scripts/tests-x32.bat | 28 | ||||
-rwxr-xr-x | make/scripts/tests-x32.sh | 13 | ||||
-rwxr-xr-x | make/scripts/tests-x64.bat | 25 | ||||
-rwxr-xr-x | make/scripts/tests-x64.sh | 19 | ||||
-rw-r--r-- | make/scripts/tests.sh | 111 | ||||
-rw-r--r-- | make/stub_includes/CL_orig/cl.h (renamed from make/resources/includes/CL_orig/cl.h) | 0 | ||||
-rw-r--r-- | make/stub_includes/CL_orig/cl_ext.h (renamed from make/resources/includes/CL_orig/cl_ext.h) | 0 | ||||
-rw-r--r-- | make/stub_includes/CL_orig/cl_gl.h (renamed from make/resources/includes/CL_orig/cl_gl.h) | 0 | ||||
-rw-r--r-- | make/stub_includes/CL_orig/cl_gl_ext.h (renamed from make/resources/includes/CL_orig/cl_gl_ext.h) | 0 | ||||
-rw-r--r-- | make/stub_includes/CL_orig/cl_platform.h (renamed from make/resources/includes/CL_orig/cl_platform.h) | 0 | ||||
-rw-r--r-- | make/stub_includes/CL_orig/cl_vendor_ext.h (renamed from make/resources/includes/CL_orig/cl_vendor_ext.h) | 0 | ||||
-rw-r--r-- | make/stub_includes/GL3/gl3.h (renamed from make/resources/includes/GL3/gl3.h) | 0 | ||||
-rw-r--r-- | make/stub_includes/GL3/glext.h (renamed from make/resources/includes/GL3/glext.h) | 0 | ||||
-rw-r--r-- | make/stub_includes/common/stddef.h (renamed from make/resources/stubs_includes/common/stddef.h) | 0 | ||||
-rw-r--r-- | make/stub_includes/common/stdint.h (renamed from make/resources/stubs_includes/common/stdint.h) | 0 | ||||
-rw-r--r-- | make/stub_includes/gl/gltypes.h (renamed from make/resources/stubs_includes/gl/gltypes.h) | 0 | ||||
-rw-r--r-- | make/stub_includes/jvm/jni.h (renamed from make/resources/stubs_includes/jvm/jni.h) | 0 | ||||
-rw-r--r-- | make/stub_includes/jvm/jni_md.h (renamed from make/resources/stubs_includes/jvm/jni_md.h) | 0 | ||||
-rw-r--r-- | make/stub_includes/opencl.h (renamed from make/resources/opencl.h) | 0 |
61 files changed, 548 insertions, 45 deletions
diff --git a/make/build.xml b/make/build.xml index 6cd885b2..76b9f0af 100644 --- a/make/build.xml +++ b/make/build.xml @@ -83,8 +83,7 @@ <!-- - Declare all paths and user defined variables. --> - <target name="init" depends="jogamp.env.init, gluegen.cpptasks.detect.os"> - + <target name="init.base" depends="jogamp.env.init,gluegen.properties.load.user,gluegen.cpptasks.detect.os"> <property name="jocl.build.number" value="manual"/> <property name="jocl.build.id" value="${version.timestamp}"/> <property name="jocl.version" value="${jogamp.version.base}-b${jocl.build.number}-${version.timestamp}" /> @@ -104,20 +103,19 @@ <property name="jogl.root" value="${project.root}/../jogl" /> <property name="jogl.build" value="${jogl.root}/${rootrel.build}" /> <property name="jogl-all.jar" value="${jogl.build}/jar/jogl-all.jar" /> + </target> - <!-- Create the classpath that includes GlueGen and - - ANTLR. This requires the user-defined "antlr.jar" - - property. --> - <path id="gluegen.classpath"> - <pathelement location="${gluegen.jar}" /> - <pathelement location="${antlr.jar}" /> - </path> + <target name="init.android" if="android-jars.available" > + <property name="gluegen-rt-android.jar" value="${gluegen.build}/gluegen-rt-android.jar" /> - <path id="javac.classpath"> - <pathelement location="${gluegen.jar}" /> + <path id="javac.android.classpath"> + <pathelement location="${android-min.jar}"/> + <pathelement location="${gluegen-rt-android.jar}" /> <pathelement location="${jogl-all.jar}" /> </path> + </target> + <target name="init" depends="init.base, init.android"> <!-- Names of directories relative to the project root. Some of these are used in FileMappers later for dependence information and need exact string matching, which is why they use file.separator @@ -151,28 +149,41 @@ <property name="obj" value="${project.root}/${rootrel.obj}" /> <property name="obj.jocl" value="${project.root}/${rootrel.obj.jocl}" /> + <!-- Create the classpath that includes GlueGen and + - ANTLR. This requires the user-defined "antlr.jar" + - property. --> + <path id="gluegen.classpath"> + <pathelement location="${gluegen.jar}" /> + <pathelement location="${antlr.jar}" /> + </path> + + <path id="javac.classpath"> + <pathelement location="${gluegen.jar}" /> + <pathelement location="${jogl-all.jar}" /> + </path> + + <property name="config" value="${project.root}/make/config" /> + <property name="stub.includes" value="${project.root}/make/stub_includes" /> + <property name="stub.includes.dir" value="stub_includes" /> <!-- NOTE: this MUST be relative for FileSet --> + <!-- Directories used for OpenCL header file preprocessing. --> <property name="etc.build.dir" value="${build}/etc" /> - <property name="headers.orig" value="${basedir}/resources/includes/CL_orig" /> - <property name="headers.dest" value="${basedir}/resources/includes/CL" /> + <property name="headers.orig" value="${stub.includes}/CL_orig" /> + <property name="headers.dest" value="${build}/includes/CL" /> <!-- The headers from which Java files are generated --> - <property name="config" value="${project.root}/make/resources" /> - <property name="stub.includes" value="${config}/includes" /> - <property name="stub.includes.opencl" value="${config}" /> - <property name="stub.includes.dir" value="resources" /> <!-- NOTE: this MUST be relative for FileSet --> <dirset id="stub.includes.fileset.all" dir="."> - <include name="${stub.includes.dir}/includes"/> - <include name="${stub.includes.dir}/stubs_includes/jvm"/> - <include name="${stub.includes.dir}/stubs_includes/gl"/> - <include name="${stub.includes.dir}/stubs_includes/common"/> + <include name="${stub.includes.dir}"/> + <include name="${stub.includes.dir}/jvm"/> + <include name="${stub.includes.dir}/gl"/> + <include name="${stub.includes.dir}/common"/> </dirset> <fileset id="stub.includes.dependencies.fileset.1" dir="${stub.includes.dir}"> - <include name="includes/CL/**" /> - <include name="includes/GL3/**" /> + <include name="CL/**" /> + <include name="GL3/**" /> </fileset> <fileset id="stub.includes.dependencies.fileset.2" file="${gluegen.jar}" /> - <fileset id="stub.includes.dependencies.fileset.3" dir="."> + <fileset id="stub.includes.dependencies.fileset.3" dir="config"> <include name="*.cfg" /> <include name="*.java" /> <include name="*.c" /> @@ -196,10 +207,14 @@ <mkdir dir="${classes}" /> <mkdir dir="${obj}" /> <mkdir dir="${obj.jocl}" /> + <mkdir dir="${build}/includes" /> <property name="archive.name" value="jocl-${jocl.version}-${os.and.arch}" /> <property name="archive" value="${build}/${archive.name}" /> + <!-- optional android classes - if android --> + <property name="java.part.android" value="jogamp/opencl/os/android/**"/> + <condition property="useLinuxARMv6SFOptions"> <and> <isset property="isLinuxARMv6"/> @@ -356,7 +371,7 @@ <echo message="context..."/> <echo message="incl path ${toString:stub.includes.fileset.all}"/> - <gluegen src="${stub.includes.opencl}/opencl.h" + <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" config="${config}/cl-context-if.cfg" includeRefid="stub.includes.fileset.all" @@ -367,7 +382,7 @@ </gluegen> <echo message="program..."/> - <gluegen src="${stub.includes.opencl}/opencl.h" + <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" config="${config}/cl-program-if.cfg" includeRefid="stub.includes.fileset.all" @@ -378,7 +393,7 @@ </gluegen> <echo message="kernel..."/> - <gluegen src="${stub.includes.opencl}/opencl.h" + <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" config="${config}/cl-kernel-if.cfg" includeRefid="stub.includes.fileset.all" @@ -389,7 +404,7 @@ </gluegen> <echo message="queue..."/> - <gluegen src="${stub.includes.opencl}/opencl.h" + <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" config="${config}/cl-queue-if.cfg" includeRefid="stub.includes.fileset.all" @@ -400,7 +415,7 @@ </gluegen> <echo message="device..."/> - <gluegen src="${stub.includes.opencl}/opencl.h" + <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" config="${config}/cl-device-if.cfg" includeRefid="stub.includes.fileset.all" @@ -411,7 +426,7 @@ </gluegen> <echo message="memobj..."/> - <gluegen src="${stub.includes.opencl}/opencl.h" + <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" config="${config}/cl-mem-if.cfg" includeRefid="stub.includes.fileset.all" @@ -422,7 +437,7 @@ </gluegen> <echo message="image..."/> - <gluegen src="${stub.includes.opencl}/opencl.h" + <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" config="${config}/cl-image-if.cfg" includeRefid="stub.includes.fileset.all" @@ -433,7 +448,7 @@ </gluegen> <echo message="buffer..."/> - <gluegen src="${stub.includes.opencl}/opencl.h" + <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" config="${config}/cl-buffer-if.cfg" includeRefid="stub.includes.fileset.all" @@ -444,7 +459,7 @@ </gluegen> <echo message="sampler..."/> - <gluegen src="${stub.includes.opencl}/opencl.h" + <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" config="${config}/cl-sampler-if.cfg" includeRefid="stub.includes.fileset.all" @@ -455,7 +470,7 @@ </gluegen> <echo message="event..."/> - <gluegen src="${stub.includes.opencl}/opencl.h" + <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" config="${config}/cl-event-if.cfg" includeRefid="stub.includes.fileset.all" @@ -466,7 +481,7 @@ </gluegen> <echo message="platform..."/> - <gluegen src="${stub.includes.opencl}/opencl.h" + <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" config="${config}/cl-platform-if.cfg" includeRefid="stub.includes.fileset.all" @@ -477,7 +492,7 @@ </gluegen> <echo message="CL..."/> - <gluegen src="${stub.includes.opencl}/opencl.h" + <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" config="${config}/cl-if.cfg" includeRefid="stub.includes.fileset.all" @@ -488,7 +503,7 @@ </gluegen> <echo message="CLGL..."/> - <gluegen src="${stub.includes.opencl}/opencl.h" + <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" config="${config}/clgl-if.cfg" includeRefid="stub.includes.fileset.all" @@ -498,7 +513,7 @@ </gluegen> <echo message="GLImpl..."/> - <gluegen src="${stub.includes.opencl}/opencl.h" + <gluegen src="${stub.includes}/opencl.h" outputRootDir="${build}" config="${config}/cl-impl.cfg" includeRefid="stub.includes.fileset.all" @@ -521,6 +536,7 @@ <target name="java.compile" depends="java.generate"> <javac destdir="${classes}" includeantruntime="false" + excludes="${java.part.android}" memoryMaximumSize="${javac.memorymax}" encoding="UTF-8" source="${target.sourcelevel}" @@ -533,6 +549,22 @@ </javac> </target> + <target name="android.compile" if="android-jars.available"> + <!--compile gluegen-rt-android last--> + <javac destdir="${classes}" + includeantruntime="false" + memoryMaximumSize="${javac.memorymax}" + encoding="UTF-8" + source="${target.sourcelevel}" + target="${target.targetlevel}" + bootclasspath="${target.rt.jar}" + debug="${javacdebug}" debuglevel="${javacdebuglevel}"> + <classpath refid="javac.android.classpath"/> + <src path="${src.java}" /> + <src path="${src.generated.java}" /> + </javac> + </target> + <!-- ================================================================== --> <!-- - Compile the native C code for JOCL. @@ -589,7 +621,7 @@ <sysincludepath path="${java.includes.dir}"/> <sysincludepath path="${java.includes.dir.platform}"/> <sysincludepath path="${stub.includes.gluegen.cc}"/> - <includepath path="resources/includes"/> + <includepath path="${stub.includes.dir}"/> <!-- This is for the generated headers for handwritten C code --> <includepath path="${src.generated.c}" /> <includepath path="${src.c}"/> @@ -658,22 +690,46 @@ <jar manifest="tempversion" destfile="${jocl.jar}"> <fileset dir="${classes}"> <include name="com/jogamp/opencl/**" /> + <include name="jogamp/opencl/**" /> + <exclude name="${java.part.android}" /> + </fileset> + <fileset dir="resources/assets"> + <include name="**" /> + </fileset> + </jar> + + <jar manifest="tempversion" destfile="${jocl-android.jar}"> + <fileset dir="${classes}"> + <include name="com/jogamp/opencl/**" /> + <include name="jogamp/opencl/**" /> + </fileset> + <fileset dir="resources/assets"> + <include name="**" /> </fileset> </jar> - <copy file="${jocl.jar}" tofile="${jocl-android.jar}"/> <antcall target="android.package" inheritRefs="true" /> <delete file="tempversion"/> </target> - <target name="android.package" depends="init" if="isAndroid"> + <target name="jocl.build.check.aapt" depends="init"> + <uptodate property="jocl.build.skip.aapt"> + <srcfiles dir= "." includes="*.xml"/> + <srcfiles dir= "${src.java}" includes="**"/> + <srcfiles dir= "${src.generated}" includes="**"/> + <mapper type="merge" to="${build}/jar/jocl-android-${android.abi}.apk"/> + </uptodate> + </target> + + <target name="android.package" depends="init,jocl.build.check.aapt" if="isAndroid" unless="jocl.build.skip.aapt" > <aapt.signed + assetsdir="resources/assets" jarsrcdir="${src.java}" jarbuilddir="${build}/jar" jarbasename="jocl-android" nativebuilddir="../${rootrel.build}/obj" - nativebasename="" + nativebasename="jocl" android.abi="${android.abi}" androidmanifest.path="resources/android/AndroidManifest-jocl.xml" androidresources.path="resources/android/res-jocl" @@ -856,6 +912,7 @@ <target name="jocl.build" depends="init"> <!-- Generate and compile the Java sources. --> <antcall target="java.compile" inheritRefs="true" /> + <antcall target="android.compile" inheritRefs="true" /> <!-- Compile the native C sources . --> <antcall target="c.build.jocl" inheritRefs="true" /> diff --git a/make/resources/cl-buffer-if.cfg b/make/config/cl-buffer-if.cfg index 197ef54d..197ef54d 100644 --- a/make/resources/cl-buffer-if.cfg +++ b/make/config/cl-buffer-if.cfg diff --git a/make/resources/cl-common.cfg b/make/config/cl-common.cfg index d89643b9..d89643b9 100644 --- a/make/resources/cl-common.cfg +++ b/make/config/cl-common.cfg diff --git a/make/resources/cl-context-if.cfg b/make/config/cl-context-if.cfg index 0e9a5617..0e9a5617 100644 --- a/make/resources/cl-context-if.cfg +++ b/make/config/cl-context-if.cfg diff --git a/make/resources/cl-device-if.cfg b/make/config/cl-device-if.cfg index a32476ca..a32476ca 100644 --- a/make/resources/cl-device-if.cfg +++ b/make/config/cl-device-if.cfg diff --git a/make/resources/cl-event-if.cfg b/make/config/cl-event-if.cfg index 87b55bfd..87b55bfd 100644 --- a/make/resources/cl-event-if.cfg +++ b/make/config/cl-event-if.cfg diff --git a/make/resources/cl-if.cfg b/make/config/cl-if.cfg index 2078123a..2078123a 100644 --- a/make/resources/cl-if.cfg +++ b/make/config/cl-if.cfg diff --git a/make/resources/cl-image-if.cfg b/make/config/cl-image-if.cfg index 611d1bf2..611d1bf2 100644 --- a/make/resources/cl-image-if.cfg +++ b/make/config/cl-image-if.cfg diff --git a/make/resources/cl-impl.cfg b/make/config/cl-impl.cfg index c2aff892..c2aff892 100644 --- a/make/resources/cl-impl.cfg +++ b/make/config/cl-impl.cfg diff --git a/make/resources/cl-kernel-if.cfg b/make/config/cl-kernel-if.cfg index be9d6aa2..be9d6aa2 100644 --- a/make/resources/cl-kernel-if.cfg +++ b/make/config/cl-kernel-if.cfg diff --git a/make/resources/cl-mem-if.cfg b/make/config/cl-mem-if.cfg index 11c51d19..11c51d19 100644 --- a/make/resources/cl-mem-if.cfg +++ b/make/config/cl-mem-if.cfg diff --git a/make/resources/cl-platform-if.cfg b/make/config/cl-platform-if.cfg index 1a355f34..1a355f34 100644 --- a/make/resources/cl-platform-if.cfg +++ b/make/config/cl-platform-if.cfg diff --git a/make/resources/cl-program-if.cfg b/make/config/cl-program-if.cfg index 7b72272f..7b72272f 100644 --- a/make/resources/cl-program-if.cfg +++ b/make/config/cl-program-if.cfg diff --git a/make/resources/cl-queue-if.cfg b/make/config/cl-queue-if.cfg index 171b9332..171b9332 100644 --- a/make/resources/cl-queue-if.cfg +++ b/make/config/cl-queue-if.cfg diff --git a/make/resources/cl-sampler-if.cfg b/make/config/cl-sampler-if.cfg index 5329b7f5..5329b7f5 100644 --- a/make/resources/cl-sampler-if.cfg +++ b/make/config/cl-sampler-if.cfg diff --git a/make/resources/clImplCustomCode.c b/make/config/clImplCustomCode.c index 751f819b..751f819b 100644 --- a/make/resources/clImplCustomCode.c +++ b/make/config/clImplCustomCode.c diff --git a/make/resources/clImplCustomCode.java b/make/config/clImplCustomCode.java index bee53425..bee53425 100644 --- a/make/resources/clImplCustomCode.java +++ b/make/config/clImplCustomCode.java diff --git a/make/resources/clgl-if.cfg b/make/config/clgl-if.cfg index 1671f76c..1671f76c 100644 --- a/make/resources/clgl-if.cfg +++ b/make/config/clgl-if.cfg diff --git a/make/resources/createTagletProps.sh b/make/config/createTagletProps.sh index af3312e8..af3312e8 100644 --- a/make/resources/createTagletProps.sh +++ b/make/config/createTagletProps.sh diff --git a/make/resources/native-taglet.properties b/make/config/native-taglet.properties index 84477786..84477786 100644 --- a/make/resources/native-taglet.properties +++ b/make/config/native-taglet.properties diff --git a/make/resources/android/AndroidManifest-jocl.xml b/make/resources/android/AndroidManifest-jocl.xml index 07fff315..2f39c9ab 100644 --- a/make/resources/android/AndroidManifest-jocl.xml +++ b/make/resources/android/AndroidManifest-jocl.xml @@ -13,6 +13,17 @@ android:description="@string/app_descr" android:persistent="false" > + <activity android:name="jogamp.opencl.os.android.JoclVersionActivityLauncher" + android:finishOnTaskLaunch="true" + android:launchMode="singleTop" + android:label="@string/activity_v_name" + android:description="@string/activity_v_descr" + > + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> </application> </manifest> diff --git a/make/resources/android/AndroidManifest-test.xml b/make/resources/android/AndroidManifest-test.xml new file mode 100644 index 00000000..bad971e5 --- /dev/null +++ b/make/resources/android/AndroidManifest-test.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + sharedUserId="com.jogamp.Community" + package="com.jogamp.opencl.test"> + + <uses-library android:name="com.jogamp.common" android:required="true" /> + <uses-library android:name="javax.media.opengl" android:required="true" /> + <uses-library android:name="com.jogamp.opencl" android:required="true" /> + <uses-library android:name="jogamp.android.launcher" android:required="true" /> + + <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/> + + <application android:icon="@drawable/icon" + android:label="@string/app_name" + android:description="@string/app_descr" + android:persistent="false" + > + </application> + +</manifest> diff --git a/make/resources/android/res-jocl/values/strings.xml b/make/resources/android/res-jocl/values/strings.xml index 24038557..9834b351 100644 --- a/make/resources/android/res-jocl/values/strings.xml +++ b/make/resources/android/res-jocl/values/strings.xml @@ -3,6 +3,6 @@ <string name="hello">Jocl Library</string> <string name="app_name">JogAmp\'s Jocl Library</string> <string name="app_descr">Contains Dalvik and native code, supporting native bindings.</string> - <string name="activity_v_name">Jocl</string> - <string name="activity_v_descr">The Jocl Library.</string> + <string name="activity_v_name">Jocl\'s Version</string> + <string name="activity_v_descr">Shows the version of the JOCL Library and runtime CL infos.</string> </resources> diff --git a/make/resources/android/res-test/drawable-hdpi/icon.png b/make/resources/android/res-test/drawable-hdpi/icon.png Binary files differnew file mode 100644 index 00000000..2148232c --- /dev/null +++ b/make/resources/android/res-test/drawable-hdpi/icon.png diff --git a/make/resources/android/res-test/drawable-ldpi/icon.png b/make/resources/android/res-test/drawable-ldpi/icon.png Binary files differnew file mode 100644 index 00000000..c16211f3 --- /dev/null +++ b/make/resources/android/res-test/drawable-ldpi/icon.png diff --git a/make/resources/android/res-test/drawable-mdpi/icon.png b/make/resources/android/res-test/drawable-mdpi/icon.png Binary files differnew file mode 100644 index 00000000..1c26e3f8 --- /dev/null +++ b/make/resources/android/res-test/drawable-mdpi/icon.png diff --git a/make/resources/android/res-test/layout/main.xml b/make/resources/android/res-test/layout/main.xml new file mode 100644 index 00000000..3a5f117d --- /dev/null +++ b/make/resources/android/res-test/layout/main.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + > +<TextView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/hello" + /> +</LinearLayout> diff --git a/make/resources/android/res-test/values/strings.xml b/make/resources/android/res-test/values/strings.xml new file mode 100644 index 00000000..bc47312c --- /dev/null +++ b/make/resources/android/res-test/values/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="hello">Jocl Test</string> + <string name="app_name">Jocl Tests</string> + <string name="app_descr">Launches Jocl Tests</string> + <string name="activity_opencltest1_name">JOCLTST1</string> + <string name="activity_opencltest1_descr">JOCLTST1</string> +</resources> diff --git a/make/resources/assets-test/placeholder.txt b/make/resources/assets-test/placeholder.txt new file mode 100644 index 00000000..efb91aa9 --- /dev/null +++ b/make/resources/assets-test/placeholder.txt @@ -0,0 +1 @@ +placeholder for git - can be removed when containing real assets for tests diff --git a/make/resources/assets/placeholder.txt b/make/resources/assets/placeholder.txt new file mode 100644 index 00000000..efb91aa9 --- /dev/null +++ b/make/resources/assets/placeholder.txt @@ -0,0 +1 @@ +placeholder for git - can be removed when containing real assets for tests diff --git a/make/scripts/adb-install-all-armv6.sh b/make/scripts/adb-install-all-armv6.sh new file mode 100755 index 00000000..3abd89c6 --- /dev/null +++ b/make/scripts/adb-install-all-armv6.sh @@ -0,0 +1,4 @@ +#adb $* install ../../gluegen/build-android-armv6/jogamp-android-launcher.apk +#adb $* install ../../gluegen/build-android-armv6/gluegen-rt-android-armeabi.apk +adb $* install ../build-android-armv6/jar/jocl-android-armeabi.apk +adb $* install ../build-android-armv6/jar/jocl-test-android.apk diff --git a/make/scripts/adb-logcat.sh b/make/scripts/adb-logcat.sh new file mode 100755 index 00000000..443011f8 --- /dev/null +++ b/make/scripts/adb-logcat.sh @@ -0,0 +1,4 @@ +sdir=`dirname $0` + +adb $* logcat -c +adb $* logcat 2>&1 | tee adb-logcat.log diff --git a/make/scripts/adb-reinstall-all-armv6.sh b/make/scripts/adb-reinstall-all-armv6.sh new file mode 100755 index 00000000..0e62c594 --- /dev/null +++ b/make/scripts/adb-reinstall-all-armv6.sh @@ -0,0 +1,5 @@ +sdir=`dirname $0` + +$sdir/adb-uninstall-all.sh $* +$sdir/adb-install-all-armv6.sh $* + diff --git a/make/scripts/adb-uninstall-all.sh b/make/scripts/adb-uninstall-all.sh new file mode 100755 index 00000000..7a293a9f --- /dev/null +++ b/make/scripts/adb-uninstall-all.sh @@ -0,0 +1,4 @@ +#adb $* uninstall jogamp.android.launcher +#adb $* uninstall com.jogamp.common +adb $* uninstall com.jogamp.opencl +adb $* uninstall com.jogamp.opencl.test diff --git a/make/scripts/java-win.bat b/make/scripts/java-win.bat new file mode 100755 index 00000000..2b45ae51 --- /dev/null +++ b/make/scripts/java-win.bat @@ -0,0 +1,5 @@ +
+REM %J2RE_HOME%\bin\java -classpath %CP_ALL% "-Djava.library.path=%LIB_DIR%" %D_ARGS% %X_ARGS% %* > java-win.log 2>&1
+%J2RE_HOME%\bin\java -classpath %CP_ALL% %D_ARGS% %X_ARGS% %* > java-win.log 2>&1
+tail java-win.log
+
diff --git a/make/scripts/make.jocl.all.android-armv6-cross.sh b/make/scripts/make.jocl.all.android-armv6-cross.sh index 01c87a42..1d6a8396 100755 --- a/make/scripts/make.jocl.all.android-armv6-cross.sh +++ b/make/scripts/make.jocl.all.android-armv6-cross.sh @@ -1,5 +1,7 @@ #! /bin/sh +SDIR=`dirname $0` + if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh ] ; then . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh fi @@ -84,7 +86,7 @@ export TARGET_PLATFORM_ROOT=${NDK_ROOT}/platforms/android-${ANDROID_VERSION}/arc # Need to add toolchain bins to the PATH. export PATH="$NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools/17.0.0:$PATH" -export GLUEGEN_CPPTASKS_FILE=`pwd`/../gluegen/make/lib/gluegen-cpptasks-android-armv6.xml +export GLUEGEN_CPPTASKS_FILE=`pwd`/../../gluegen/make/lib/gluegen-cpptasks-android-armv6.xml #export JUNIT_DISABLED="true" #export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode" diff --git a/make/scripts/setenv-jocl.sh b/make/scripts/setenv-jocl.sh new file mode 100755 index 00000000..72819b4e --- /dev/null +++ b/make/scripts/setenv-jocl.sh @@ -0,0 +1,131 @@ +#! /bin/sh + +function print_usage() { + echo "Usage: $0 jogl-build-dir" +} + +if [ -z "$1" ] ; then + echo JOCL BUILD DIR missing + print_usage + exit +fi + +if [ -e /opt-share/etc/profile.ant ] ; then + . /opt-share/etc/profile.ant +fi + +JOCL_BUILDDIR="$1" +shift + +THISDIR=`pwd` + +if [ -e "$JOCL_BUILDDIR" ] ; then + JOCL_DIR="$JOCL_BUILDDIR/.." + JOCL_BUILDDIR_BASE=`basename "$JOCL_BUILDDIR"` +else + echo JOCL_BUILDDIR "$JOCL_BUILDDIR" not exist or not given + print_usage + exit +fi + +gpf=`find ../../gluegen/make -name jogamp-env.xml` +if [ -z "$gpf" ] ; then + gpf=`find .. -name jogamp-env.xml` +fi +if [ -z "$gpf" ] ; then + echo GLUEGEN_BUILDDIR not found + print_usage + exit +fi + +GLUEGEN_DIR=`dirname $gpf`/.. +GLUEGEN_BUILDDIR="$GLUEGEN_DIR"/"$JOCL_BUILDDIR_BASE" +if [ ! -e "$GLUEGEN_BUILDDIR" ] ; then + echo GLUEGEN_BUILDDIR "$GLUEGEN_BUILDDIR" does not exist + print_usage + exit +fi +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"/"$JOCL_BUILDDIR_BASE" +if [ ! -e "$JOAL_BUILDDIR" ] ; then + echo JOAL_BUILDDIR "$JOAL_BUILDDIR" does not exist + print_usage + exit +fi +JOAL_JAR="$JOAL_BUILDDIR"/jar/joal.jar + +joglpf=`find ../../jogl -name jogl.iml` +if [ -z "$joglpf" ] ; then + joglpf=`find .. -name jogl.iml` +fi +if [ -z "$joglpf" ] ; then + echo JOGL_BUILDDIR not found + print_usage + exit +fi +JOGL_DIR=`dirname $joglpf` +JOGL_BUILDDIR="$JOGL_DIR"/"$JOCL_BUILDDIR_BASE" +if [ ! -e "$JOGL_BUILDDIR" ] ; then + echo JOGL_BUILDDIR "$JOGL_BUILDDIR" does not exist + print_usage + exit +fi +JOGL_JAR="$JOGL_BUILDDIR"/jar/jogl-all.jar + +if [ -z "$ANT_PATH" ] ; then + ANT_PATH=$(dirname $(dirname $(which ant))) + if [ -e $ANT_PATH/lib/ant.jar ] ; then + export ANT_PATH + echo autosetting ANT_PATH to $ANT_PATH + fi +fi +if [ -z "$ANT_PATH" ] ; then + echo ANT_PATH does not exist, set it + print_usage + exit +fi +ANT_JARS=$ANT_PATH/lib/ant.jar:$ANT_PATH/lib/ant-junit.jar + +JOCL_JAR="$JOCL_BUILDDIR"/jar/jocl.jar + +echo GLUEGEN BUILDDIR: "$GLUEGEN_BUILDDIR" +echo JOAL BUILDDIR: "$JOAL_BUILDDIR" +echo JOGL BUILDDIR: "$JOGL_BUILDDIR" +echo JOCL DIR: "$JOCL_DIR" +echo JOCL BUILDDIR: "$JOCL_BUILDDIR" +echo JOCL BUILDDIR BASE: "$JOCL_BUILDDIR_BASE" + +J2RE_HOME=$(dirname $(dirname $(which java))) +JAVA_HOME=$(dirname $(dirname $(which javac))) +CP_SEP=: + +JOGAMP_ALL_CLASSPATH=.:"$GLUEGEN_JAR":"$JOAL_JAR":"$JOGL_JAR":"$JOCL_JAR":"$JUNIT_JAR":"$ANT_JARS" +CLASSPATH="$JOGAMP_ALL_CLASSPATH" +export JOGAMP_ALL_CLASSPATH CLASSPATH + +# We use TempJarCache per default now! +#export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$GLUEGEN_OS":"$JOGL_LIB_DIR" +#export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH":"$GLUEGEN_OS:"$JOGL_LIB_DIR" + +echo JOGAMP_ALL_CLASSPATH: "$JOGAMP_ALL_CLASSPATH" +echo CLASSPATH: "$CLASSPATH" +echo +echo MacOSX REMEMBER to add the JVM arguments "-XstartOnFirstThread -Djava.awt.headless=true" for running demos without AWT, e.g. NEWT +echo MacOSX REMEMBER to add the JVM arguments "-XstartOnFirstThread -Djava.awt.headless=true com.jogamp.newt.util.MainThread" for running demos with NEWT + +PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH +export PATH + diff --git a/make/scripts/tests-osx-x32.sh b/make/scripts/tests-osx-x32.sh new file mode 100755 index 00000000..e7f4f01e --- /dev/null +++ b/make/scripts/tests-osx-x32.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +spath=`dirname $0` + +. $spath/tests.sh /usr/bin/java -d32 ../build-macosx $* + + diff --git a/make/scripts/tests-osx-x64.sh b/make/scripts/tests-osx-x64.sh new file mode 100755 index 00000000..5d9cd6f6 --- /dev/null +++ b/make/scripts/tests-osx-x64.sh @@ -0,0 +1,14 @@ +#! /bin/bash + +export DYLD_LIBRARY_PATH=/usr/local/libav:$DYLD_LIBRARY_PATH + +JAVA_HOME=`/usr/libexec/java_home -version 1.7` +#JAVA_HOME=`/usr/libexec/java_home -version 1.7.0_25` +#JAVA_HOME=`/usr/libexec/java_home -version 1.6.0` +PATH=$JAVA_HOME/bin:$PATH +export JAVA_HOME PATH + +spath=`dirname $0` + +. $spath/tests.sh $JAVA_HOME/bin/java -d64 ../build-macosx $* + diff --git a/make/scripts/tests-solx32.sh b/make/scripts/tests-solx32.sh new file mode 100755 index 00000000..996dcc60 --- /dev/null +++ b/make/scripts/tests-solx32.sh @@ -0,0 +1,10 @@ +#! /bin/bash + +SDIR=`dirname $0` + +if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86.sh ] ; then + . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86.sh +fi + +. $SDIR/tests.sh `which java` -d32 ../build-solaris-x86 $* + diff --git a/make/scripts/tests-solx64.sh b/make/scripts/tests-solx64.sh new file mode 100755 index 00000000..3500f1b1 --- /dev/null +++ b/make/scripts/tests-solx64.sh @@ -0,0 +1,10 @@ +#! /bin/bash + +SDIR=`dirname $0` + +if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh ] ; then + . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh +fi + +. $SDIR/tests.sh `which java` -d64 ../build-solaris-x86_64 $* + diff --git a/make/scripts/tests-win.bat b/make/scripts/tests-win.bat new file mode 100755 index 00000000..583b5cde --- /dev/null +++ b/make/scripts/tests-win.bat @@ -0,0 +1 @@ +scripts\java-win.bat com.jogamp.opencl.JoclVersion %* diff --git a/make/scripts/tests-x32.bat b/make/scripts/tests-x32.bat new file mode 100755 index 00000000..c8ead0ad --- /dev/null +++ b/make/scripts/tests-x32.bat @@ -0,0 +1,28 @@ +
+set BLD_SUB=build-win32
+set J2RE_HOME=c:\jre1.7.0_45_x32
+set JAVA_HOME=c:\jdk1.7.0_45_x32
+set ANT_PATH=C:\apache-ant-1.8.2
+
+set PROJECT_ROOT=D:\projects\jogamp\jogl
+set BLD_DIR=..\%BLD_SUB%
+
+REM set FFMPEG_LIB=C:\ffmpeg_libav\lavc53_lavf53_lavu51-ffmpeg\x32
+set FFMPEG_LIB=C:\ffmpeg_libav\lavc55_lavf55_lavu52-ffmpeg\x32
+REM set FFMPEG_LIB=C:\ffmpeg_libav\lavc54_lavf54_lavu52_lavr01-libav\x32
+
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PATH%
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\external\angle\win32\20120127;%PATH%
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\external\angle\win32\20121010-chrome;%PATH%
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\external\PVRVFrame\OGLES-2.0\Windows_x86_32;%PATH%
+set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%FFMPEG_LIB%;%PATH%
+
+set BLD_DIR=..\%BLD_SUB%
+REM set LIB_DIR=..\..\gluegen\%BLD_SUB%\obj;%BLD_DIR%\lib
+set LIB_DIR=
+
+set CP_ALL=.;%BLD_DIR%\jar\jogl-all.jar;%BLD_DIR%\jar\jogl-test.jar;..\..\gluegen\%BLD_SUB%\gluegen-rt.jar;..\..\gluegen\make\lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar;%BLD_DIR%\..\make\lib\swt\win32-win32-x86\swt-debug.jar
+
+echo CP_ALL %CP_ALL%
+
+scripts\tests-win.bat %*
diff --git a/make/scripts/tests-x32.sh b/make/scripts/tests-x32.sh new file mode 100755 index 00000000..858ed5fd --- /dev/null +++ b/make/scripts/tests-x32.sh @@ -0,0 +1,13 @@ +#! /bin/bash + +SDIR=`dirname $0` + +if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86.sh ] ; then + . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86.sh +fi + +export SWT_CLASSPATH=`pwd`/lib/swt/gtk-linux-x86/swt-debug.jar + +. $SDIR/tests.sh `which java` -d32 ../build-x86 $* + + diff --git a/make/scripts/tests-x64.bat b/make/scripts/tests-x64.bat new file mode 100755 index 00000000..ac74f4c9 --- /dev/null +++ b/make/scripts/tests-x64.bat @@ -0,0 +1,25 @@ +
+set BLD_SUB=build-win64
+set J2RE_HOME=c:\jre1.7.0_45_x64
+set JAVA_HOME=c:\jdk1.7.0_45_x64
+set ANT_PATH=C:\apache-ant-1.8.2
+
+REM set FFMPEG_LIB=C:\ffmpeg_libav\lavc53_lavf53_lavu51-ffmpeg\x64
+REM set FFMPEG_LIB=C:\ffmpeg_libav\lavc55_lavf55_lavu52-ffmpeg\x64
+set FFMPEG_LIB=C:\ffmpeg_libav\lavc55_lavf55_lavu52-ffmpeg-2013-10-09\x64
+REM set FFMPEG_LIB=C:\ffmpeg_libav\lavc54_lavf54_lavu52_lavr01-libav\x64
+
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\external\PVRVFrame\OGLES-2.0\Windows_x86_64;%PATH%
+set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%FFMPEG_LIB%;%PATH%
+
+set BLD_DIR=..\%BLD_SUB%
+REM set LIB_DIR=%BLD_DIR%\lib;..\..\gluegen\%BLD_SUB%\obj
+set LIB_DIR=
+
+set CP_ALL=.;%BLD_DIR%\jar\jogl-all.jar;%BLD_DIR%\jar\jogl-test.jar;..\..\joal\%BLD_SUB%\joal.jar;..\..\gluegen\%BLD_SUB%\gluegen-rt.jar;..\..\gluegen\make\lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar;%BLD_DIR%\..\make\lib\swt\win32-win32-x86_64\swt-debug.jar
+echo CP_ALL %CP_ALL%
+
+set X_ARGS="-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true"
+
+scripts\tests-win.bat %*
+
diff --git a/make/scripts/tests-x64.sh b/make/scripts/tests-x64.sh new file mode 100755 index 00000000..fe2fc495 --- /dev/null +++ b/make/scripts/tests-x64.sh @@ -0,0 +1,19 @@ +#! /bin/bash + +SDIR=`dirname $0` + +#export LD_LIBRARY_PATH=/home/sven/libav-0.8/lib:$LD_LIBRARY_PATH +#export LD_LIBRARY_PATH=/home/sven/ffmpeg-0.10/lib:$LD_LIBRARY_PATH + +#export LD_LIBRARY_PATH=/home/sven/libav-9.x/lib:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=/home/sven/ffmpeg-1.2/lib:$LD_LIBRARY_PATH + +#export LD_LIBRARY_PATH=/home/sven/libav-10.x/lib:$LD_LIBRARY_PATH +#export LD_LIBRARY_PATH=/home/sven/ffmpeg-2.x/lib:$LD_LIBRARY_PATH + +if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh ] ; then + . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh +fi + +. $SDIR/tests.sh `which java` -d64 ../build-x86_64 $* + diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh new file mode 100644 index 00000000..642985fd --- /dev/null +++ b/make/scripts/tests.sh @@ -0,0 +1,111 @@ +#! /bin/bash + +if [ -z "$1" -o -z "$2" -o -z "$3" ] ; then + echo Usage $0 java-exe java-xargs build-dir + exit 0 +fi + +javaexe="$1" +shift +javaxargs=$1 +shift +bdir="$1" +shift + +if [ ! -x "$javaexe" ] ; then + echo java-exe "$javaexe" is not an executable + exit 1 +fi +if [ ! -d "$bdir" ] ; then + echo build-dir "$bdir" is not a directory + exit 1 +fi + +rm -f java-run.log + +spath=`dirname $0` + +. $spath/setenv-jocl.sh "$bdir" +unset CLASSPATH + +MOSX=0 +MOSX_MT=0 +uname -a | grep -i Darwin && MOSX=1 +if [ $MOSX -eq 1 ] ; then + echo setup OSX environment vars + #export NSZombieEnabled=YES + export NSTraceEvents=YES + #export OBJC_PRINT_EXCEPTIONS=YES + echo NSZombieEnabled $NSZombieEnabled 2>&1 | tee -a java-run.log + echo NSTraceEvents $NSTraceEvents 2>&1 | tee -a java-run.log + echo OBJC_PRINT_EXCEPTIONS $OBJC_PRINT_EXCEPTIONS 2>&1 | tee -a java-run.log + MOSX_MT=1 +fi + +#export LD_LIBRARY_PATH=/opt-linux-x86_64/opencl-lala/lib64:$LD_LIBRARY_PATH + +which "$javaexe" 2>&1 | tee -a java-run.log +"$javaexe" -version 2>&1 | tee -a java-run.log +echo LD_LIBRARY_PATH $LD_LIBRARY_PATH 2>&1 | tee -a java-run.log +echo "$javaexe" $javaxargs $X_ARGS $D_ARGS $* 2>&1 | tee -a java-run.log +echo MacOsX $MOSX + +function jrun() { + awton=$1 + shift + + #D_ARGS="-Djocl.debug.DebugCL -Djocl.debug.TraceCL" + + #D_ARGS="-Djogamp.debug=all" + #D_ARGS="-Dnativewindow.debug=all" + #D_ARGS="-Djogl.debug=all" + #D_ARGS="-Dnewt.debug=all" + #D_ARGS="-Djocl=all" + + #X_ARGS="-verbose:jni" + #X_ARGS="-Xrs" + + if [ $awton -eq 1 ] ; then + export CLASSPATH=$JOGAMP_ALL_CLASSPATH + echo CLASSPATH $CLASSPATH + X_ARGS="-Djava.awt.headless=false $X_ARGS" + else + export CLASSPATH=$JOGAMP_ALL_CLASSPATH + X_ARGS="-Djava.awt.headless=true $X_ARGS" + fi + if [ ! -z "$CUSTOM_CLASSPATH" ] ; then + export CLASSPATH=$CUSTOM_CLASSPATH:$CLASSPATH + fi + echo CLASSPATH $CLASSPATH + if [ $MOSX_MT -eq 1 ] ; then + if [ $awton -eq 0 ] ; then + # No AWT, No SWT -> Preserve Main-Thread + X_ARGS="-XstartOnFirstThread $X_ARGS" + C_ARG="com.jogamp.newt.util.MainThread" + fi + fi + echo + echo "Test Start: $*" + echo + echo "$javaexe" $javaxargs $X_ARGS $D_ARGS $C_ARG $* + #gdb --args "$javaexe" $javaxargs $X_ARGS $D_ARGS $C_ARG $* + "$javaexe" $javaxargs $X_ARGS $D_ARGS $C_ARG $* + echo + echo "Test End: $*" + echo +} + +function testnoawt() { + jrun 0 $* 2>&1 | tee -a java-run.log +} + +function testawt() { + MOSX_MT=0 + jrun 1 $* 2>&1 | tee -a java-run.log +} + +# +# Version +# +testnoawt com.jogamp.opencl.JoclVersion $* + diff --git a/make/resources/includes/CL_orig/cl.h b/make/stub_includes/CL_orig/cl.h index 4f21afe5..4f21afe5 100644 --- a/make/resources/includes/CL_orig/cl.h +++ b/make/stub_includes/CL_orig/cl.h diff --git a/make/resources/includes/CL_orig/cl_ext.h b/make/stub_includes/CL_orig/cl_ext.h index 7310fd2b..7310fd2b 100644 --- a/make/resources/includes/CL_orig/cl_ext.h +++ b/make/stub_includes/CL_orig/cl_ext.h diff --git a/make/resources/includes/CL_orig/cl_gl.h b/make/stub_includes/CL_orig/cl_gl.h index 3b4fe069..3b4fe069 100644 --- a/make/resources/includes/CL_orig/cl_gl.h +++ b/make/stub_includes/CL_orig/cl_gl.h diff --git a/make/resources/includes/CL_orig/cl_gl_ext.h b/make/stub_includes/CL_orig/cl_gl_ext.h index fbf8b326..fbf8b326 100644 --- a/make/resources/includes/CL_orig/cl_gl_ext.h +++ b/make/stub_includes/CL_orig/cl_gl_ext.h diff --git a/make/resources/includes/CL_orig/cl_platform.h b/make/stub_includes/CL_orig/cl_platform.h index c8c6d7f6..c8c6d7f6 100644 --- a/make/resources/includes/CL_orig/cl_platform.h +++ b/make/stub_includes/CL_orig/cl_platform.h diff --git a/make/resources/includes/CL_orig/cl_vendor_ext.h b/make/stub_includes/CL_orig/cl_vendor_ext.h index a01a3535..a01a3535 100644 --- a/make/resources/includes/CL_orig/cl_vendor_ext.h +++ b/make/stub_includes/CL_orig/cl_vendor_ext.h diff --git a/make/resources/includes/GL3/gl3.h b/make/stub_includes/GL3/gl3.h index 176ddb16..176ddb16 100644 --- a/make/resources/includes/GL3/gl3.h +++ b/make/stub_includes/GL3/gl3.h diff --git a/make/resources/includes/GL3/glext.h b/make/stub_includes/GL3/glext.h index 8e40956e..8e40956e 100644 --- a/make/resources/includes/GL3/glext.h +++ b/make/stub_includes/GL3/glext.h diff --git a/make/resources/stubs_includes/common/stddef.h b/make/stub_includes/common/stddef.h index f6c7207b..f6c7207b 100644 --- a/make/resources/stubs_includes/common/stddef.h +++ b/make/stub_includes/common/stddef.h diff --git a/make/resources/stubs_includes/common/stdint.h b/make/stub_includes/common/stdint.h index 4e456608..4e456608 100644 --- a/make/resources/stubs_includes/common/stdint.h +++ b/make/stub_includes/common/stdint.h diff --git a/make/resources/stubs_includes/gl/gltypes.h b/make/stub_includes/gl/gltypes.h index 3272b72a..3272b72a 100644 --- a/make/resources/stubs_includes/gl/gltypes.h +++ b/make/stub_includes/gl/gltypes.h diff --git a/make/resources/stubs_includes/jvm/jni.h b/make/stub_includes/jvm/jni.h index be01d018..be01d018 100644 --- a/make/resources/stubs_includes/jvm/jni.h +++ b/make/stub_includes/jvm/jni.h diff --git a/make/resources/stubs_includes/jvm/jni_md.h b/make/stub_includes/jvm/jni_md.h index 44978627..44978627 100644 --- a/make/resources/stubs_includes/jvm/jni_md.h +++ b/make/stub_includes/jvm/jni_md.h diff --git a/make/resources/opencl.h b/make/stub_includes/opencl.h index 28b874e7..28b874e7 100644 --- a/make/resources/opencl.h +++ b/make/stub_includes/opencl.h |