diff options
Diffstat (limited to 'obsolete.make-nb/build.xml')
-rw-r--r-- | obsolete.make-nb/build.xml | 719 |
1 files changed, 719 insertions, 0 deletions
diff --git a/obsolete.make-nb/build.xml b/obsolete.make-nb/build.xml new file mode 100644 index 00000000..6a68b086 --- /dev/null +++ b/obsolete.make-nb/build.xml @@ -0,0 +1,719 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- JOCL's main build file--> +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir="." default="default" name="JOCL"> + + <description>Builds, tests, and runs the project JOCL.</description> + + <property file="${user.home}/jocl.properties"/> + + <import file="nbproject/build-impl.xml"/> + + <property name="rootrel.build" value="build"/> + <property name="gluegen.root" value="../gluegen" /> + <property name="jogl.root" value="../jogl" /> + + <property name="etc.build.dir" value="${basedir}/etc/build" /> + <property name="headers.dest" value="${basedir}/resources/includes/CL" /> + + <property name="jocl.build.number" value="manual" /> + <property name="jocl.build.branch" value="master" /> + <property name="jocl.build.commit" value="manual" /> + + <!-- Pull in GlueGen cpptasks build file --> + <import file="${gluegen.root}/make/gluegen-cpptasks.xml" /> + <import file="${gluegen.root}/make/jogamp-env.xml" /> + <import file="${gluegen.root}/make/jogamp-archivetasks.xml" /> + <import file="${gluegen.root}/make/jogamp-androidtasks.xml" /> + + <condition property="build.archiveon" value="true"> + <isset property="c.dont.compile"/> + </condition> + + <target name="-pre-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}-b${jocl.build.number}-${version.timestamp}" /> + <property name="jocl.version.plus" value="${jogamp.version.base}-${jocl.build.branch}-b${jocl.build.number}-${jocl.build.commit}-${version.timestamp}" /> + <property name="archive.zip.name" value="jocl-${jocl.version}-${os.and.arch}"/> + + <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}"/> + </target> + + <!-- overwrites default target - watch out when build-impl.xml changes --> + <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project"> + <property file="nbproject/configs/${config}.properties"/> + <property file="nbproject/project.properties"/> + + <property name="build.dir.abs" location="${build.dir}"/> <!-- absolute path --> + + <copy file="${basedir}/manifest_template.mf" tofile="${build.dir.abs}/manifest.mf"> + <filterset> + <filter token="SPEC_VERSION" value="${jogamp.version.base}"/> + <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="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/> + </filterset> + </copy> + </target> + + <!-- -post-init is after all properties are imported --> + <target name="-post-init" depends="jogamp.env.init,gluegen.cpptasks.detect.os"> + </target> + + <target name="-pre-compile" depends="detect-jdk,prepare-jdk5-build,prepare-jdk7-build,generate-binding"/> + + <target name="detect-jdk"> + <condition property="enable.jdk7.features"> + <or> + <equals arg1="1.7" arg2="${javac.source}"/> + <equals arg1="1.8" arg2="${javac.source}"/> + </or> + </condition> + </target> + + <target name="prepare-jdk5-build" if="${enable.jdk7.features}"> + + <echo message="JDK7 features enabled"/> + + <copy file="${basedir}/src/com/jogamp/common/AutoCloseable.jtemplate" + tofile="${basedir}/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="prepare-jdk7-build" unless="${enable.jdk7.features}"> + + <echo message="JDK7 features dissabled"/> + + <copy file="${basedir}/src/com/jogamp/common/AutoCloseable.jtemplate" + tofile="${basedir}/gensrc/java/com/jogamp/common/AutoCloseable.java" overwrite="true"> + </copy> + + </target> + + <target name="generate-binding" depends="prepare-build,preprocess-headers" unless="dont-generate"> + + <path id="gluegen.classpath"> + <pathelement location="${file.reference.gluegen.jar}" /> + <pathelement location="${antlr.jar}" /> + </path> + + <taskdef name="gluegen" classname="com.jogamp.gluegen.ant.GlueGenTask" classpathref="gluegen.classpath" /> + + <!--OpenCL Impl including OpenGL interoperability--> + <dirset id="jocl.include.path" dir="${basedir}"> + <include name="resources/includes"/> + <include name="resources/stubs_includes/jvm"/> + <include name="resources/stubs_includes/gl"/> + <include name="resources/stubs_includes/common"/> + </dirset> + + <echo message=" - - - generate JOCL binding files - - - "/> + + <echo message="generate CL interfaces..."/> + + <echo message="context..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-context-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="program..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-program-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="kernel..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-kernel-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="queue..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-queue-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="device..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-device-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="memobj..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-mem-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="image..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-image-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="buffer..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-buffer-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="sampler..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-sampler-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="event..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-event-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="platform..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-platform-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="CL..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + dumpCPP="false" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="CLGL..."/> + <gluegen src="resources/opencl.h" + config="resources/clgl-if.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.JavaEmitter" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <echo message="GLImpl..."/> + <gluegen src="resources/opencl.h" + config="resources/cl-impl.cfg" + includeRefid="jocl.include.path" + emitter="com.jogamp.gluegen.procaddress.ProcAddressEmitter" + debug="false"> + <classpath refid="gluegen.classpath" /> + </gluegen> + <echo message=" - - - JOCL binding files generated - - - "/> + + </target> + + <target name="prepare-build" depends="gluegen.properties.load.user"> + + <property name="headers.orig" value="${basedir}/resources/includes/CL_orig" /> + + <!--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="-post-compile" depends="c.compile.default" /> + + <target name="-pre-jar"> + </target> + + <target name="-post-jar" depends="jar.natives,android.package,tag.build,create-all-jnlps,build-archive"/> + + <target name="create-all-jnlps"> + <!-- for local testing --> + <property name="jocl.jnlp.codebase" value="http://localhost/deployment/test"/> + <property name="gluegen.jnlp.codebase" value="http://localhost/deployment/test"/> + + <copy file="jnlp-files/jocl.jnlp" tofile="${build.dir}/jocl.jnlp"> + <filterchain> + <replacestring from="JOCL_CODEBASE_TAG" to="${jocl.jnlp.codebase}"/> + <replacestring from="GLUEGEN_CODEBASE_TAG" to="${gluegen.jnlp.codebase}"/> + </filterchain> + </copy> + </target> + + <target name="build-archive" if="build.archiveon"> + <!-- don't know how to get rid of the NetBeans readme file --> + <delete file="${build.dir}/jar/README.TXT"/> + <!-- what is this ? --> + <delete file="${build.dir}/build-jar.properties" /> + + <!-- source zip --> + <zip destfile="${build.dir}/jocl-java-src.zip" level="0"> + <fileset dir="${src.dir}"/> + <fileset dir="${src.java.dir}"/> + <!-- fileset dir="${build.generated.sources.dir}"/--> + </zip> + + <!-- zip distribution --> + <mkdir dir="${build.dir}/${archive.zip.name}"/> + + <copy todir="${build.dir}/${archive.zip.name}" > + <fileset dir="." includes="www/**"/> + <fileset dir="${build.dir}" includes="jar/**"/> + <fileset dir="." includes="jnlp-files/**"/> + <fileset dir="${build.dir}" includes="artifact.properties,jocl-java-src.zip,README,LICENSE"/> + </copy> + + <!-- native files, TODO: remove when no longer needed --> + <copy todir="${build.dir}/${archive.zip.name}/lib" failonerror="false"> + <fileset dir="${basedir}/${rootrel.build}/natives/jocl" excludes="*.xml"/> + </copy> + + <!-- 7z it --> + <archive.7z basedir="${build.dir}" destfile="${build.dir}/${archive.zip.name}.7z" includes="${archive.zip.name}/**"/> + + <delete dir="${build.dir}/${archive.zip.name}"/> + </target> + + <target name="tag.build"> + <copy file="${jogl.root}/${rootrel.build}/artifact.properties" todir="${build.dir}" overwrite="true" failonerror="false"/> + <echo file="${build.dir}/artifact.properties" message="jocl.build.version=${jogamp.version}${line.separator}" append="true" /> + <echo file="${build.dir}/artifact.properties" message="jocl.build.number=${jocl.build.number}${line.separator}" append="true" /> + <echo file="${build.dir}/artifact.properties" message="jocl.build.id=${jocl.build.id}${line.separator}" append="true" /> + <echo file="${build.dir}/artifact.properties" message="jocl.build.branch=${jocl.build.branch}${line.separator}" append="true" /> + <echo file="${build.dir}/artifact.properties" message="jocl.build.commit=${jocl.build.commit}${line.separator}" append="true" /> + </target> + + <target name="jar.natives" unless="c.dont.compile"> + <jar basedir="${natives.jocl.dir}/${namespace}" excludes="*.xml" + destfile="${build.dir}/jar/jocl-natives-${os.and.arch}.jar" + manifest="${build.dir.abs}/manifest.mf" /> + </target> + + <target name="android.package" if="isAndroid"> + <aapt.signed + jarsrcdir="${src.java}" + jarbuilddir="${build.dir}/jar" + jarbasename="jocl" + nativebuilddir="${natives.jocl.dir}/${namespace}" + nativebasename="" + android.abi="${android.abi}" + androidmanifest.path="resources/android/AndroidManifest-jocl.xml" + androidresources.path="resources/android/res-jocl" + jarmanifest.path="${build.dir.abs}/manifest.mf" + version.code="${jogamp.version.int}" + version.name="${jogamp.version}" /> + </target> + + <target name="c.compile.default" depends="gluegen.cpptasks.detect.os, gluegen.cpptasks.detect.compiler, jocl.c.compile, c.rename.lib.mingw" /> + + <target name="jocl.c.compile" depends="c.setup.build" unless="c.dont.compile"> + + <echo message=" - - - compiling JOCL natives - - - "/> + <echo message="${compiler.cfg.id}"/> + <echo message="${linker.cfg.id}"/> + + <mkdir dir="${obj.jocl.dir}/${namespace}" /> + <mkdir dir="${natives.jocl.dir}/${namespace}" /> + + <cc outtype="shared" + objdir="${obj.jocl.dir}/${namespace}" + outfile="${natives.jocl.dir}/${namespace}/${output.lib.name}" + optimize="${c.compiler.optimise}" + debug="${c.compiler.debug}" + multithreaded="true" + exceptions="false" + rtti="false"> + + <fileset dir="gensrc/native" includes="*.c"/> + + <compiler extends="${compiler.cfg.id}" > + + <includepath path="${java.includes.dir}"/> + <includepath path="${java.includes.dir.platform}"/> + + <!-- TODO should we use our own or jogl's GL headers? --> + <includepath path="${basedir}/resources/includes"/> + <!-- + <includepath path="${jogl.root}/make/stub_includes/opengl/GL3"/> + <includepath path="${jogl.root}/make/stub_includes/opengl"/> + --> + + </compiler> + + <linker extends="${linker.cfg.id}"/> + + </cc> + + <echo message=" - - - JOCL natives compiled - - - "/> + + <antcall target="gluegen.cpptasks.striplibs" inheritRefs="true"> + <param name="libdir" value="${natives.jocl.dir}/${namespace}"/> + </antcall> + + </target> + + <!-- official OpenCL headers expect a different layout on mac... + since we want to use the same headers for all platforms we move them a bit around --> + <target name="mac.includepath.hack" if="isOSX"> + <delete dir="${basedir}/resources/includes/OpenCL" quiet="true"/> + <copydir src="${basedir}/resources/includes/CL" dest="${basedir}/resources/includes/OpenCL"/> + </target> + + <target name="c.setup.build" depends="gluegen.cpptasks.configure.compiler, gluegen.cpptasks.declare.compiler, c.configure.default, jocl.configure.compiler, jocl.configure.linker, mac.includepath.hack"> + + <property name="obj.dir" value="${build.dir}/obj"/> + <property name="natives.dir" value="${build.dir}/natives"/> + + <property name="output.lib.name" value="jocl"/> + <property name="obj.jocl.dir" value="${obj.dir}/${output.lib.name}"/> + <property name="natives.jocl.dir" value="${build.dir}/natives/${output.lib.name}"/> + + <property name="c.compiler.optimise" value="none"/> + <property name="c.compiler.debug" value="false"/> + <property name="namespace" value=""/> + + </target> + + <!-- compiler configuration --> + <target name="jocl.configure.compiler"> + <!-- a hackish way on Solaris10 w/ gcc in 'sfw' + to make mmintrin.h, pmmintrin.h and xmmintrin.h visible --> + + <compiler id="compiler.cfg.solaris.jocl.x86" extends="compiler.cfg.solaris"> + <compilerarg value="-I/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/install-tools/include" /> + </compiler> + + <compiler id="compiler.cfg.solaris.jocl.sparc" extends="compiler.cfg.solaris"> + <!-- dunno .. need to fix, if we ever compile on Solaris/sparcv9 --> + <compilerarg value="-I/usr/sfw/lib/gcc/sparc-pc-solaris2.10/3.4.3/install-tools/include" /> + </compiler> + + <compiler id="compiler.cfg.solaris.jocl.sparcv9" extends="compiler.cfg.solaris.sparcv9"> + <!-- dunno .. need to fix, if we ever compile on Solaris/sparcv9 --> + <compilerarg value="-I/usr/sfw/lib/gcc/sparc-pc-solaris2.10/3.4.3/install-tools/include" /> + </compiler> + + <compiler id="compiler.cfg.solaris.jocl.amd64" extends="compiler.cfg.solaris.amd64"> + <compilerarg value="-I/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/install-tools/include" /> + </compiler> + + </target> + + <!-- linker configuration --> + <target name="jocl.configure.linker"> + + <linker id="linker.cfg.linux.jocl" extends="linker.cfg.linux"> + <syslibset dir="/usr/lib" libs="OpenCL" if="static.binding" unless="opencl.lib32.dir"/> + <syslibset dir="${opencl.lib32.dir}" libs="OpenCL" if="opencl.lib32.dir"/> + </linker> + + <linker id="linker.cfg.linux.x86.jocl" extends="linker.cfg.linux.x86"> + <syslibset dir="/usr/lib" libs="OpenCL" if="static.binding" unless="opencl.lib32.dir"/> + <syslibset dir="${opencl.lib32.dir}" libs="OpenCL" if="opencl.lib32.dir"/> + </linker> + + <linker id="linker.cfg.linux.amd64.jocl" extends="linker.cfg.linux.amd64" > + <syslibset dir="/usr/lib" libs="OpenCL" if="static.binding" unless="opencl.lib64.dir"/> + <syslibset dir="${opencl.lib64.dir}" libs="OpenCL" if="opencl.lib64.dir"/> + </linker> + + <linker id="linker.cfg.linux.armv6.jocl" extends="linker.cfg.linux.armv6"> + <syslibset dir="/usr/lib" libs="OpenCL" if="static.binding" unless="opencl.libarmv6.dir"/> + <syslibset dir="${opencl.libarmv6.dir}" libs="OpenCL" if="opencl.libarmv6.dir"/> + </linker> + + <linker id="linker.cfg.win32.mingw.jocl" extends="linker.cfg.win32.mingw"> + <linkerarg value="-Wl,--kill-at" /> <!-- remove @ from function names --> + <syslibset dir="${opencl.lib32.dir}" libs="OpenCL" if="static.binding"/> + </linker> + + <linker id="linker.cfg.win64.mingw.jocl" extends="linker.cfg.win64.mingw"> + <linkerarg value="-Wl,--kill-at" /> <!-- remove @ from function names --> + <syslibset dir="${opencl.lib64.dir}" libs="OpenCL" if="static.binding"/> + </linker> + + <linker id="linker.cfg.macosx.jocl" extends="linker.cfg.macosx"> + <linkerarg value="-framework OpenCL" if="static.binding"/> + </linker> + + </target> + + <!-- configure for current platform --> + <target name="c.configure.default" depends="c.configure.os" /> + <target name="c.configure.os" depends="c.configure.win, c.configure.linux, c.configure.macosx, c.configure.solaris" /> + <target name="c.configure.win" depends="c.configure.win.mingw32, c.configure.win.mingw64" if="isWindows" /> + <target name="c.configure.linux" depends="c.configure.linux.x86, c.configure.linux.amd64, c.configure.linux.armv6" if="isLinux" /> + <target name="c.configure.solaris" depends="c.configure.solaris.x86, c.configure.solaris.sparc, c.configure.solaris.sparcv9, c.configure.solaris.amd64" if="isSolaris" /> + + <target name="c.configure.win.mingw32" if="isMingW32"> + <echo message="Win.Ming32W" /> + <property name="compiler.cfg.id" value="${compiler.cfg.id.base}" /> + <property name="linker.cfg.id" value="linker.cfg.win32.mingw.jocl" /> + </target> + <target name="c.configure.win.mingw64" if="isMingW64"> + <echo message="Win.Ming64W" /> + <property name="compiler.cfg.id" value="${compiler.cfg.id.base}" /> + <property name="linker.cfg.id" value="linker.cfg.win64.mingw.jocl" /> + </target> + <target name="c.configure.linux.x86" if="isLinuxX86"> + <echo message="Linux.x86" /> + <property name="compiler.cfg.id" value="${compiler.cfg.id.base}" /> + <property name="linker.cfg.id" value="linker.cfg.linux.x86.jocl" /> + </target> + <target name="c.configure.linux.amd64" if="isLinuxAMD64"> + <echo message="Linux.AMD64" /> + <property name="compiler.cfg.id" value="${compiler.cfg.id.base}" /> + <property name="linker.cfg.id" value="linker.cfg.linux.amd64.jocl" /> + </target> + <target name="c.configure.linux.armv6" if="isLinuxARMv6"> + <echo message="Linux.ARMv6" /> + <property name="compiler.cfg.id" value="${compiler.cfg.id.base}" /> + <property name="linker.cfg.id" value="linker.cfg.linux.armv6.jocl" /> + </target> + + <target name="c.configure.solaris.x86" if="isSolarisX86"> + <echo message="SolarisX86" /> + <property name="compiler.cfg.id" value="compiler.cfg.solaris.jocl.x86" /> + <property name="linker.cfg.id" value="linker.cfg.solaris" /> + </target> + + <target name="c.configure.solaris.sparc" if="isSolarisSparc"> + <echo message="SolarisSparc" /> + <property name="compiler.cfg.id" value="compiler.cfg.solaris.jocl.sparc" /> + <property name="linker.cfg.id" value="linker.cfg.solaris" /> + </target> + + <target name="c.configure.solaris.sparcv9" if="isSolarisSparcv9"> + <echo message="SolarisSparcv9" /> + <property name="compiler.cfg.id" value="compiler.cfg.solaris.jocl.sparcv9" /> + <property name="linker.cfg.id" value="linker.cfg.solaris.sparcv9" /> + </target> + + <target name="c.configure.solaris.amd64" if="isSolarisAMD64"> + <echo message="SolarisAMD64" /> + <property name="compiler.cfg.id" value="compiler.cfg.solaris.jocl.amd64" /> + <property name="linker.cfg.id" value="linker.cfg.solaris.amd64" /> + </target> + + <target name="c.configure.macosx" if="isOSX"> + <echo message="MacOS" /> + <property name="compiler.cfg.id" value="${compiler.cfg.id.base}" /> + <property name="linker.cfg.id" value="linker.cfg.macosx.jocl" /> + </target> + + <target name="-post-clean"> + <delete dir="gensrc"/> + <delete dir="${etc.build.dir}"/> + <delete dir="${headers.dest}"/> + </target> + + <target name="update-headers" depends="prepare-build"> + + <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-headers" depends="prepare-build"> + + <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> + + <!--cut and paste from gluegen --> + <target name="c.rename.lib.mingw" if="isMingW"> + <!-- FIXME: this is a hack; the cpptask should have an option to change the + suffix or at least understand the override from .so to .dll --> + <move file="${natives.jocl.dir}/${namespace}/libjocl.so" tofile="${natives.jocl.dir}/${namespace}/jocl.dll" /> + </target> + + <target name="-javadoc-build" depends="init,build-javadoc,archive-javadoc"/> + + <target name="build-javadoc"> + + <mkdir dir="${dist.javadoc.dir}"/> + + <!-- copy gluegen and jogl doc next to the jocl doc for relative linking --> + <copy todir="${build.dir}/javadoc" failonerror="false"> + <fileset dir="${gluegen.root}/build/javadoc"/> + <fileset dir="${jogl.root}/build/javadoc"/> + </copy> + + <copy file="${basedir}/src/com/jogamp/opencl/llb/package.html" + todir="${basedir}/gensrc/java/com/jogamp/opencl/llb" overwrite="true"/> + + <copy file="${basedir}/src/com/jogamp/opencl/llb/gl/package.html" + todir="${basedir}/gensrc/java/com/jogamp/opencl/llb/gl" overwrite="true"/> + + <javadoc author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" + docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" + noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" + private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" + use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" + windowtitle="${javadoc.windowtitle}" overview="${basedir}/src/overview.html" + stylesheetfile="${gluegen.root}/make/doc/javadoc/stylesheet.css"> + + <arg line="${javadoc.additionalparam} -J-Dnativetaglet.mapping=${basedir}/resources/native-taglet.properties"/> + <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.root}/${rootrel.build}/gluegen.jar"/> + + <!-- relative linking between docs --> + <link href="../../gluegen/javadoc"/> + <link href="../../jogl/javadoc"/> + + <link href="http://download.oracle.com/javase/6/docs/api"/> + + <classpath> + <pathelement path="${javac.classpath}"/> + </classpath> + + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> + <filename name="**/*.java"/> + </fileset> + <fileset dir="${src.java.dir}" excludes="${excludes}" includes="${includes}"> + <filename name="**/*.java"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/*.java"/> + </fileset> + + </javadoc> + <copy todir="${dist.javadoc.dir}/resources" overwrite="true"> + <fileset dir="${gluegen.root}/make/doc/javadoc/resources" includes="*" /> + </copy> + + </target> + + <target name="archive-javadoc" if="build.archiveon"> + <archive.7z basedir="${build.dir}/javadoc" destfile="${build.dir}/jocl-javadoc.7z" includes="jocl/*"/> + </target> + + <target name="test-file"> + <property name="javac.includes" value="${test.file}"/> + <property name="test.includes" value="${test.file}"/> + <antcall target="test-single" inheritall="true"/> + </target> + + <!-- overwrites default target - watch out when build-impl.xml changes --> + <target name="-pre-test-run" depends="init" if="have.tests" > + <mkdir dir="${build.test.results.dir}"/> + </target> + + <target name="junit.run.local" unless="isCrosscompilation"> + <j2seproject3:junit testincludes="**/*Test.java"/> + </target> + + <target name="junit.run.remote.ssh" if="isCrosscompilation" unless="isAndroid"> + <copy todir="${build.test.results.dir}" file="${gluegen.root}/make/lib/TEST-com.jogamp.junit.DisabledTest.xml"/> + </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="${build.test.results.dir}" file="${gluegen.root}/make/lib/TEST-com.jogamp.junit.DisabledTest.xml"/> + </target> + + <!-- overwrites default target - watch out when build-impl.xml changes --> + <target name="-do-test-run" depends="init,compile-test,-pre-test-run,junit.run.if.enabled,junit.run.if.disabled" if="have.tests" > + </target> + + <!-- overwrites default target - watch out when build-impl.xml changes --> + <target name="-post-test-run" depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests"> + <archive.7z destfile="${build.dir}/${archive.zip.name}-test-results-${build.node.name}.7z" + basedir="." + includes="${build.test.results.dir}/**" /> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + + <target name="jar-test" depends="jar,test"/> + + <target name="clean-jar-test"> + <antcall target="clean" inheritRefs="true" inheritAll="true"/> + <antcall target="jar-test" inheritRefs="true" inheritAll="true"/> + </target> + +</project> |