diff options
Diffstat (limited to 'make')
-rwxr-xr-x | make/build.xml | 19 | ||||
-rw-r--r-- | make/lib/gluegen.compiler.linux-32bit.xml | 38 | ||||
-rw-r--r-- | make/make.gluegen.all.linux-x86.sh | 1 |
3 files changed, 50 insertions, 8 deletions
diff --git a/make/build.xml b/make/build.xml index 75c28f5..2209d57 100755 --- a/make/build.xml +++ b/make/build.xml @@ -571,26 +571,29 @@ </target> <target name="test" depends="init"> - <mkdir dir="${gluegen.root}/build/test/build/classes"/> - <mkdir dir="${gluegen.root}/build/test/results"/> + <mkdir dir="${build}/test/build/classes"/> + <mkdir dir="${build}/test/results"/> <property name="tools.jar" value="${java.home}/../lib/tools.jar"/> - <javac destdir="${gluegen.root}/build/test/build/classes" failonerror="false" source="1.5" srcdir="${gluegen.root}/test/junit" debug="true" debuglevel="lines,vars,source"> - <classpath path="${gluegen.root}/make/lib/junit-4.5.jar:${gluegen.root}/build/classes:${gluegen.root}/build/test/gensrc/java:${tools.jar}:${ant.core.lib}"/> + <javac destdir="${build}/test/build/classes" failonerror="false" source="1.5" srcdir="${gluegen.root}/test/junit" debug="true" debuglevel="lines,vars,source"> + <classpath path="${gluegen.root}/make/lib/junit-4.5.jar:${build}/classes:${build}/test/gensrc/java:${tools.jar}:${ant.core.lib}"/> </javac> <junit forkmode="once" showoutput="true" fork="true"> - <jvmarg value="-Djava.library.path=${gluegen.root}/build/test/build/natives"/> - <batchtest todir="${gluegen.root}/build/test/results"> - <fileset dir="${gluegen.root}/build/test/build/classes"> + <jvmarg value="-Djava.library.path=${build}/test/build/natives"/> + <jvmarg value="-Drootrel.build=${rootrel.build}"/> + <jvmarg value="-Dos.arch=${os.arch}"/> + <jvmarg value="-Dgluegen.user.compiler.file=${gluegen.user.compiler.file}"/> + <batchtest todir="${build}/test/results"> + <fileset dir="${build}/test/build/classes"> <include name="com/sun/gluegen/**Test*"/> </fileset> <formatter usefile="false" type="brief"/> <formatter usefile="true" type="xml"/> </batchtest> <classpath> - <path path="${gluegen.root}/build/test/build/classes:${gluegen.root}/build/test/gensrc/java:${gluegen.root}/build/classes:${antlr.jar}:${gluegen.root}/make/lib/junit-4.5.jar:${tools.jar}:${ant.core.lib}"/> + <path path="${build}/test/build/classes:${build}/test/gensrc/java:${build}/classes:${antlr.jar}:${gluegen.root}/make/lib/junit-4.5.jar:${tools.jar}:${ant.core.lib}"/> </classpath> </junit> </target> diff --git a/make/lib/gluegen.compiler.linux-32bit.xml b/make/lib/gluegen.compiler.linux-32bit.xml new file mode 100644 index 0000000..ce1554c --- /dev/null +++ b/make/lib/gluegen.compiler.linux-32bit.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + This is an example of how to add custom compiler/linker + arguments for a crosscompiler. + + You can use such files with setting the property 'gluegen.user.compiler.file', ie: + + -Dgluegen.user.compiler.file=`pwd`/lib/gluegen.compiler.xml + + or by having such file in your home directory, ie: + + ~/gluegen.compiler.xml + + In case you want to compile for 32bit on a 64bit machine, + you might also need to set the 'os.arch' to 'x86'. + Example: gluegen/make/make.gluegen.all.linux-x86.sh + + More properties need to be overwritten in case you like to change the + target OS .. and/or components, see gluegen-cpptasks.xml for more information. + --> + +<project name="GlueGen-cpptasks" basedir="." > + +<target name="gluegen.cpptasks.configure.compiler" depends="setup.java.home.dir"> + <compiler id="compiler.cfg.linux" name="gcc"> + <compilerarg value="-m32" /> + <compilerarg value="-Wall" /> + <defineset> + <define name="LINUX" /> + </defineset> + </compiler> + + <linker id="linker.cfg.linux" name="gcc"> + <linkerarg value="-m32" /> + </linker> +</target> +</project> diff --git a/make/make.gluegen.all.linux-x86.sh b/make/make.gluegen.all.linux-x86.sh index 87352c3..b76d85f 100644 --- a/make/make.gluegen.all.linux-x86.sh +++ b/make/make.gluegen.all.linux-x86.sh @@ -10,6 +10,7 @@ # -DisX11=true \ ant \ + -Dgluegen.user.compiler.file=`pwd`/lib/gluegen.compiler.linux-32bit.xml \ -Drootrel.build=build-x86 \ -Dos.arch=x86 \ $* 2>&1 | tee make.gluegen.all.linux-x86.log |