diff options
-rw-r--r-- | build.xml | 82 |
1 files changed, 61 insertions, 21 deletions
@@ -65,7 +65,7 @@ </target> - <target name="-post-compile" depends="c.configure.linux.amd64"> + <target name="-post-compile" depends="c.configure.all"> <property name="obj.dir" value="${build.dir}/obj"/> <property name="natives.dir" value="${build.dir}/natives"/> @@ -108,7 +108,7 @@ </compiler> <linker extends="${linker.cfg.id}"> - + </linker> </cc> @@ -122,31 +122,71 @@ </target> - <target name="c.configure.linux.amd64" depends="gluegen.cpptasks.detect.os,gluegen.cpptasks.setup.compiler"> - <echo message="configure for Linux.AMD64 build" /> + <target name="c.configure.all" depends="gluegen.cpptasks.detect.os, gluegen.cpptasks.setup.compiler, jocl.setup.linker, c.configure.os" /> + <target name="c.configure.os" depends="c.configure.win32, c.configure.linux, c.configure.macosx" /> + <target name="c.configure.win32" depends="c.configure.win32.mingw" if="isWindows" /> + <target name="c.configure.linux" depends="c.configure.linux.x86, c.configure.linux.amd64, c.configure.linux.ia64" if="isLinux" /> -<!-- - <property name="c.linker.ext.path" value="/home/mbien/NVIDIA_GPU_Computing_SDK/OpenCL/common/lib/Linux64"/> ---> + <!-- linker configuration --> + <target name="jocl.setup.linker"> + <linker id="linker.cfg.linux.jocl"> + <syslibset dir="/usr/lib" libs="OpenCL"/> + </linker> <linker id="linker.cfg.linux.amd64.jocl"> <syslibset dir="/usr/lib" libs="OpenCL"/> </linker> - <property name="compiler.cfg.id" value="compiler.cfg.linux" /> - <property name="linker.cfg.id" value="linker.cfg.linux.amd64.jocl" /> + <linker id="linker.cfg.win32.mingw.jocl" extends="linker.cfg.win32.mingw"> + <linkerarg value="-Wl,--kill-at" /> <!-- remove @ from function names --> + <syslibset libs="OpenCL"/> + </linker> + + <linker id="linker.cfg.macosx.jocl"> + <linkerarg value="-framework" /> + <linkerarg value="OpenCL" /> + </linker> + </target> + + <target name="c.configure.win32.mingw" if="isMingW"> + <echo message="Win32.MingW" /> + <property name="compiler.cfg.id" value="compiler.cfg.win32.mingw" /> + <property name="linker.cfg.id" value="linker.cfg.win32.mingw.jocl" /> + </target> + + <target name="c.configure.linux.x86" if="isLinuxX86"> + <echo message="Linux.x86" /> + <property name="compiler.cfg.id" value="compiler.cfg.linux" /> + <property name="linker.cfg.id" value="linker.cfg.linux.jocl" /> + </target> + + <target name="c.configure.linux.amd64" if="isLinuxAMD64"> + <echo message="Linux.AMD64" /> + <property name="compiler.cfg.id" value="compiler.cfg.linux.amd64" /> + <property name="linker.cfg.id" value="linker.cfg.linux.amd64.jocl" /> + </target> + + <target name="c.configure.linux.ia64" if="isLinuxIA64"> + <echo message="Linux.IA64" /> + <property name="compiler.cfg.id" value="compiler.cfg.linux" /> + <property name="linker.cfg.id" value="linker.cfg.linux.jocl" /> + </target> + + <target name="c.configure.macosx" if="isOSX"> + <echo message="MacOS" /> + <property name="compiler.cfg.id" value="compiler.cfg.macosx" /> + <property name="linker.cfg.id" value="linker.cfg.macosx.jocl" /> </target> <target name="-post-clean"> <delete dir="gensrc"/> </target> - <!-- - There exist several targets which are by default empty and which can be - used for execution of your tasks. These targets are usually executed - before and after some main targets. They are: + There exist several targets which are by default empty and which can be + used for execution of your tasks. These targets are usually executed + before and after some main targets. They are: -pre-init: called before initialization of project properties -post-init: called after initialization of project properties @@ -172,12 +212,12 @@ </obfuscate> </target> - For list of available properties check the imported - nbproject/build-impl.xml file. + For list of available properties check the imported + nbproject/build-impl.xml file. Another way to customize the build is by overriding existing main targets. - The targets of interest are: + The targets of interest are: -init-macrodef-javac: defines macro for javac compilation -init-macrodef-junit: defines macro for junit execution @@ -185,7 +225,7 @@ -init-macrodef-java: defines macro for class execution -do-jar-with-manifest: JAR building (if you are using a manifest) -do-jar-without-manifest: JAR building (if you are not using a manifest) - run: execution of project + run: execution of project -javadoc-build: Javadoc generation test-report: JUnit report generation @@ -197,10 +237,10 @@ </exec> </target> - Notice that the overridden target depends on the jar target and not only on - the compile target as the regular run target does. Again, for a list of available + Notice that the overridden target depends on the jar target and not only on + the compile target as the regular run target does. Again, for a list of available properties which you can use, check the target you are overriding in the - nbproject/build-impl.xml file. + nbproject/build-impl.xml file. --> -</project> +</project>
\ No newline at end of file |