aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-01-25 15:03:04 +0100
committerSven Gothel <[email protected]>2014-01-25 15:03:04 +0100
commitf51d6456ab2196bf8ce7d6b3c7ac6d71e9e0108b (patch)
tree27f793cb02a09b4735b5b379dc9ae18e8df43ee5
parent1bc4f882be2c8129521b1110e52bcda9c232f8f1 (diff)
parent9ecc606bce374ea093c6321f2d4921b5019a0b18 (diff)
Merge remote-tracking branch 'wwalker/bug_884_replace_netbeans_build_with_jogamp_standard_build'
-rw-r--r--.classpath16
-rw-r--r--.externalToolBuilders/jocl-ant.launch9
-rw-r--r--.gitignore4
-rw-r--r--.project2
-rw-r--r--build.xml2
-rw-r--r--make/build-test.xml411
-rw-r--r--make/build.xml897
-rw-r--r--make/joclversion19
-rw-r--r--make/joclversion-test14
-rw-r--r--make/joclversion-test-android14
-rw-r--r--make/resources/android/AndroidManifest-jocl.xml (renamed from resources/android/AndroidManifest-jocl.xml)0
-rw-r--r--make/resources/android/res-jocl/drawable-hdpi/icon.png (renamed from resources/android/res-jocl/drawable-hdpi/icon.png)bin2516 -> 2516 bytes
-rw-r--r--make/resources/android/res-jocl/drawable-ldpi/icon.png (renamed from resources/android/res-jocl/drawable-ldpi/icon.png)bin1172 -> 1172 bytes
-rw-r--r--make/resources/android/res-jocl/drawable-mdpi/icon.png (renamed from resources/android/res-jocl/drawable-mdpi/icon.png)bin1570 -> 1570 bytes
-rw-r--r--make/resources/android/res-jocl/layout/main.xml (renamed from resources/android/res-jocl/layout/main.xml)0
-rw-r--r--make/resources/android/res-jocl/values/strings.xml (renamed from resources/android/res-jocl/values/strings.xml)0
-rw-r--r--make/resources/cl-buffer-if.cfg (renamed from resources/cl-buffer-if.cfg)0
-rw-r--r--make/resources/cl-common.cfg (renamed from resources/cl-common.cfg)0
-rw-r--r--make/resources/cl-context-if.cfg (renamed from resources/cl-context-if.cfg)0
-rw-r--r--make/resources/cl-device-if.cfg (renamed from resources/cl-device-if.cfg)0
-rw-r--r--make/resources/cl-event-if.cfg (renamed from resources/cl-event-if.cfg)0
-rw-r--r--make/resources/cl-if.cfg42
-rw-r--r--make/resources/cl-image-if.cfg (renamed from resources/cl-image-if.cfg)0
-rw-r--r--make/resources/cl-impl.cfg (renamed from resources/cl-impl.cfg)0
-rw-r--r--make/resources/cl-kernel-if.cfg (renamed from resources/cl-kernel-if.cfg)0
-rw-r--r--make/resources/cl-mem-if.cfg (renamed from resources/cl-mem-if.cfg)0
-rw-r--r--make/resources/cl-platform-if.cfg (renamed from resources/cl-platform-if.cfg)0
-rw-r--r--make/resources/cl-program-if.cfg (renamed from resources/cl-program-if.cfg)0
-rw-r--r--make/resources/cl-queue-if.cfg (renamed from resources/cl-queue-if.cfg)0
-rw-r--r--make/resources/cl-sampler-if.cfg (renamed from resources/cl-sampler-if.cfg)0
-rw-r--r--make/resources/clImplCustomCode.c (renamed from resources/clImplCustomCode.c)0
-rw-r--r--make/resources/clImplCustomCode.java (renamed from resources/clImplCustomCode.java)0
-rw-r--r--make/resources/clgl-if.cfg (renamed from resources/clgl-if.cfg)0
-rw-r--r--make/resources/createTagletProps.sh (renamed from resources/createTagletProps.sh)0
-rw-r--r--make/resources/includes/CL_orig/cl.h (renamed from resources/includes/CL_orig/cl.h)0
-rw-r--r--make/resources/includes/CL_orig/cl_ext.h (renamed from resources/includes/CL_orig/cl_ext.h)0
-rw-r--r--make/resources/includes/CL_orig/cl_gl.h (renamed from resources/includes/CL_orig/cl_gl.h)0
-rw-r--r--make/resources/includes/CL_orig/cl_gl_ext.h (renamed from resources/includes/CL_orig/cl_gl_ext.h)0
-rw-r--r--make/resources/includes/CL_orig/cl_platform.h (renamed from resources/includes/CL_orig/cl_platform.h)0
-rw-r--r--make/resources/includes/CL_orig/cl_vendor_ext.h (renamed from resources/includes/CL_orig/cl_vendor_ext.h)0
-rw-r--r--make/resources/includes/GL3/gl3.h (renamed from resources/includes/GL3/gl3.h)0
-rw-r--r--make/resources/includes/GL3/glext.h (renamed from resources/includes/GL3/glext.h)0
-rw-r--r--make/resources/native-taglet.properties (renamed from resources/native-taglet.properties)0
-rw-r--r--make/resources/opencl.h (renamed from resources/opencl.h)0
-rw-r--r--make/resources/stubs_includes/common/stddef.h (renamed from resources/stubs_includes/common/stddef.h)0
-rw-r--r--make/resources/stubs_includes/common/stdint.h (renamed from resources/stubs_includes/common/stdint.h)0
-rw-r--r--make/resources/stubs_includes/gl/gltypes.h (renamed from resources/stubs_includes/gl/gltypes.h)0
-rw-r--r--make/resources/stubs_includes/jvm/jni.h (renamed from resources/stubs_includes/jvm/jni.h)0
-rw-r--r--make/resources/stubs_includes/jvm/jni_md.h (renamed from resources/stubs_includes/jvm/jni_md.h)0
-rw-r--r--resources/cl-if.cfg42
-rw-r--r--test/com/jogamp/opencl/CLCommandQueueTest.java4
-rw-r--r--test/com/jogamp/opencl/util/concurrent/CLMultiContextTest.java3
52 files changed, 1418 insertions, 61 deletions
diff --git a/.classpath b/.classpath
index 78b0819..ce1f300 100644
--- a/.classpath
+++ b/.classpath
@@ -1,11 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="gensrc/java"/>
- <classpathentry kind="src" path="test"/>
+ <classpathentry kind="src" path="src">
+ <attributes>
+ <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="jocl/build/obj"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="build/gensrc/java">
+ <attributes>
+ <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="jocl/build/obj"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="build/test/build/classes" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/gluegen"/>
<classpathentry combineaccessrules="false" kind="src" path="/jogl"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
- <classpathentry kind="output" path="build"/>
+ <classpathentry kind="output" path="build/classes"/>
</classpath>
diff --git a/.externalToolBuilders/jocl-ant.launch b/.externalToolBuilders/jocl-ant.launch
index f6b6cd6..445d387 100644
--- a/.externalToolBuilders/jocl-ant.launch
+++ b/.externalToolBuilders/jocl-ant.launch
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="clean,"/>
-<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS" value="jar,"/>
+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean,"/>
<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jocl"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/jocl/build.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/jocl/make/build.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,clean"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/jocl}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/jocl/make}"/>
</launchConfiguration>
diff --git a/.gitignore b/.gitignore
index 2a23baa..1be4c98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,6 @@
build
dist
-gensrc
-resources/includes/CL
-resources/includes/OpenCL
+make/resources/includes/CL
.idea/workspace.xml
**~
nbproject/private
diff --git a/.project b/.project
index 7059a17..c2cf1c3 100644
--- a/.project
+++ b/.project
@@ -7,7 +7,7 @@
<buildSpec>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
+ <triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
diff --git a/build.xml b/build.xml
index 09f6425..6a68b08 100644
--- a/build.xml
+++ b/build.xml
@@ -39,7 +39,7 @@
<property name="javac.debug" value="${javacdebug}"/>
<property name="javac.source" value="${target.sourcelevel}"/>
<property name="javac.target" value="${target.targetlevel}"/>
- <property name="javac.compilerargs" value="-bootclasspath ${target.rt.jar} -Xlint -g:${javacdebuglevel}"/>
+ <property name="javac.compilerargs" value="-bootclasspath '${target.rt.jar}' -Xlint -g:${javacdebuglevel}"/>
</target>
<!-- overwrites default target - watch out when build-impl.xml changes -->
diff --git a/make/build-test.xml b/make/build-test.xml
new file mode 100644
index 0000000..ae3c93b
--- /dev/null
+++ b/make/build-test.xml
@@ -0,0 +1,411 @@
+<?xml version="1.0"?>
+
+<!--
+* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* -Redistribution of source code must retain the above copyright notice,
+* this list of conditions and the following disclaimer.
+*
+* -Redistribution in binary form must reproduce the above copyright notice,
+* this list of conditions and the following disclaimer in the documentation
+* and/or other materials provided with the distribution.
+*
+* Neither the name of Sun Microsystems, Inc. or the names of contributors may
+* be used to endorse or promote products derived from this software without
+* specific prior written permission.
+*
+* This software is provided "AS IS," without a warranty of any kind.
+* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
+* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+* NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MIDROSYSTEMS, INC. ("SUN") AND ITS
+* LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A
+* RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
+* IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT
+* OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
+* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+* ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* You acknowledge that this software is not designed or intended for use in the
+* design, construction, operation or maintenance of any nuclear facility.
+-->
+
+<project name="JOCLTest" basedir="." default="all">
+
+ <description>JUNIT Tests JOCL</description>
+
+ <property name="gluegen.basename" value="gluegen" /> <!-- if differs, ie jenkins jobname, must be set properly first -->
+ <property name="jocl.basename" value="jocl" /> <!-- if differs, ie jenkins jobname, must be set properly first -->
+ <echo message="gluegen.basename: ${gluegen.basename}"/>
+ <echo message="jocl.basename: ${jocl.basename}"/>
+
+ <property name="ant-contrib.jar" value="${gluegen.root}/make/lib/ant-contrib-1.0b3.jar" />
+
+ <taskdef resource="net/sf/antcontrib/antlib.xml">
+ <classpath> <pathelement location="${ant-contrib.jar}"/> </classpath>
+ </taskdef>
+
+ <import file="${gluegen.root}/make/jogamp-env.xml" />
+ <import file="${gluegen.root}/make/gluegen-cpptasks.xml" />
+
+ <target name="declare.common" depends="jogamp.env.init, gluegen.cpptasks.detect.os">
+ <property name="jocl.version" value="${jogamp.version.base}-${version.timestamp}" />
+
+ <property name="project.root" value=".." />
+ <property name="build" value="${project.root}/${rootrel.build}" />
+
+ <property name="rootrel.src.test" value="test" />
+ <property name="src.test" value="${project.root}/${rootrel.src.test}" />
+
+ <property name="results.test" value="${build}/test/results" />
+ <property name="build.test" value="${build}/test/build" />
+ <property name="obj.test" value="${build.test}/obj"/>
+
+ <property name="classes.test" value="${build.test}/classes" />
+ <property name="classes.test.path" location="${classes.test}"/> <!-- absolute path -->
+
+ <property name="java.dir.test" value="com/jogamp/opencl"/>
+ <property name="java.part.test.all" value="${java.dir.test}/**"/>
+ <property name="java.part.test.android" value="${java.dir.test}/android/**"/>
+ <property name="java.dir.junit" value="${java.dir.test}"/>
+ <property name="java.dir.manual" value="${java.dir.test}/manual"/>
+
+ <property name="gluegen-rt-android.jar" value="${gluegen.build}/gluegen-rt-android.jar" />
+
+ <property name="obj.all.paths" value="${gluegen.build}/obj${path.separator}${jogl.build}/lib${path.separator}${obj}${path.separator}lib/${os.and.arch}"/>
+ <property name="classpath.test" value="${junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl-all.jar}${path.separator}${build}/jocl.jar${path.separator}${build}/jocl-test.jar"/>
+ <property name="classpath.test.remote" value="${junit.jar}${path.separator}${env.TARGET_ANT_HOME}/lib/ant.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit.jar${path.separator}${gluegen-rt.jar}${path.separator}${build}/jocl.jar${path.separator}${build}/jocl-test.jar"/>
+
+ <property name="test.archive.name" value="${archive.name}-test-results-${build.node.name}"/>
+
+ <property name="batchtest.timeout" value="1800000"/> <!-- 30 min -->
+
+ <mkdir dir="${classes.test}"/>
+ </target>
+
+ <target name="test.compile.javase" depends="declare.common" >
+ <javac destdir="${classes.test}"
+ excludes="${java.part.test.android}"
+ fork="yes"
+ includeantruntime="false"
+ srcdir="${src.test}"
+ classpath="${gluegen-rt.jar};${build}/jocl.jar;${junit.jar};${jogl-all.jar}"
+ memoryMaximumSize="${javac.memorymax}"
+ encoding="UTF-8"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}"
+ debug="${javacdebug}" debuglevel="${javacdebuglevel}"/>
+ <copy file="joclversion-test"
+ tofile="${build.test}/manifest-test.mf"
+ overwrite="true">
+ <filterset>
+ <filter token="VERSION" value="${jogamp.version}"/>
+ <filter token="BUILD_VERSION" value="${jocl.version}"/>
+ <filter token="SCM_BRANCH" value="${jocl.build.branch}"/>
+ <filter token="SCM_COMMIT" value="${jocl.build.commit}"/>
+ <filter token="BASEVERSION" value="${jogamp.version.base}"/>
+ </filterset>
+ </copy>
+ <jar manifest="${build.test}/manifest-test.mf" destfile="${build}/jocl-test.jar">
+ <!-- get all class files, but skip any resource files that external tools
+ might have copied into the class directory (otherwise, it's possible
+ to get the same resource file twice in the jar) -->
+ <fileset dir="${classes.test}"
+ includes="${java.part.test.all}"
+ excludes="${java.part.test.android}"/>
+ </jar>
+ </target>
+
+ <target name="test.compile.android" depends="declare.common" if="android-jars.available">
+ <!-- Perform the junit pass Java Android compile -->
+ <javac destdir="${classes.test}"
+ fork="yes"
+ includeAntRuntime="false"
+ classpath="${android.jar};${gluegen-rt-android.jar};${build}/jocl.jar;${junit.jar}"
+ memoryMaximumSize="${javac.memorymax}"
+ encoding="UTF-8"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}"
+ debug="${javacdebug}" debuglevel="${javacdebuglevel}">
+ <src path="${src.test}" />
+ </javac>
+ <copy file="joclversion-test-android"
+ tofile="${build.test}/manifest-test-android.mf"
+ overwrite="true">
+ <filterset>
+ <filter token="VERSION" value="${jogamp.version}"/>
+ <filter token="BUILD_VERSION" value="${jocl.version}"/>
+ <filter token="SCM_BRANCH" value="${jocl.build.branch}"/>
+ <filter token="SCM_COMMIT" value="${jocl.build.commit}"/>
+ <filter token="BASEVERSION" value="${jogamp.version.base}"/>
+ </filterset>
+ </copy>
+ <jar manifest="${build.test}/manifest-test-android.mf" destfile="${build}/jocl-test-android.jar" filesonly="true">
+ <!-- get all class files, but skip any resource files that external tools
+ might have copied into the class directory (otherwise, it's possible
+ to get the same resource file twice in the jar) -->
+ <fileset dir="${classes.test}"
+ includes="${java.part.test.all}"/>
+ </jar>
+ </target>
+
+ <target name="test.package.android" depends="test.compile.android" if="isAndroid">
+ <aapt.signed
+ assetsdir="resources/assets-test"
+ jarsrcdir="${src.test}"
+ jarbuilddir="${build}"
+ jarbasename="jocl-test-android"
+ nativebuilddir="../${rootrel.build}/obj"
+ nativebasename="non-existing"
+ androidmanifest.path="resources/android/AndroidManifest-test.xml"
+ androidresources.path="resources/android/res-test"
+ jarmanifest.path="${build.test}/manifest-test-android.mf"
+ version.code="${jogamp.version.int}"
+ version.name="${jogamp.version}" />
+ </target>
+
+ <target name="test.compile" depends="declare.common" unless="test.compile.skip">
+ <!-- include any resource files that tests may require -->
+ <copy todir="${classes.test}">
+ <fileset dir="${src.test}">
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+ <antcall target="test.compile.javase" inheritRefs="true" inheritAll="true"/>
+ <antcall target="test.package.android" inheritRefs="true" inheritAll="true"/>
+ </target>
+
+ <target name="clean">
+ <delete dir="${build.test}"/>
+ </target>
+
+ <target name="clean.results">
+ <!-- Clean the results -->
+ <delete quiet="true">
+ <fileset dir="${results.test}" includes="**"/>
+ <fileset file="${build}/${test.archive.name}.7z"/>
+ </delete>
+ <mkdir dir="${results.test}"/>
+ </target>
+
+ <target name="junit.run.local" depends="clean.results, test.compile" unless="isCrosscompilation">
+ <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" includeAntRuntime="true">
+ <env key="${system.env.library.path}" path="${obj.all.paths}"/>
+ <jvmarg value="${jvmDataModel.arg}"/>
+ <jvmarg value="-Djava.library.path=${obj.all.paths}"/>
+ <!--
+ <jvmarg value="-Djogamp.debug=all"/>
+ <jvmarg value="-Djogamp.debug.NativeLibrary=true"/>
+ <jvmarg value="-Djogamp.debug.NativeLibrary.Lookup=true"/>
+ <jvmarg value="-Djogamp.debug.ProcAddressHelper=true"/> -->
+ <jvmarg value="-Djocl.debug.Factory"/>
+ <batchtest todir="${results.test}">
+ <fileset dir="${classes.test}">
+ <include name="${java.dir.junit}/**/*Test.class"/>
+ </fileset>
+ <formatter usefile="false" type="plain"/>
+ <formatter usefile="true" type="xml"/>
+ </batchtest>
+ <classpath>
+ <path path="${classpath.test}"/>
+ </classpath>
+ </junit>
+ </target>
+
+ <target name="test.manual.run" depends="clean.results, test.compile">
+ <for param="test.class.path.m" keepgoing="true">
+ <!-- results in absolute path -->
+ <fileset dir="${classes.test}">
+ <include name="${java.dir.manual}/**/*Test.class"/>
+ <exclude name="**/*$$*"/>
+ </fileset>
+ <sequential>
+ <var name="test.class.path" unset="true"/>
+ <property name="test.class.path" basedir="${classes.test}" relative="true" location="@{test.class.path.m}"/>
+ <var name="test.class.fqn" unset="true"/>
+ <pathconvert property="test.class.fqn">
+ <fileset file="${classes.test}${file.separator}${test.class.path}"/>
+ <chainedmapper>
+ <globmapper from="${classes.test.path}${file.separator}*" to="*"/> <!-- rel. -->
+ <packagemapper from="*.class" to="*"/> <!-- FQCN -->
+ </chainedmapper>
+ </pathconvert>
+ <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.log"/>
+ <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/>
+ <apply dir="." executable="${java.home}/bin/java"
+ parallel="false"
+ timeout="${batchtest.timeout}"
+ vmlauncher="false"
+ relative="true"
+ failonerror="false"
+ output="${test.class.result.file}">
+ <env key="${system.env.library.path}" path="${obj.all.paths}"/>
+ <env key="CLASSPATH" value="${classpath.test}"/>
+ <arg line="${jvmDataModel.arg}"/>
+ <arg value="-Djava.library.path=${obj.all.paths}"/>
+ <!--
+ <arg line="-Djogamp.debug=all"/>
+ <arg line="-Djogamp.debug.NativeLibrary=true"/>
+ <arg line="-Djogamp.debug.NativeLibrary.Lookup=true"/>
+ <arg line="-Djogamp.debug.ProcAddressHelper=true"/> -->
+ <arg line="-Djocl.debug.Factory"/>
+ <srcfile/>
+ <mappedresources>
+ <fileset dir="${classes.test}" includes="${test.class.path}"/>
+ <packagemapper from="*.class" to="*"/>
+ </mappedresources>
+ </apply>
+ </sequential>
+ </for>
+ </target>
+
+ <target name="junit.run.remote.ssh" if="isCrosscompilation" unless="isAndroid">
+ <echo message="#! /bin/sh${line.separator}" append="false" file="${build.test}/targetcommand.sh" />
+ <echo message="${line.separator}
+rsync -av --delete --delete-after --delete-excluded \${line.separator}
+ --exclude 'build-x86*/' --exclude 'build-linux-x*/' --exclude 'build-android*/' --exclude 'build-win*/' --exclude 'build-mac*/' \${line.separator}
+ --exclude 'classes/' --exclude 'src/' --exclude '.git/' --exclude '*-java-src.zip' \${line.separator}
+ ${env.HOST_UID}@${env.HOST_IP}::${env.HOST_RSYNC_ROOT}/${jocl.basename} ${env.TARGET_ROOT} ${line.separator}
+cd ${env.TARGET_ROOT}/${jocl.basename}/${env.NODE_LABEL}/make ${line.separator}
+" append="true" file="${build.test}/targetcommand.sh" />
+
+ <for param="test.class.path.m" keepgoing="true">
+ <!-- results in absolute path -->
+ <fileset dir="${classes.test}">
+ <include name="${java.dir.junit}/**/*Test.class"/>
+ <exclude name="**/*$$*"/>
+ </fileset>
+ <sequential>
+ <var name="test.class.path" unset="true"/>
+ <property name="test.class.path" basedir="${classes.test}" relative="true" location="@{test.class.path.m}"/>
+ <var name="test.class.fqn" unset="true"/>
+ <pathconvert property="test.class.fqn">
+ <fileset file="${classes.test}${file.separator}${test.class.path}"/>
+ <chainedmapper>
+ <globmapper from="${classes.test.path}${file.separator}*" to="*"/> <!-- rel. -->
+ <packagemapper from="*.class" to="*"/> <!-- FQCN -->
+ </chainedmapper>
+ </pathconvert>
+ <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.xml"/>
+ <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/>
+ <echo message="${line.separator}
+export DISPLAY=:0.0${line.separator}
+java \${line.separator}
+${junit.run.arg0}\${line.separator}
+${junit.run.arg1}\${line.separator}
+${jvmDataModel.arg}\${line.separator}
+-cp ${classpath.test.remote}\${line.separator}
+org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner \${line.separator}
+${test.class.fqn} \${line.separator}
+filtertrace=true \${line.separator}
+haltOnError=false \${line.separator}
+haltOnFailure=false \${line.separator}
+showoutput=true \${line.separator}
+outputtoformatters=true \${line.separator}
+logfailedtests=true \${line.separator}
+logtestlistenerevents=true \${line.separator}
+formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter \${line.separator}
+formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file} ${line.separator}
+${line.separator}
+" append="true" file="${build.test}/targetcommand.sh" />
+ </sequential>
+ </for>
+ <exec dir="." executable="sh" logError="true" failonerror="true" failifexecutionfails="true">
+ <arg line='-x -c "
+ chmod 0755 ${build.test}/targetcommand.sh ;
+ scp ${build.test}/targetcommand.sh ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/jocl-targetcommand.sh ;
+ ssh -x ${env.TARGET_UID}@${env.TARGET_IP} ${env.TARGET_ROOT}/jocl-targetcommand.sh ;
+ scp -pr ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/${jocl.basename}/${env.NODE_LABEL}/make/${results.test}/* ${results.test}/ "'/>
+ </exec>
+ </target>
+
+ <target name="junit.run.remote.adb" if="isAndroidARMv7">
+ <echo message="#! /system/bin/sh${line.separator}" append="false" file="${build.test}/targetcommand.sh" />
+ <echo message="${line.separator}
+rsync -av --delete --delete-after --delete-excluded \${line.separator}
+ --exclude 'build-x86*/' --exclude 'build-linux*/' --exclude 'build-win*/' --exclude 'build-mac*/' \${line.separator}
+ --exclude 'classes/' --exclude 'src/' --exclude '.git/' --exclude '*-java-src.zip' \${line.separator}
+ ${env.HOST_UID}@${env.HOST_IP}::${env.HOST_RSYNC_ROOT}/${jocl.basename} ${env.TARGET_ROOT} ${line.separator}
+cd ${env.TARGET_ROOT}/${jocl.basename}/${env.NODE_LABEL}/make ${line.separator}
+export ${system.env.library.path}=/system/lib:${env.TARGET_ROOT}/${gluegen.basename}/${rootrel.build}/obj:${env.TARGET_ROOT}/${gluegen.basename}/${rootrel.build}/test/build/natives ${line.separator}
+export BOOTCLASSPATH=/system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar ${line.separator}
+" append="true" file="${build.test}/targetcommand.sh" />
+
+ <for param="test.class.path.m" keepgoing="true">
+ <!-- results in absolute path -->
+ <fileset dir="${build_t.java}">
+ <include name="${test.junit.rel}/**/*Test.class"/>
+ <exclude name="**/*$$*"/>
+ </fileset>
+ <sequential>
+ <var name="test.class.path" unset="true"/>
+ <property name="test.class.path" basedir="${build_t.java}" relative="true" location="@{test.class.path.m}"/>
+ <var name="test.class.fqn" unset="true"/>
+ <pathconvert property="test.class.fqn">
+ <fileset file="${build_t.java}${file.separator}${test.class.path}"/>
+ <chainedmapper>
+ <globmapper from="${build_t.java.path}${file.separator}*" to="*"/> <!-- rel. -->
+ <packagemapper from="*.class" to="*"/> <!-- FQCN -->
+ </chainedmapper>
+ </pathconvert>
+ <var name="test.class.result.file" value="${results}/TEST-${test.class.fqn}.xml"/>
+ <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/>
+ <echo message="${line.separator}
+dalvikvm \${line.separator}
+-Xjnigreflimit:2000 \${line.separator}
+-cp ${junit.run.remote.apks} \${line.separator}
+-Dgluegen.root=${gluegen.root} \${line.separator}
+-Drootrel.build=${rootrel.build} \${line.separator}
+com.android.internal.util.WithFramework \${line.separator}
+org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner \${line.separator}
+${test.class.fqn} \${line.separator}
+filtertrace=true \${line.separator}
+haltOnError=false \${line.separator}
+haltOnFailure=false \${line.separator}
+showoutput=true \${line.separator}
+outputtoformatters=true \${line.separator}
+logfailedtests=true \${line.separator}
+logtestlistenerevents=true \${line.separator}
+formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter \${line.separator}
+formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file} ${line.separator}
+${line.separator}
+" append="true" file="${build_t}/targetcommand.sh" />
+ </sequential>
+ </for>
+ <exec dir="." executable="sh" logError="true" failonerror="true" failifexecutionfails="true">
+ <arg line='-x -c "
+ chmod 0755 ${build_t}/targetcommand.sh ;
+ adb push ${build_t}/targetcommand.sh ${env.TARGET_ROOT}/jocl-targetcommand.sh ;
+ adb shell ${env.TARGET_ROOT}/jocl-targetcommand.sh ;
+ adb pull ${env.TARGET_ROOT}/${jocl.basename}/${env.NODE_LABEL}/make/${results}/ ${results}/ "'/>
+ </exec>
+ </target>
+
+ <target name="junit.run.tests" depends="junit.run.local, junit.run.remote.ssh"/>
+
+ <target name="junit.run.if.enabled" unless="junit.is.disabled">
+ <antcall target="junit.run.tests" inheritRefs="true" inheritAll="true"/>
+ </target>
+ <target name="junit.run.if.disabled" if="junit.is.disabled">
+ <copy todir="${results.test}" file="${gluegen.root}/make/lib/TEST-com.jogamp.junit.DisabledTest.xml"/>
+ </target>
+
+ <target name="junit.run" depends="declare.common, junit.run.if.enabled, junit.run.if.disabled">
+ <antcall target="test-zip-archive" inheritRefs="true" inheritAll="true"/>
+ </target>
+
+ <target name="test.auto.run" depends="junit.run"/>
+
+ <!-- updates / create the test results zip file -->
+ <target name="test-zip-archive" depends="declare.common">
+ <archive.7z destfile="${build}/${test.archive.name}.7z"
+ basedir="${results.test}"
+ includes="**" />
+ </target>
+
+</project>
diff --git a/make/build.xml b/make/build.xml
new file mode 100644
index 0000000..887c257
--- /dev/null
+++ b/make/build.xml
@@ -0,0 +1,897 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - Ant build for JOCL. This build has been tested with ANT 1.8.0. The
+ - optional.jar that contains the optional ANT tasks must be in the ANT
+ - classpath (typically the ant/lib directory).
+ -
+ - A clean download of JOCL is required for this build.
+ -
+ - This build has no dependence on environment variables; the needed
+ - ones (e.g. java.home, ANT_HOME) are all set by the Ant wrapper shell
+ - script, by the virtual machine, or elsewhere. However, on all platforms,
+ - the C compiler and linker should be in the path. All other paths that
+ - need to be set are in host.properties.
+ -
+ - NOTE: because the GlueGen config files have their own relative paths
+ - which cannot be overridden by GlueGen, GlueGen MUST be run from
+ - the "make" directory. This also means that this build.xml MUST
+ - be run from the "make" directory.
+ -
+ - Public targets:
+ - all: (default; autodetects OS and chooses C compiler from jocl.properties)
+ - clean: clean all built
+ - javadoc: create the standard developer Javadoc
+ -
+ - Thanks to Rob Grzywinski and Artur Biesiadowski for the bulk of the
+ - ANT build, including the GlueGen and StaticGLInfo tasks, the building of
+ - the Java generated sources, the first and second phase Java compiles, and
+ - the building of the jar file. Thanks to Alex Radeski for the bulk of the
+ - port to the ant-contrib CPPTask framework. Thanks to Athomas Goldberg for
+ - the original OS detection code.
+ -->
+<project name="JOCL" basedir="." default="all">
+
+ <property name="project.root" value=".." />
+
+ <condition property="rootrel.build" value="build">
+ <not>
+ <isset property="rootrel.build"/>
+ </not>
+ </condition>
+ <property name="build" value="${project.root}/${rootrel.build}" />
+
+ <property name="gluegen.root" value="${project.root}/../gluegen" />
+ <property name="gluegen.build" value="${gluegen.root}/${rootrel.build}" />
+
+ <!-- This is the version of JOCL you are building -->
+ <property name="jocl.build.number" value="manual-build"/>
+ <mkdir dir="${build}" />
+ <exec dir="." executable="git" logError="true" failonerror="false" failifexecutionfails="false"
+ output="${build}/localbranch.raw">
+ <arg line="branch --no-color"/>
+ </exec>
+ <exec dir="." executable="sed" logError="true" failonerror="false" failifexecutionfails="false"
+ outputproperty="jocl.build.branch">
+ <arg line="-e '/^[^*]/d' -e 's/* \(.*\)/\1/' ${build}/localbranch.raw"/>
+ </exec>
+ <property name="jocl.build.branch" value="manual"/> <!-- fallback -->
+ <exec dir="${project.root}" executable="git" logError="true" failonerror="false" failifexecutionfails="false"
+ outputproperty="jocl.build.commit">
+ <arg line="rev-parse HEAD"/>
+ </exec>
+ <property name="jocl.build.commit" value="manual"/> <!-- fallback -->
+
+ <!-- Pull in GlueGen cpptasks build file -->
+ <import file="${gluegen.root}/make/gluegen-cpptasks.xml" />
+ <import file="${gluegen.root}/make/jogamp-archivetasks.xml" />
+ <import file="${gluegen.root}/make/jogamp-androidtasks.xml" />
+ <import file="${gluegen.root}/make/jogamp-env.xml" />
+
+ <!-- ================================================================== -->
+ <!--
+ - Load user properties which override build defaults.
+ -->
+ <target name="load.user.properties">
+ <property name="user.properties.file" value="${user.home}/jocl.properties" />
+ <property file="${user.properties.file}" />
+ <echo message="Loaded ${user.properties.file}. (optionally)" />
+
+ <property file="${user.home}/gluegen.properties" />
+ <echo message="Loaded ${user.home}/gluegen.properties." />
+ </target>
+
+ <!-- ================================================================== -->
+ <!--
+ - Declare all paths and user defined variables.
+ -->
+ <target name="init" depends="jogamp.env.init, gluegen.cpptasks.detect.os">
+
+ <property name="jocl.build.id" value="${version.timestamp}"/>
+ <property name="jocl.version" value="${jogamp.version.base}-${version.timestamp}" />
+
+ <!-- The location and name of the configuration ANT file that will
+ - validate to ensure that all user-define variables are set. -->
+ <property name="validate.user.properties" value="${make}/validate-properties.xml" />
+
+ <!-- GlueGen properties. -->
+ <!-- NOTE that these require a checked-out GlueGen workspace as a -->
+ <!-- sibling of the JOCL workspace. -->
+ <property name="gluegen.make.dir" value="${gluegen.root}/make" />
+ <property name="gluegen.build.xml" value="${gluegen.make.dir}/build.xml" />
+ <property name="gluegen.jar" value="${gluegen.build}/gluegen.jar" />
+ <property name="gluegen-rt.jar" value="${gluegen.build}/gluegen-rt.jar" />
+
+ <property name="jogl.build" value="${project.root}/../jogl/build" />
+ <property name="jogl-all.jar" value="${jogl.build}/jar/jogl-all.jar" />
+
+ <!-- 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>
+
+ <!-- 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
+ instead of "/". -->
+ <property name="rootrel.src" value="src" />
+ <!--property name="rootrel.src.java" value="${rootrel.src}/java" /-->
+ <property name="rootrel.src.java" value="${rootrel.src}" />
+ <!---property name="rootrel.src.c" value="${rootrel.src}/native" /-->
+ <property name="rootrel.src.c" value="resources" />
+ <property name="rootrel.src.generated" value="${rootrel.build}/gensrc" />
+ <property name="rootrel.generated.java" value="${rootrel.src.generated}/classes" />
+ <property name="rootrel.generated.c.jocl" value="${rootrel.src.generated}/native" />
+ <property name="rootrel.obj" value="${rootrel.build}/obj" />
+ <property name="rootrel.obj.jocl" value="${rootrel.obj}/jocl" />
+
+ <!-- The source directories. -->
+ <property name="src" value="${project.root}/${rootrel.src}" />
+ <property name="src.c" value="${project.root}/${rootrel.src.c}" />
+ <property name="src.java" value="${project.root}/${rootrel.src.java}" />
+ <property name="build" value="${project.root}/${rootrel.build}" />
+ <property name="tempdir" value="${project.root}/build-temp" />
+ <mkdir dir="${tempdir}" />
+
+ <!-- The generated source directories. -->
+ <property name="src.generated" value="${build}/gensrc" />
+ <property name="src.generated.java" value="${src.generated}/java" />
+ <property name="src.generated.c" value="${src.generated}/native/jocl" />
+
+ <!-- The compiler output directories. -->
+ <property name="classes" value="${build}/classes" />
+ <property name="obj" value="${project.root}/${rootrel.obj}" />
+ <property name="obj.jocl" value="${project.root}/${rootrel.obj.jocl}" />
+
+ <!-- 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" />
+
+ <!-- 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"/>
+ </dirset>
+ <fileset id="stub.includes.dependencies.fileset.1" dir="${stub.includes.dir}">
+ <include name="includes/CL/**" />
+ <include name="includes/GL3/**" />
+ </fileset>
+ <fileset id="stub.includes.dependencies.fileset.2" file="${gluegen.jar}" />
+ <fileset id="stub.includes.dependencies.fileset.3" dir=".">
+ <include name="*.cfg" />
+ <include name="*.java" />
+ <include name="*.c" />
+ </fileset>
+ <!--property name="stub.includes.gluegen.gg" value="${gluegen.root}/make/stub_includes/gluegen" /-->
+ <property name="stub.includes.gluegen.cc" value="${gluegen.root}/make/stub_includes/platform" />
+
+ <!-- The resulting jocl.jar. -->
+ <property name="jocl.jar" value="${build}/jocl.jar" />
+ <property name="jocl-android.jar" value="${build}/jocl-android.jar" />
+ <property name="jocl-android.apk" value="${build}/jocl-android-${android.abi}.apk" />
+
+ <path id="jocl_all.classpath">
+ <pathelement location="${gluegen-rt.jar}" />
+ <pathelement location="${jocl.jar}" />
+ </path>
+
+ <!-- Create the required output directories. -->
+ <mkdir dir="${src.generated.java}" />
+ <mkdir dir="${src.generated.c}" />
+ <mkdir dir="${classes}" />
+ <mkdir dir="${obj}" />
+ <mkdir dir="${obj.jocl}" />
+
+ <property name="archive.name" value="jocl-${jocl.version}-${os.and.arch}" />
+ <property name="archive" value="${build}/${archive.name}" />
+
+ <condition property="useLinuxARMv6SFOptions">
+ <and>
+ <isset property="isLinuxARMv6"/>
+ <isset property="isAbiEabiGnuArmel"/>
+ <isset property="isCrosscompilation"/>
+ </and>
+ </condition>
+ <condition property="useLinuxARMv6HFOptions">
+ <and>
+ <isset property="isLinuxARMv6"/>
+ <isset property="isAbiEabiGnuArmhf"/>
+ <isset property="isCrosscompilation"/>
+ </and>
+ </condition>
+ <condition property="isCLANG.i386">
+ <and>
+ <isset property="isCLANG"/>
+ <isset property="isI386"/>
+ </and>
+ </condition>
+ <echo message="useLinuxARMv6SFOptions ${useLinuxARMv6SFOptions}" />
+ <echo message="useLinuxARMv6HFOptions ${useLinuxARMv6HFOptions}" />
+ <condition property="enable.jdk7.features">
+ <or>
+ <equals arg1="${target.targetlevel}" arg2="1.7"/>
+ <equals arg1="${target.targetlevel}" arg2="1.8"/>
+ </or>
+ </condition>
+ <echo message="enable.jdk7.features ${enable.jdk7.features}" />
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- GlueGen and BuildStaticGLInfo creation, task setup and Java file generation -->
+ <!--
+ - Build GlueGen
+ -->
+ <target name="build.gluegen" depends="init" unless="common.gluegen.build.done">
+ <property name="common.gluegen.build.done" value="true" />
+
+ <!-- Run the GlueGen build to ensure that the GlueGen ANT task
+ - has been built. -->
+ <ant antfile="${gluegen.build.xml}" dir="${gluegen.make.dir}" target="base.compile" inheritAll="false" />
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Java file generation -->
+ <!--
+ - Check to see whether we need to rebuild the generated sources.
+ -->
+
+ <target name="java.generate.check">
+ <!-- Blow away all target files if any dependencies are violated
+ (the uptodate task doesn't allow arbitrary source and target filesets but should) -->
+ <dependset>
+ <srcfileset refid="stub.includes.dependencies.fileset.1" />
+ <srcfileset refid="stub.includes.dependencies.fileset.2" />
+ <srcfileset refid="stub.includes.dependencies.fileset.3" />
+ <targetfileset dir=".">
+ <include name="${src.generated.java}/**/*.java" />
+ <include name="${src.generated.c}/**/*.c" />
+ </targetfileset>
+ </dependset>
+
+ <!-- Now check for the presence of one well-known file -->
+ <uptodate property="java.generate.skip"
+ targetfile="${src.generated.java}/com/jogamp/opencl/llb/CL.java">
+ <srcfiles refid="stub.includes.dependencies.fileset.1" />
+ <srcfiles refid="stub.includes.dependencies.fileset.2" />
+ <srcfiles refid="stub.includes.dependencies.fileset.3" />
+ </uptodate>
+ </target>
+
+ <target name="java.generate.copy2temp">
+ <copy todir="${tempdir}">
+ <fileset dir="${build}"
+ includes="gensrc/classes/**" />
+ </copy>
+ </target>
+
+ <target name="generate.jdk7.autocloseable" if="${enable.jdk7.features}">
+ <echo message="Generating JDK7+ AutoCloseable"/>
+ <copy file="${project.root}/src/com/jogamp/common/AutoCloseable.jtemplate"
+ tofile="${build}/gensrc/java/com/jogamp/common/AutoCloseable.java" overwrite="true">
+ <filterchain>
+ <replaceregex pattern="/\*extends java.lang.AutoCloseable\*/" replace="extends java.lang.AutoCloseable"/>
+ </filterchain>
+ </copy>
+ </target>
+
+ <target name="generate.jdk6.autocloseable" unless="${enable.jdk7.features}">
+ <echo message="Generating JDK6 AutoCloseable"/>
+ <copy file="${project.root}/src/com/jogamp/common/AutoCloseable.jtemplate"
+ tofile="${build}/gensrc/java/com/jogamp/common/AutoCloseable.java" overwrite="true">
+ </copy>
+ </target>
+
+ <target name="make-build-utilities" depends="init">
+
+ <!--compile build utilities-->
+ <mkdir dir="${etc.build.dir}"/>
+
+ <javac destdir="${etc.build.dir}"
+ classpath="${ant.core.lib}"
+ fork="yes"
+ includeAntRuntime="false"
+ memoryMaximumSize="${javac.memorymax}"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}"
+ debug="${javacdebug}" debuglevel="${javacdebuglevel}">
+ <src path="${basedir}/../etc/src"/>
+ </javac>
+
+ <taskdef name="update-headers" classname="com.jogamp.ant.HeaderFileDownloader" classpath="${etc.build.dir}"/>
+ <taskdef name="uncomment-function-params" classname="com.jogamp.ant.FunctionParamUncommenter" classpath="${etc.build.dir}"/>
+ </target>
+
+ <target name="update-opencl-headers" depends="make-build-utilities">
+ <property name="registry.url" value="http://www.khronos.org/registry/cl/api/1.1/"/>
+
+ <!-- download new headers from OpenCL registry if necessary -->
+ <update-headers header="${headers.orig}/cl.h" url="${registry.url}cl.h"/>
+ <update-headers header="${headers.orig}/cl_gl.h" url="${registry.url}cl_gl.h"/>
+ <update-headers header="${headers.orig}/cl_gl_ext.h" url="${registry.url}cl_gl_ext.h"/>
+ <update-headers header="${headers.orig}/cl_ext.h" url="${registry.url}cl_ext.h"/>
+ <update-headers header="${headers.orig}/cl_platform.h" url="${registry.url}cl_platform.h"/>
+ </target>
+
+ <target name="preprocess-opencl-headers" depends="make-build-utilities">
+ <mkdir dir="${headers.dest}"/>
+
+ <!--uncomment function names in c headers and copy modified files into include path-->
+ <uncomment-function-params src="${headers.orig}/cl.h" dest="${headers.dest}/cl.h"/>
+ <uncomment-function-params src="${headers.orig}/cl_gl.h" dest="${headers.dest}/cl_gl.h"/>
+
+ <!--nothing to uncomment in this headers-->
+ <copy file="${headers.orig}/cl_platform.h" toDir="${headers.dest}" overwrite="true"/>
+ <copy file="${headers.orig}/cl_ext.h" toDir="${headers.dest}" overwrite="true"/>
+ <copy file="${headers.orig}/cl_gl_ext.h" toDir="${headers.dest}" overwrite="true"/>
+ <copy file="${headers.orig}/cl_vendor_ext.h" toDir="${headers.dest}" overwrite="true"/>
+ </target>
+
+ <!--
+ - Setup the generating ANT tasks and use it to generate the Java files
+ - from the C OpenCL headers. This involves setting the taskdef and creating
+ - the classpath reference id then running the task on each header.
+ -->
+ <target name="java.generate" depends="build.gluegen, generate.jdk6.autocloseable, generate.jdk7.autocloseable, java.generate.check, preprocess-opencl-headers" unless="java.generate.skip">
+ <!-- Add the GlueGen task to ANT -->
+ <taskdef name="gluegen" classname="com.jogamp.gluegen.ant.GlueGenTask"
+ classpathref="gluegen.classpath" />
+
+ <!-- Use the GlueGen task to generate the Java files -->
+
+ <echo message="context..."/>
+ <echo message="incl path ${toString:stub.includes.fileset.all}"/>
+ <gluegen src="${stub.includes.opencl}/opencl.h"
+ outputRootDir="${build}"
+ config="${config}/cl-context-if.cfg"
+ includeRefid="stub.includes.fileset.all"
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ dumpCPP="false"
+ debug="false">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+
+ <echo message="program..."/>
+ <gluegen src="${stub.includes.opencl}/opencl.h"
+ outputRootDir="${build}"
+ config="${config}/cl-program-if.cfg"
+ includeRefid="stub.includes.fileset.all"
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ dumpCPP="false"
+ debug="false">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+
+ <echo message="kernel..."/>
+ <gluegen src="${stub.includes.opencl}/opencl.h"
+ outputRootDir="${build}"
+ config="${config}/cl-kernel-if.cfg"
+ includeRefid="stub.includes.fileset.all"
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ dumpCPP="false"
+ debug="false">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+
+ <echo message="queue..."/>
+ <gluegen src="${stub.includes.opencl}/opencl.h"
+ outputRootDir="${build}"
+ config="${config}/cl-queue-if.cfg"
+ includeRefid="stub.includes.fileset.all"
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ dumpCPP="false"
+ debug="false">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+
+ <echo message="device..."/>
+ <gluegen src="${stub.includes.opencl}/opencl.h"
+ outputRootDir="${build}"
+ config="${config}/cl-device-if.cfg"
+ includeRefid="stub.includes.fileset.all"
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ dumpCPP="false"
+ debug="false">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+
+ <echo message="memobj..."/>
+ <gluegen src="${stub.includes.opencl}/opencl.h"
+ outputRootDir="${build}"
+ config="${config}/cl-mem-if.cfg"
+ includeRefid="stub.includes.fileset.all"
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ dumpCPP="false"
+ debug="false">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+
+ <echo message="image..."/>
+ <gluegen src="${stub.includes.opencl}/opencl.h"
+ outputRootDir="${build}"
+ config="${config}/cl-image-if.cfg"
+ includeRefid="stub.includes.fileset.all"
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ dumpCPP="false"
+ debug="false">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+
+ <echo message="buffer..."/>
+ <gluegen src="${stub.includes.opencl}/opencl.h"
+ outputRootDir="${build}"
+ config="${config}/cl-buffer-if.cfg"
+ includeRefid="stub.includes.fileset.all"
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ dumpCPP="false"
+ debug="false">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+
+ <echo message="sampler..."/>
+ <gluegen src="${stub.includes.opencl}/opencl.h"
+ outputRootDir="${build}"
+ config="${config}/cl-sampler-if.cfg"
+ includeRefid="stub.includes.fileset.all"
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ dumpCPP="false"
+ debug="false">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+
+ <echo message="event..."/>
+ <gluegen src="${stub.includes.opencl}/opencl.h"
+ outputRootDir="${build}"
+ config="${config}/cl-event-if.cfg"
+ includeRefid="stub.includes.fileset.all"
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ dumpCPP="false"
+ debug="false">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+
+ <echo message="platform..."/>
+ <gluegen src="${stub.includes.opencl}/opencl.h"
+ outputRootDir="${build}"
+ config="${config}/cl-platform-if.cfg"
+ includeRefid="stub.includes.fileset.all"
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ dumpCPP="false"
+ debug="false">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+
+ <echo message="CL..."/>
+ <gluegen src="${stub.includes.opencl}/opencl.h"
+ outputRootDir="${build}"
+ config="${config}/cl-if.cfg"
+ includeRefid="stub.includes.fileset.all"
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ dumpCPP="false"
+ debug="false">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+
+ <echo message="CLGL..."/>
+ <gluegen src="${stub.includes.opencl}/opencl.h"
+ outputRootDir="${build}"
+ config="${config}/clgl-if.cfg"
+ includeRefid="stub.includes.fileset.all"
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ debug="false">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+
+ <echo message="GLImpl..."/>
+ <gluegen src="${stub.includes.opencl}/opencl.h"
+ outputRootDir="${build}"
+ config="${config}/cl-impl.cfg"
+ includeRefid="stub.includes.fileset.all"
+ emitter="com.jogamp.gluegen.procaddress.ProcAddressEmitter"
+ debug="false">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+
+ <!-- Inform the user that the generators have successfully created
+ - the necessary Java files -->
+ <echo message="" />
+ <echo message="GlueGen has successfully generated files." />
+
+ </target>
+
+ <!-- ================================================================== -->
+ <!--
+ - Compile the original and generated source.
+ -->
+ <target name="java.compile" depends="java.generate">
+ <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.classpath"/>
+ <src path="${src.java}" />
+ <src path="${src.generated.java}" />
+ </javac>
+ </target>
+
+ <!-- ================================================================== -->
+ <!--
+ - Compile the native C code for JOCL.
+ -->
+
+ <target name="rename.mingw.dll" if="isMingW">
+ <move file="${src}" tofile="${dest}" />
+ </target>
+
+ <target name="rename.dylib" if="isOSX">
+ <move file="${src}" tofile="${dest}" />
+ </target>
+
+ <macrodef name="c.build">
+ <attribute name="compiler.cfg.id" />
+ <attribute name="linker.cfg.id" />
+ <attribute name="output.lib.name" />
+ <attribute name="c.compiler.use-jawt" default="false"/>
+ <sequential>
+ <echo message="Output lib name = @{output.lib.name}" />
+
+ <echo message="compiler.cfg.id.base: @{compiler.cfg.id}"/>
+ <echo message="linker.cfg.id.base: @{linker.cfg.id}"/>
+
+ <!-- NOTE: the value of the debug and optimise attributes will not be overridden if already set externally -->
+ <property name="c.compiler.debug" value="false" />
+ <!-- Optimise flags one of { none, size, speed, minimal, full, aggressive, extreme, unsafe } -->
+ <property name="c.compiler.optimise" value="none" />
+
+ <condition property="c.compiler.use-debug">
+ <istrue value="${c.compiler.debug}"/>
+ </condition>
+
+ <patternset id="c.src.files">
+ <include name="${rootrel.generated.c.jocl}/*.c"/>
+ </patternset>
+
+ <echo message="Compiling @{output.lib.name}" />
+
+ <cc outtype="shared"
+ objdir="${obj}"
+ outfile="${obj}/@{output.lib.name}"
+ optimize="${c.compiler.optimise}"
+ debug="${c.compiler.debug}"
+ multithreaded="true"
+ exceptions="false"
+ rtti="false">
+
+ <fileset dir="${project.root}">
+ <patternset refid="c.src.files"/>
+ </fileset>
+
+ <compiler extends="@{compiler.cfg.id}" >
+ <sysincludepath path="${java.includes.dir}"/>
+ <sysincludepath path="${java.includes.dir.platform}"/>
+ <sysincludepath path="${stub.includes.gluegen.cc}"/>
+ <includepath path="resources/includes"/>
+ <!-- This is for the generated headers for handwritten C code -->
+ <includepath path="${src.generated.c}" />
+ <includepath path="${src.c}"/>
+
+ <!-- This must come last to not override real include paths -->
+ <!-- includepath path="stub_includes/macosx" if="isOSX" / -->
+ </compiler>
+
+ <linker extends="@{linker.cfg.id}" />
+ </cc>
+
+ <antcall target="rename.dylib" inheritRefs="true">
+ <param name="src" value="${obj}/lib@{output.lib.name}.dylib" />
+ <param name="dest" value="${obj}/lib@{output.lib.name}.jnilib" />
+ </antcall>
+
+ <antcall target="rename.mingw.dll" inheritRefs="true">
+ <param name="src" value="${obj}/lib@{output.lib.name}.so" />
+ <param name="dest" value="${obj}/@{output.lib.name}.dll" />
+ </antcall>
+ </sequential>
+ </macrodef>
+
+ <target name="c.build.jocl" depends="init, gluegen.cpptasks.detect.os, gluegen.cpptasks.setup.compiler">
+ <echo message="compiler.cfg.id.base: ${compiler.cfg.id.base}"/>
+ <echo message="linker.cfg.id.base: ${linker.cfg.id.base}"/>
+ <c.build compiler.cfg.id="${compiler.cfg.id.base}"
+ output.lib.name="jocl"
+ linker.cfg.id="${linker.cfg.id.base}"/>
+
+ <antcall target="gluegen.cpptasks.striplibs" inheritRefs="true">
+ <param name="libdir" value="../${rootrel.build}/obj"/>
+ </antcall>
+
+ <!-- Create Java Web Start jar file from built file -->
+ <jar destfile="${build}/jocl-natives-${os.and.arch}.jar">
+ <fileset dir="../${rootrel.build}/obj">
+ <include name="*jocl.${native.library.suffix}" />
+ <include name="*soft_oal.${native.library.suffix}" />
+ <include name="*openal.${native.library.suffix}" />
+ <exclude name="*openal*.1*.${native.library.suffix}" />
+ </fileset>
+ </jar>
+ </target>
+
+ <!-- ================================================================== -->
+ <!--
+ - Build the jocl.jar file.
+ -->
+ <target name="jar" depends="init">
+ <!-- Prepare the manifest -->
+ <copy file="joclversion"
+ tofile="tempversion"
+ overwrite="true">
+ <filterset>
+ <filter token="VERSION" value="${jogamp.version}"/>
+ <filter token="BUILD_VERSION" value="${jocl.version}"/>
+ <filter token="SCM_BRANCH" value="${jocl.build.branch}"/>
+ <filter token="SCM_COMMIT" value="${jocl.build.commit}"/>
+ <filter token="BASEVERSION" value="${jogamp.version.base}" />
+ <filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
+ </filterset>
+ </copy>
+
+ <!-- Build the jar excluding any build specific classes. -->
+ <jar manifest="tempversion" destfile="${jocl.jar}">
+ <fileset dir="${classes}">
+ <include name="com/jogamp/common/**" />
+ <include name="com/jogamp/opencl/**" />
+ </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">
+ <aapt.signed
+ jarsrcdir="${src.java}"
+ jarbuilddir="${build}"
+ jarbasename="jocl-android"
+ nativebuilddir="../${rootrel.build}/obj"
+ nativebasename=""
+ android.abi="${android.abi}"
+ androidmanifest.path="resources/android/AndroidManifest-jocl.xml"
+ androidresources.path="resources/android/res-jocl"
+ jarmanifest.path="tempversion"
+ version.code="${jogamp.version.int}"
+ version.name="${jogamp.version}" />
+ </target>
+
+ <!-- ================================================================== -->
+ <!--
+ - Build the Javadocs for the sources.
+ - NOTE: these are not entirely correct as the javadocs targets depend
+ - on the platform specific build targets. To circumvent any
+ - errors, ensure that the source is built first.
+ -->
+ <target name="javadoc" depends="init, javadoc.init, javadoc.public, javadoc.dev, javadoc.zip"/>
+
+ <!-- copies ${gluegen-javadoc.path}/** to ${javadoc.root.path}/gluegen/
+ gluegen-javadoc.path is the parent folder of package-list:
+ gluegen-javadoc.path := build/javadoc/gluegen
+ with build/javadoc/gluegen/javadoc/package-list
+ -->
+ <target name="javadoc.gluegen" depends="init" if="gluegen-javadoc.path">
+ <delete dir="${javadoc.root.path}/gluegen" includeEmptyDirs="true" quiet="true" failonerror="false" />
+ <mkdir dir="${javadoc.root.path}/gluegen" />
+
+ <copy todir="${javadoc.root.path}/gluegen" failonerror="false">
+ <fileset dir="${gluegen-javadoc.path}" includes="**" />
+ </copy>
+ </target>
+
+ <target name="javadoc.init" depends="init">
+ <!-- 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/" /-->
+ <property name="javadoc.link" value="http://docs.oracle.com/javase/6/docs/api/" />
+
+ <!-- Link offline with relative URLs does not work.
+ Link online with relative URLs works,
+ so we have to assume the same relative online folder structure:
+
+ http://jogamp.org/deployment/jogamp-next/javadoc/gluegen/javadoc/
+ http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/
+ http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc_dev/
+ http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc_jogl_spec/
+ http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc_nativewindow_spec/
+
+ gluegen rel URL: ../../gluegen/javadoc
+
+ build structure:
+
+ jogl.root: build/javadoc/jogl/<javadoc-type> (we have javadoc, javadoc_dev and javadoc_jogl_spec, ..)
+ gluegen.root: build/javadoc/gluegen/javadoc
+
+ to match the online gluegen rel URL, we need:
+
+ jogl.root: build/javadoc/gluegen/javadoc
+ -->
+ <property name="gluegen.link" value="../../gluegen/javadoc" />
+ <property name="javadoc.root.path" value="${build}/javadoc" />
+ <property name="javadoc.jocl.public.path" value="${javadoc.root.path}/jocl/javadoc" />
+ <property name="javadoc.jocl.dev.path" value="${javadoc.root.path}/jocl/javadoc_dev" />
+
+ <property name="javadoc.packagenames" value="com.jogamp.openal,com.jogamp.openal.util,com.jogamp.openal.sound3d" />
+ <property name="javadoc.dev.packagenames" value="${javadoc.packagenames},jogamp.openal" />
+
+ <!-- if gluegen-javadoc.path is not set, check in default location,
+ ${gluegen.root}/${rootrel.build}/javadoc/gluegen -->
+ <available file="${gluegen.build}/javadoc/gluegen/javadoc/package-list"
+ type="file"
+ property="gluegen-javadoc.path"
+ value="${gluegen.build}/javadoc/gluegen" />
+ <antcall target="javadoc.gluegen" inheritRefs="true" />
+ </target>
+
+ <target name="javadoc.zip" depends="javadoc.init">
+ <archive.7z destfile="${build}/javadoc.7z"
+ basedir="${javadoc.root.path}"
+ includes="jocl/**" />
+ </target>
+
+ <target name="javadoc.public" depends="javadoc.init">
+ <javadoc packagenames="${javadoc.packagenames}"
+ sourcepath="${src.java};${src.generated.java}"
+ destdir="${javadoc.jocl.public.path}" windowtitle="JOCL API"
+ encoding="UTF-8"
+ source="${target.sourcelevel}"
+ maxmemory="${javac.memorymax}"
+ stylesheetfile="${gluegen.make.dir}/doc/javadoc/stylesheet.css">
+ <classpath refid="jocl_all.classpath"/>
+ <link offline="true" href="${javadoc.link}" packagelistLoc="${gluegen.root}/make/142-packages" />
+ <link offline="false" href="${gluegen.link}" />
+ </javadoc>
+ <copy todir="${javadoc.jocl.public.path}/resources" overwrite="true">
+ <fileset dir="${gluegen.make.dir}/doc/javadoc/resources" includes="*" />
+ </copy>
+ </target>
+
+ <target name="javadoc.dev" depends="javadoc.init">
+ <!-- Build the internal developer Javadoc -->
+ <javadoc packagenames="${javadoc.dev.packagenames},${javadoc.dev.packagenames.platform}"
+ sourcepath="${src.java};${src.generated.java}"
+ destdir="${javadoc.jocl.dev.path}" windowtitle="JOCL API"
+ encoding="UTF-8"
+ source="${target.sourcelevel}"
+ maxmemory="${javac.memorymax}"
+ stylesheetfile="${gluegen.make.dir}/doc/javadoc/stylesheet.css">
+ <classpath refid="jocl_all.classpath"/>
+ <link offline="true" href="${javadoc.link}" packagelistLoc="${gluegen.root}/make/142-packages" />
+ <link offline="false" href="${gluegen.link}" />
+ </javadoc>
+ <copy todir="${javadoc.jocl.dev.path}/resources" overwrite="true">
+ <fileset dir="${gluegen.make.dir}/doc/javadoc/resources" includes="*" />
+ </copy>
+ </target>
+
+ <target name="developer-src-zip" depends="init">
+ <!--delete includeEmptyDirs="true" quiet="true" failonerror="false">
+ <fileset dir="${build}" includes="jocl-java-src.zip" />
+ </delete-->
+ <zip destfile="${build}/jocl-java-src.zip">
+ <fileset dir="${src.java}"/>
+ <fileset dir="${build}/gensrc"/>
+ </zip>
+ </target>
+
+ <!-- Build binary zip archives for developers -->
+ <target name="developer-zip-archive" depends="init,developer-src-zip" if="build.archiveon">
+ <!-- Clean up and create temporary directory -->
+ <delete includeEmptyDirs="true" quiet="true" dir="${archive}" failonerror="false" />
+ <mkdir dir="${archive}" />
+ <copy file="${build}/artifact.properties" todir="${archive}"/>
+ <mkdir dir="${archive}/jar" />
+ <copy todir="${archive}/jar">
+ <fileset dir="${build}" includes="jocl*.jar"/>
+ <fileset dir="${build}" includes="jocl*.apk"/>
+ </copy>
+ <mkdir dir="${archive}/lib" />
+ <copy todir="${archive}/lib">
+ <fileset dir="${build}/obj" includes="*.${native.library.suffix}"/>
+ </copy>
+ <mkdir dir="${archive}/jnlp-files" />
+ <copy todir="${archive}/jnlp-files">
+ <fileset dir="${project.root}/jnlp-files" includes="*" />
+ </copy>
+ <mkdir dir="${archive}/www" />
+ <copy todir="${archive}/www">
+ <fileset dir="${project.root}/www" includes="*" />
+ </copy>
+ <copy file="../README.txt" todir="${archive}"/>
+ <copy file="../LICENSE.txt" todir="${archive}"/>
+ <copy todir="${archive}" file="${build}/jocl-java-src.zip"/>
+ <archive.7z destfile="${build}/${archive.name}.7z"
+ basedir="${build}"
+ includes="${archive.name}/**" />
+ <!-- Clean up after ourselves -->
+ <delete includeEmptyDirs="true" quiet="true" dir="${archive}" failonerror="false" />
+ </target>
+
+ <!-- ================================================================== -->
+ <!--
+ - Clean up all that is built.
+ -->
+ <target name="clean" depends="init">
+ <delete includeEmptyDirs="true" quiet="true">
+ <fileset dir="${build}" />
+ <fileset dir="${tempdir}" />
+ <fileset dir="${javadoc}" />
+ <fileset dir="${javadoc.dev}" />
+ <fileset dir="${headers.dest}" />
+ </delete>
+ <ant antfile="build-test.xml" target="clean"/>
+ </target>
+
+ <!-- ================================================================== -->
+ <!--
+ - Build everything.
+ -->
+ <target name="all" depends="jocl.build, test.compile, tag.build, developer-zip-archive"/>
+
+ <target name="jocl.build" depends="init">
+ <!-- Generate and compile the Java sources. -->
+ <antcall target="java.compile" inheritRefs="true" />
+
+ <!-- Compile the native C sources . -->
+ <antcall target="c.build.jocl" inheritRefs="true" />
+
+ <!-- build the jar/apk -->
+ <antcall target="jar" inheritRefs="true" />
+ </target>
+
+ <target name="tag.build" depends="init">
+ <copy file="${gluegen.build}/artifact.properties" todir="${build}" overwrite="true" failonerror="false"/>
+ <echo message='jocl.build.version=${jogamp.version}${line.separator}' file="${build}/artifact.properties" append="true"/>
+ <echo message='jocl.build.number=${jocl.build.number}${line.separator}' file="${build}/artifact.properties" append="true"/>
+ <echo message='jocl.build.id=${jocl.build.id}${line.separator}' file="${build}/artifact.properties" append="true"/>
+ <echo message='jocl.build.branch=${jocl.build.branch}${line.separator}' file="${build}/artifact.properties" append="true"/>
+ <echo message='jocl.build.commit=${jocl.build.commit}${line.separator}' file="${build}/artifact.properties" append="true"/>
+ </target>
+
+ <!-- ================================================================== -->
+ <!--
+ - unit tests
+ -->
+
+ <target name="test.compile" depends="jocl.build">
+ <ant antfile="build-test.xml" target="test.compile" inheritRefs="true" inheritAll="true"/>
+ </target>
+
+ <target name="test.auto.run" depends="test.compile">
+ <ant antfile="build-test.xml" target="test.auto.run" inheritRefs="true" inheritAll="true"/>
+ </target>
+
+ <target name="junit.run" depends="test.compile">
+ <ant antfile="build-test.xml" target="junit.run" inheritRefs="true" inheritAll="true"/>
+ </target>
+
+ <target name="test.manual.run" depends="test.compile">
+ <ant antfile="build-test.xml" target="test.manual.run" inheritRefs="true" inheritAll="true"/>
+ </target>
+
+</project>
diff --git a/make/joclversion b/make/joclversion
new file mode 100644
index 0000000..ae7239d
--- /dev/null
+++ b/make/joclversion
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Application-Name: Java Bindings for OpenCL
+Specification-Title: Java Bindings for OpenCL API Specification
+Specification-Version: @BASEVERSION@
+Specification-Vendor: JogAmp Community
+Implementation-Title: Java Bindings for OpenCL Runtime Environment
+Implementation-Version: @VERSION@
+Implementation-Build: @BUILD_VERSION@
+Implementation-Branch: @SCM_BRANCH@
+Implementation-Commit: @SCM_COMMIT@
+Implementation-Vendor: JogAmp Community
+Implementation-URL: http://jogamp.org/
+Extension-Name: com.jogamp.opencl
+Implementation-Vendor-Id: com.jogamp
+Trusted-Library: true
+Permissions: all-permissions
+Name: jogamp/opencl/
+Sealed: true
+@JAR_CODEBASE_TAG@
diff --git a/make/joclversion-test b/make/joclversion-test
new file mode 100644
index 0000000..ed11ebe
--- /dev/null
+++ b/make/joclversion-test
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Application-Name: Java Bindings for OpenCL Test
+Specification-Title: Test Java Bindings for OpenCL API Specification
+Specification-Version: @BASEVERSION@
+Specification-Vendor: JogAmp Community
+Implementation-Title: Test Java Bindings for OpenCL Runtime Environment on Android
+Implementation-Version: @VERSION@
+Implementation-Build: @BUILD_VERSION@
+Implementation-Branch: @SCM_BRANCH@
+Implementation-Commit: @SCM_COMMIT@
+Implementation-Vendor: JogAmp Community
+Implementation-URL: http://jogamp.org/
+Extension-Name: com.jogamp.opencl.test
+Implementation-Vendor-Id: com.jogamp
diff --git a/make/joclversion-test-android b/make/joclversion-test-android
new file mode 100644
index 0000000..ed11ebe
--- /dev/null
+++ b/make/joclversion-test-android
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Application-Name: Java Bindings for OpenCL Test
+Specification-Title: Test Java Bindings for OpenCL API Specification
+Specification-Version: @BASEVERSION@
+Specification-Vendor: JogAmp Community
+Implementation-Title: Test Java Bindings for OpenCL Runtime Environment on Android
+Implementation-Version: @VERSION@
+Implementation-Build: @BUILD_VERSION@
+Implementation-Branch: @SCM_BRANCH@
+Implementation-Commit: @SCM_COMMIT@
+Implementation-Vendor: JogAmp Community
+Implementation-URL: http://jogamp.org/
+Extension-Name: com.jogamp.opencl.test
+Implementation-Vendor-Id: com.jogamp
diff --git a/resources/android/AndroidManifest-jocl.xml b/make/resources/android/AndroidManifest-jocl.xml
index 07fff31..07fff31 100644
--- a/resources/android/AndroidManifest-jocl.xml
+++ b/make/resources/android/AndroidManifest-jocl.xml
diff --git a/resources/android/res-jocl/drawable-hdpi/icon.png b/make/resources/android/res-jocl/drawable-hdpi/icon.png
index 2148232..2148232 100644
--- a/resources/android/res-jocl/drawable-hdpi/icon.png
+++ b/make/resources/android/res-jocl/drawable-hdpi/icon.png
Binary files differ
diff --git a/resources/android/res-jocl/drawable-ldpi/icon.png b/make/resources/android/res-jocl/drawable-ldpi/icon.png
index c16211f..c16211f 100644
--- a/resources/android/res-jocl/drawable-ldpi/icon.png
+++ b/make/resources/android/res-jocl/drawable-ldpi/icon.png
Binary files differ
diff --git a/resources/android/res-jocl/drawable-mdpi/icon.png b/make/resources/android/res-jocl/drawable-mdpi/icon.png
index 1c26e3f..1c26e3f 100644
--- a/resources/android/res-jocl/drawable-mdpi/icon.png
+++ b/make/resources/android/res-jocl/drawable-mdpi/icon.png
Binary files differ
diff --git a/resources/android/res-jocl/layout/main.xml b/make/resources/android/res-jocl/layout/main.xml
index 3a5f117..3a5f117 100644
--- a/resources/android/res-jocl/layout/main.xml
+++ b/make/resources/android/res-jocl/layout/main.xml
diff --git a/resources/android/res-jocl/values/strings.xml b/make/resources/android/res-jocl/values/strings.xml
index 2403855..2403855 100644
--- a/resources/android/res-jocl/values/strings.xml
+++ b/make/resources/android/res-jocl/values/strings.xml
diff --git a/resources/cl-buffer-if.cfg b/make/resources/cl-buffer-if.cfg
index 197ef54..197ef54 100644
--- a/resources/cl-buffer-if.cfg
+++ b/make/resources/cl-buffer-if.cfg
diff --git a/resources/cl-common.cfg b/make/resources/cl-common.cfg
index d89643b..d89643b 100644
--- a/resources/cl-common.cfg
+++ b/make/resources/cl-common.cfg
diff --git a/resources/cl-context-if.cfg b/make/resources/cl-context-if.cfg
index 0e9a561..0e9a561 100644
--- a/resources/cl-context-if.cfg
+++ b/make/resources/cl-context-if.cfg
diff --git a/resources/cl-device-if.cfg b/make/resources/cl-device-if.cfg
index a32476c..a32476c 100644
--- a/resources/cl-device-if.cfg
+++ b/make/resources/cl-device-if.cfg
diff --git a/resources/cl-event-if.cfg b/make/resources/cl-event-if.cfg
index 87b55bf..87b55bf 100644
--- a/resources/cl-event-if.cfg
+++ b/make/resources/cl-event-if.cfg
diff --git a/make/resources/cl-if.cfg b/make/resources/cl-if.cfg
new file mode 100644
index 0000000..2078123
--- /dev/null
+++ b/make/resources/cl-if.cfg
@@ -0,0 +1,42 @@
+Include cl-common.cfg
+
+Style InterfaceOnly
+
+ClassJavadoc CL /**
+ClassJavadoc CL * Java bindings to OpenCL, the Open Computing Language.
+ClassJavadoc CL * @author Michael Bien, GlueGen, et al.
+ClassJavadoc CL */
+JavaClass CL
+
+Extends CL CLContextBinding
+Extends CL CLProgramBinding
+Extends CL CLKernelBinding
+Extends CL CLCommandQueueBinding
+Extends CL CLDeviceBinding
+Extends CL CLImageBinding
+Extends CL CLBufferBinding
+Extends CL CLSamplerBinding
+Extends CL CLEventBinding
+Extends CL CLPlatformBinding
+
+ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLContextBinding.java
+ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLProgramBinding.java
+ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLKernelBinding.java
+ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLCommandQueueBinding.java
+ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLDeviceBinding.java
+ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLMemObjBinding.java
+ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLImageBinding.java
+ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLBufferBinding.java
+ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLSamplerBinding.java
+ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLEventBinding.java
+ExtendedInterfaceSymbolsIgnore ../build/gensrc/java/com/jogamp/opencl/llb/CLPlatformBinding.java
+
+#ignore cl-gl interoperability functions. Interface 'CL' is pure OpenCL.
+Ignore CL_GL_.*|cl.*GL.*|.*_GL_.*
+
+Ignore clCreateContext
+Ignore clCreateContextFromType
+Ignore clBuildProgram
+Ignore clEnqueueNativeKernel
+Ignore clSetEventCallback
+Ignore clSetMemObjectDestructorCallback
diff --git a/resources/cl-image-if.cfg b/make/resources/cl-image-if.cfg
index 611d1bf..611d1bf 100644
--- a/resources/cl-image-if.cfg
+++ b/make/resources/cl-image-if.cfg
diff --git a/resources/cl-impl.cfg b/make/resources/cl-impl.cfg
index c2aff89..c2aff89 100644
--- a/resources/cl-impl.cfg
+++ b/make/resources/cl-impl.cfg
diff --git a/resources/cl-kernel-if.cfg b/make/resources/cl-kernel-if.cfg
index be9d6aa..be9d6aa 100644
--- a/resources/cl-kernel-if.cfg
+++ b/make/resources/cl-kernel-if.cfg
diff --git a/resources/cl-mem-if.cfg b/make/resources/cl-mem-if.cfg
index 11c51d1..11c51d1 100644
--- a/resources/cl-mem-if.cfg
+++ b/make/resources/cl-mem-if.cfg
diff --git a/resources/cl-platform-if.cfg b/make/resources/cl-platform-if.cfg
index 1a355f3..1a355f3 100644
--- a/resources/cl-platform-if.cfg
+++ b/make/resources/cl-platform-if.cfg
diff --git a/resources/cl-program-if.cfg b/make/resources/cl-program-if.cfg
index 7b72272..7b72272 100644
--- a/resources/cl-program-if.cfg
+++ b/make/resources/cl-program-if.cfg
diff --git a/resources/cl-queue-if.cfg b/make/resources/cl-queue-if.cfg
index 171b933..171b933 100644
--- a/resources/cl-queue-if.cfg
+++ b/make/resources/cl-queue-if.cfg
diff --git a/resources/cl-sampler-if.cfg b/make/resources/cl-sampler-if.cfg
index 5329b7f..5329b7f 100644
--- a/resources/cl-sampler-if.cfg
+++ b/make/resources/cl-sampler-if.cfg
diff --git a/resources/clImplCustomCode.c b/make/resources/clImplCustomCode.c
index 751f819..751f819 100644
--- a/resources/clImplCustomCode.c
+++ b/make/resources/clImplCustomCode.c
diff --git a/resources/clImplCustomCode.java b/make/resources/clImplCustomCode.java
index bee5342..bee5342 100644
--- a/resources/clImplCustomCode.java
+++ b/make/resources/clImplCustomCode.java
diff --git a/resources/clgl-if.cfg b/make/resources/clgl-if.cfg
index 1671f76..1671f76 100644
--- a/resources/clgl-if.cfg
+++ b/make/resources/clgl-if.cfg
diff --git a/resources/createTagletProps.sh b/make/resources/createTagletProps.sh
index af3312e..af3312e 100644
--- a/resources/createTagletProps.sh
+++ b/make/resources/createTagletProps.sh
diff --git a/resources/includes/CL_orig/cl.h b/make/resources/includes/CL_orig/cl.h
index 4f21afe..4f21afe 100644
--- a/resources/includes/CL_orig/cl.h
+++ b/make/resources/includes/CL_orig/cl.h
diff --git a/resources/includes/CL_orig/cl_ext.h b/make/resources/includes/CL_orig/cl_ext.h
index 7310fd2..7310fd2 100644
--- a/resources/includes/CL_orig/cl_ext.h
+++ b/make/resources/includes/CL_orig/cl_ext.h
diff --git a/resources/includes/CL_orig/cl_gl.h b/make/resources/includes/CL_orig/cl_gl.h
index 3b4fe06..3b4fe06 100644
--- a/resources/includes/CL_orig/cl_gl.h
+++ b/make/resources/includes/CL_orig/cl_gl.h
diff --git a/resources/includes/CL_orig/cl_gl_ext.h b/make/resources/includes/CL_orig/cl_gl_ext.h
index fbf8b32..fbf8b32 100644
--- a/resources/includes/CL_orig/cl_gl_ext.h
+++ b/make/resources/includes/CL_orig/cl_gl_ext.h
diff --git a/resources/includes/CL_orig/cl_platform.h b/make/resources/includes/CL_orig/cl_platform.h
index c8c6d7f..c8c6d7f 100644
--- a/resources/includes/CL_orig/cl_platform.h
+++ b/make/resources/includes/CL_orig/cl_platform.h
diff --git a/resources/includes/CL_orig/cl_vendor_ext.h b/make/resources/includes/CL_orig/cl_vendor_ext.h
index a01a353..a01a353 100644
--- a/resources/includes/CL_orig/cl_vendor_ext.h
+++ b/make/resources/includes/CL_orig/cl_vendor_ext.h
diff --git a/resources/includes/GL3/gl3.h b/make/resources/includes/GL3/gl3.h
index 176ddb1..176ddb1 100644
--- a/resources/includes/GL3/gl3.h
+++ b/make/resources/includes/GL3/gl3.h
diff --git a/resources/includes/GL3/glext.h b/make/resources/includes/GL3/glext.h
index 8e40956..8e40956 100644
--- a/resources/includes/GL3/glext.h
+++ b/make/resources/includes/GL3/glext.h
diff --git a/resources/native-taglet.properties b/make/resources/native-taglet.properties
index 8447778..8447778 100644
--- a/resources/native-taglet.properties
+++ b/make/resources/native-taglet.properties
diff --git a/resources/opencl.h b/make/resources/opencl.h
index 28b874e..28b874e 100644
--- a/resources/opencl.h
+++ b/make/resources/opencl.h
diff --git a/resources/stubs_includes/common/stddef.h b/make/resources/stubs_includes/common/stddef.h
index f6c7207..f6c7207 100644
--- a/resources/stubs_includes/common/stddef.h
+++ b/make/resources/stubs_includes/common/stddef.h
diff --git a/resources/stubs_includes/common/stdint.h b/make/resources/stubs_includes/common/stdint.h
index 4e45660..4e45660 100644
--- a/resources/stubs_includes/common/stdint.h
+++ b/make/resources/stubs_includes/common/stdint.h
diff --git a/resources/stubs_includes/gl/gltypes.h b/make/resources/stubs_includes/gl/gltypes.h
index 3272b72..3272b72 100644
--- a/resources/stubs_includes/gl/gltypes.h
+++ b/make/resources/stubs_includes/gl/gltypes.h
diff --git a/resources/stubs_includes/jvm/jni.h b/make/resources/stubs_includes/jvm/jni.h
index be01d01..be01d01 100644
--- a/resources/stubs_includes/jvm/jni.h
+++ b/make/resources/stubs_includes/jvm/jni.h
diff --git a/resources/stubs_includes/jvm/jni_md.h b/make/resources/stubs_includes/jvm/jni_md.h
index 4497862..4497862 100644
--- a/resources/stubs_includes/jvm/jni_md.h
+++ b/make/resources/stubs_includes/jvm/jni_md.h
diff --git a/resources/cl-if.cfg b/resources/cl-if.cfg
deleted file mode 100644
index d97b3a7..0000000
--- a/resources/cl-if.cfg
+++ /dev/null
@@ -1,42 +0,0 @@
-Include cl-common.cfg
-
-Style InterfaceOnly
-
-ClassJavadoc CL /**
-ClassJavadoc CL * Java bindings to OpenCL, the Open Computing Language.
-ClassJavadoc CL * @author Michael Bien, GlueGen, et al.
-ClassJavadoc CL */
-JavaClass CL
-
-Extends CL CLContextBinding
-Extends CL CLProgramBinding
-Extends CL CLKernelBinding
-Extends CL CLCommandQueueBinding
-Extends CL CLDeviceBinding
-Extends CL CLImageBinding
-Extends CL CLBufferBinding
-Extends CL CLSamplerBinding
-Extends CL CLEventBinding
-Extends CL CLPlatformBinding
-
-ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLContextBinding.java
-ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLProgramBinding.java
-ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLKernelBinding.java
-ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLCommandQueueBinding.java
-ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLDeviceBinding.java
-ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLMemObjBinding.java
-ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLImageBinding.java
-ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLBufferBinding.java
-ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLSamplerBinding.java
-ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLEventBinding.java
-ExtendedInterfaceSymbolsIgnore gensrc/java/com/jogamp/opencl/llb/CLPlatformBinding.java
-
-#ignore cl-gl interoperability functions. Interface 'CL' is pure OpenCL.
-Ignore CL_GL_.*|cl.*GL.*|.*_GL_.*
-
-Ignore clCreateContext
-Ignore clCreateContextFromType
-Ignore clBuildProgram
-Ignore clEnqueueNativeKernel
-Ignore clSetEventCallback
-Ignore clSetMemObjectDestructorCallback
diff --git a/test/com/jogamp/opencl/CLCommandQueueTest.java b/test/com/jogamp/opencl/CLCommandQueueTest.java
index 5768981..a83acda 100644
--- a/test/com/jogamp/opencl/CLCommandQueueTest.java
+++ b/test/com/jogamp/opencl/CLCommandQueueTest.java
@@ -29,7 +29,6 @@
package com.jogamp.opencl;
import org.junit.Rule;
-import org.junit.rules.MethodRule;
import org.junit.rules.Timeout;
import java.util.concurrent.CountDownLatch;
import com.jogamp.opencl.util.MultiQueueBarrier;
@@ -59,9 +58,8 @@ import static com.jogamp.opencl.CLCommandQueue.Mode.*;
*/
public class CLCommandQueueTest {
- @SuppressWarnings("deprecation")
@Rule
- public MethodRule methodTimeout= (MethodRule) new Timeout(20000);
+ public Timeout methodTimeout = new Timeout(20000);
@Test
public void enumsTest() {
diff --git a/test/com/jogamp/opencl/util/concurrent/CLMultiContextTest.java b/test/com/jogamp/opencl/util/concurrent/CLMultiContextTest.java
index 81d3490..818827c 100644
--- a/test/com/jogamp/opencl/util/concurrent/CLMultiContextTest.java
+++ b/test/com/jogamp/opencl/util/concurrent/CLMultiContextTest.java
@@ -16,7 +16,6 @@ import java.nio.IntBuffer;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import org.junit.Rule;
-import org.junit.rules.MethodRule;
import org.junit.rules.Timeout;
import com.jogamp.opencl.util.CLMultiContext;
import java.nio.Buffer;
@@ -34,7 +33,7 @@ import static java.lang.System.*;
public class CLMultiContextTest {
@Rule
- public MethodRule methodTimeout= new Timeout(10000);
+ public Timeout methodTimeout= new Timeout(10000);
@Test
public void createMultiContextTest() {