aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--make/lib/gluegen-cpptasks-linux-armv6hf.xml61
-rwxr-xr-xmake/scripts/make.gluegen.all.linux-armv7hf-cross.sh2
-rwxr-xr-xmake/scripts/make.gluegen.all.linux-armv7hf.sh18
3 files changed, 80 insertions, 1 deletions
diff --git a/make/lib/gluegen-cpptasks-linux-armv6hf.xml b/make/lib/gluegen-cpptasks-linux-armv6hf.xml
new file mode 100644
index 0000000..2b2acb6
--- /dev/null
+++ b/make/lib/gluegen-cpptasks-linux-armv6hf.xml
@@ -0,0 +1,61 @@
+<?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-cpptasks.file', ie:
+
+ -Dgluegen-cpptasks.file=`pwd`/lib/gluegen-cpptasks-linux-32bit.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
+ -->
+
+<project name="GlueGen-cpptasks-linux-armv6hf" basedir="." >
+
+<!-- Set OS and ARCH for crosscompilation compiler configuration -->
+<target name="gluegen.cpptasks.detect.os.custom">
+ <property name="gluegen.cpptasks.detected.os" value="true" />
+ <property name="isUnix" value="true" />
+ <property name="isLinux" value="true" />
+ <property name="isLinuxARMv7" value="true" />
+ <property name="isX11" value="true" />
+ <property name="jvmDataModel.arg" value="-Djnlp.no.jvm.data.model.set=true" />
+ <property name="isCrosscompilation" value="false" />
+ <property name="isAbiEabiGnuArmhf" value="true" />
+ <echo message="gluegen.cpptasks.detect.os.custom: GLUEGEN_CPPTASKS_FILE 'gluegen-cpptasks-linux-armv6hf' done"/>
+</target>
+
+<import file="${gluegen.root.abs-path}/make/gluegen-cpptasks-base.xml" optional="false" />
+
+<target name="gluegen.cpptasks.configure.compiler" depends="setup.java.home.dir">
+ <echo message="Custom forced compiler Linux ARMv6t hard float" />
+
+ <compiler id="compiler.cfg.linux.armv7hf" name="gcc">
+ <defineset>
+ <define name="__unix__"/>
+ <define name="__X11__" if="isX11"/>
+ <define name="_DEBUG" if="c.compiler.use-debug"/>
+ <define name="DEBUG" if="c.compiler.use-debug"/>
+ <define name="NDEBUG" unless="c.compiler.use-debug"/>
+ </defineset>
+ <compilerarg value="-fpic" />
+ <compilerarg value="-march=armv6" />
+ <compilerarg value="-marm" />
+ <compilerarg value="-mfloat-abi=hard" />
+ </compiler>
+
+ <linker id="linker.cfg.linux.armv7hf" name="gcc">
+ <linkerarg value="-fpic" />
+ <linkerarg value="-march=armv6" />
+ <linkerarg value="-marm" />
+ <linkerarg value="-mfloat-abi=hard" />
+ <linkerarg value="-nostdlib" />
+ <linkerarg value="-Bdynamic" />
+ </linker>
+
+</target>
+
+</project>
diff --git a/make/scripts/make.gluegen.all.linux-armv7hf-cross.sh b/make/scripts/make.gluegen.all.linux-armv7hf-cross.sh
index f9b1b54..adc9a7f 100755
--- a/make/scripts/make.gluegen.all.linux-armv7hf-cross.sh
+++ b/make/scripts/make.gluegen.all.linux-armv7hf-cross.sh
@@ -32,7 +32,7 @@ export TARGET_PLATFORM_ROOT=/opt-linux-armv7-armhf
export TARGET_PLATFORM_LIBS=$TARGET_PLATFORM_ROOT/usr/lib
export TARGET_JAVA_LIBS=$TARGET_PLATFORM_ROOT/jre/lib/arm
-export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv7hf.xml"
+export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6hf.xml"
#export JUNIT_DISABLED="true"
export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode"
diff --git a/make/scripts/make.gluegen.all.linux-armv7hf.sh b/make/scripts/make.gluegen.all.linux-armv7hf.sh
new file mode 100755
index 0000000..54fe85a
--- /dev/null
+++ b/make/scripts/make.gluegen.all.linux-armv7hf.sh
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+# -Dc.compiler.debug=true
+# -Dgluegen.cpptasks.detected.os=true \
+# -DisUnix=true \
+# -DisLinux=true \
+# -DisLinuxX86=true \
+# -DisX11=true \
+
+# arm-linux-gnueabihf == armhf triplet
+export TARGET_PLATFORM_LIBS=/usr/lib/arm-linux-gnueabihf
+export TARGET_JAVA_LIBS=/usr/lib/jvm/java-6-openjdk-armhf/jre/lib/arm
+
+export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6hf.xml"
+
+ant \
+ -Drootrel.build=build-linux-armv7hf \
+ $* 2>&1 | tee make.gluegen.all.linux-armv7hf.log