summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-02-24 04:35:53 +0100
committerSven Gothel <[email protected]>2012-02-24 04:35:53 +0100
commita17170a3ec4ed338d902eaaa3b17e9dbb69b6374 (patch)
tree02f256d42cabb7c1537801add878cf87c11170b9
parent9520a52d504cc6219ca5027e4bde4b8280463879 (diff)
Exposing custom gluegen-cpptask.file for crosscompilation presets, adding gluegen-cpptasks-linux-armv7.xml
Env: GLUEGEN_CPPTASKS_FILE -> property: gluegen-cpptasks.file
-rw-r--r--make/build-test.xml8
-rwxr-xr-xmake/gluegen-cpptasks-base.xml13
-rwxr-xr-xmake/gluegen-cpptasks.xml12
-rw-r--r--make/lib/gluegen-cpptasks-linux-armv7.xml35
-rwxr-xr-xmake/scripts/make.gluegen.all.linux-armv7-cross.sh11
5 files changed, 63 insertions, 16 deletions
diff --git a/make/build-test.xml b/make/build-test.xml
index 0a8a14f..56531df 100644
--- a/make/build-test.xml
+++ b/make/build-test.xml
@@ -268,8 +268,8 @@ ${line.separator}
<exec dir="." executable="sh" logError="true" failonerror="true" failifexecutionfails="true">
<arg line='-x -c "
chmod 0755 ${build_t}/targetcommand.sh ;
- scp ${build_t}/targetcommand.sh ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/targetcommand.sh ;
- ssh -x ${env.TARGET_UID}@${env.TARGET_IP} ${env.TARGET_ROOT}/targetcommand.sh ;
+ scp ${build_t}/targetcommand.sh ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/gluegen/make/targetcommand.sh ;
+ ssh -x ${env.TARGET_UID}@${env.TARGET_IP} ${env.TARGET_ROOT}/gluegen/make/targetcommand.sh ;
scp -pr ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/gluegen/make/${results}/* ${results}/ "'/>
</exec>
</target>
@@ -330,8 +330,8 @@ ${line.separator}
<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}/targetcommand.sh ;
- adb shell ${env.TARGET_ROOT}/targetcommand.sh ;
+ adb push ${build_t}/targetcommand.sh ${env.TARGET_ROOT}/gluegen/make/targetcommand.sh ;
+ adb shell ${env.TARGET_ROOT}/gluegen/make/targetcommand.sh ;
adb pull ${env.TARGET_ROOT}/gluegen/make/${results}/ ${results}/ "'/>
</exec>
</target>
diff --git a/make/gluegen-cpptasks-base.xml b/make/gluegen-cpptasks-base.xml
index fb721dd..a475c16 100755
--- a/make/gluegen-cpptasks-base.xml
+++ b/make/gluegen-cpptasks-base.xml
@@ -192,6 +192,17 @@
</condition>
</target>
+ <!-- Custom target which can be overwritten
+ by a custom file set in property 'gluegen-cpptasks.file'
+ or environment var 'GLUEGEN_CPPTASKS_FILE'
+
+ See 'lib/gluegen-cpptasks-linux-armv7.xml' which sets OS and ARCH
+ for crosscompilation.
+ -->
+ <target name="gluegen.cpptasks.detect.os.custom">
+ <echo message="gluegen.cpptasks.detect.os.custom: NOP done"/>
+ </target>
+
<!-- Detect OS and compiler configuration -->
<target name="gluegen.cpptasks.detect.os.1" depends="gluegen.cpptasks.initialize" unless="gluegen.cpptasks.detected.os">
<condition property="is64Bit">
@@ -623,7 +634,7 @@
<echo message="os and arch: ${os.and.arch}" />
</target>
- <target name="gluegen.cpptasks.detect.os" depends="gluegen.properties.load.user,gluegen.cpptasks.detect.os.1,gluegen.cpptasks.detect.os.2">
+ <target name="gluegen.cpptasks.detect.os" depends="gluegen.properties.load.user,gluegen.cpptasks.detect.os.custom,gluegen.cpptasks.detect.os.1,gluegen.cpptasks.detect.os.2">
<property name="gluegen.cpptasks.detected.os" value="true" />
<property name="gluegen.cpptasks.detected.os.2" value="true" />
diff --git a/make/gluegen-cpptasks.xml b/make/gluegen-cpptasks.xml
index f4278d4..70270c4 100755
--- a/make/gluegen-cpptasks.xml
+++ b/make/gluegen-cpptasks.xml
@@ -26,15 +26,19 @@
<!--typedef resource="net/sf/antcontrib/cpptasks/antlib.xml" classpath="${gluegen.root}/make/lib/cpptasks.jar;${gluegen.root}/make/lib/CppTasksGCCNamespaceHack.jar"/-->
<typedef resource="net/sf/antcontrib/cpptasks/antlib.xml" classpath="${gluegen.root}/make/lib/cpptasks.jar"/>
- <condition property="gluegen-cpptasks.file"
- value="${gluegen.root}/make/gluegen-cpptasks-base.xml">
+ <property environment="env" />
+ <condition property="gluegen-cpptasks.file" value="${env.GLUEGEN_CPPTASKS_FILE}">
<not>
- <isset property="gluegen-cpptask.file" />
+ <equals arg1="${env.GLUEGEN_CPPTASKS_FILE}" arg2="$${env.GLUEGEN_CPPTASKS_FILE}" casesensitive="true" />
</not>
</condition>
-
+ <property name="gluegen-cpptasks.file" value="${gluegen.root}/make/gluegen-cpptasks-base.xml" /> <!-- default value -->
<property name="gluegen-cpptasks.file.abs-path" location="${gluegen-cpptasks.file}" />
+ <echo message="GLUEGEN_CPPTASKS_FILE ${env.GLUEGEN_CPPTASKS_FILE}"/>
+ <echo message="gluegen-cpptasks.file ${gluegen-cpptasks.file}"/>
+ <echo message="gluegen-cpptasks.file.abs-path ${gluegen-cpptasks.file.abs-path}"/>
+
<!--
<echo message="gluegen-cpptasks.xml: gluegen.root ${gluegen.root}"/>
<echo message="gluegen-cpptasks.xml: gluegen-cpptasks.file ${gluegen-cpptasks.file} -> ${gluegen-cpptasks.file.abs-path}"/>
diff --git a/make/lib/gluegen-cpptasks-linux-armv7.xml b/make/lib/gluegen-cpptasks-linux-armv7.xml
new file mode 100644
index 0000000..09c5f9f
--- /dev/null
+++ b/make/lib/gluegen-cpptasks-linux-armv7.xml
@@ -0,0 +1,35 @@
+<?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-armv7" 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="true" />
+
+ <echo message="gluegen.cpptasks.detect.os.custom: GLUEGEN_CPPTASKS_FILE 'gluegen-cpptasks-linux-armv7' done"/>
+</target>
+
+<import file="../gluegen-cpptasks-base.xml" optional="false" />
+
+</project>
+
+
diff --git a/make/scripts/make.gluegen.all.linux-armv7-cross.sh b/make/scripts/make.gluegen.all.linux-armv7-cross.sh
index 3d44f35..53e81b4 100755
--- a/make/scripts/make.gluegen.all.linux-armv7-cross.sh
+++ b/make/scripts/make.gluegen.all.linux-armv7-cross.sh
@@ -28,15 +28,12 @@ export TARGET_ANT_HOME=/usr/share/ant
export TARGET_PLATFORM_LIBS=/opt-linux-armv7-eabi/lib
export TARGET_JAVA_LIBS=/opt-linux-armv7-eabi/jre/lib/arm
+export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv7.xml"
+
+export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode"
+
ant \
-Drootrel.build=build-linux-armv7 \
- -Dgluegen.cpptasks.detected.os=true \
- -DisUnix=true \
- -DisLinux=true \
- -DisLinuxARMv7=true \
- -DisX11=true \
- -DjvmDataModel.arg="-Djnlp.no.jvm.data.model.set=true" \
- -DisCrosscompilation=true \
$* 2>&1 | tee make.gluegen.all.linux-armv7-cross.log