diff options
author | Sven Gothel <[email protected]> | 2013-01-31 17:08:53 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-01-31 17:08:53 +0100 |
commit | 034a6d264385e89e289713cb7f43a7020d6d3c46 (patch) | |
tree | 5f9a11db3633c076e2bc57af98a5e983ecc0e3c9 | |
parent | 6e9315c3141ceb325e79f10459f4379dfdedf93e (diff) |
Build Cleanup for Android, Misc changes ..
- Add 'c.build.openal.soft.android' task
using GCC_VERSION -> ANDROID_TOOLCHAIN_VERSION
NDK_ROOT -> ANDROID_NDK
PATH_VANILLA -> PATH
- Copy openal-soft lib to ${rootrel.build}/obj,
to be picked up by jar and appt archiving tasks
- Android build script:
- Bump to GCC_VERSION 4.7
- Add PATH_VANILLA, i.e. PATH before adding cross-compile tools 'gcc'
- Sound3DTest: Fix package name
-rwxr-xr-x | make/build.xml | 28 | ||||
-rwxr-xr-x | make/scripts/make.joal.all.android-armv6-cross.sh | 18 | ||||
-rw-r--r-- | make/scripts/tests.sh | 4 | ||||
-rw-r--r-- | src/test/com/jogamp/openal/test/manual/Sound3DTest.java | 2 |
4 files changed, 37 insertions, 15 deletions
diff --git a/make/build.xml b/make/build.xml index 996bbdf..c6f482f 100755 --- a/make/build.xml +++ b/make/build.xml @@ -435,24 +435,44 @@ <jar destfile="${build}/joal-natives-${os.and.arch}.jar"> <fileset dir="../${rootrel.build}/obj"> <include name="*joal.${native.library.suffix}" /> + <include name="*openal.${native.library.suffix}" /> </fileset> <fileset dir="lib/${os.and.arch}" erroronmissingdir="false"> <include name="*.${native.library.suffix}" /> </fileset> - <fileset dir="${build}/openal-soft" erroronmissingdir="false"> - <include name="*.${native.library.suffix}" /> - </fileset> </jar> </target> - <target name="c.build.openal.soft" depends="init, gluegen.cpptasks.detect.os, gluegen.cpptasks.setup.compiler"> + <target name="c.build.openal.soft.android" if="isAndroid"> <mkdir dir="${build}/openal-soft" /> <exec dir="${build}/openal-soft" executable="cmake" logError="true" failonerror="false" failifexecutionfails="false"> + <env key="PATH" value="${env.PATH_VANILLA}"/> + <env key="ANDROID_TOOLCHAIN_VERSION" value="${env.GCC_VERSION}"/> + <env key="ANDROID_NDK" value="${env.NDK_ROOT}"/> <arg value="../../openal-soft"/> + <arg value="-DCMAKE_TOOLCHAIN_FILE=../../openal-soft/cmake/toolchain.android.cmake"/> + <arg value="-DANDROID_API_LEVEL=${android.version}"/> </exec> <exec dir="${build}/openal-soft" executable="make" logError="true" failonerror="false" failifexecutionfails="false" /> </target> + <target name="c.build.openal.soft.default" unless="isAndroid"> + <mkdir dir="${build}/openal-soft" /> + <exec dir="${build}/openal-soft" executable="cmake" logError="true" failonerror="false" failifexecutionfails="false"> + <arg value="../../openal-soft"/> + </exec> + <exec dir="${build}/openal-soft" executable="make" logError="true" failonerror="false" failifexecutionfails="false" /> + </target> + + <target name="c.build.openal.soft" + depends="init, gluegen.cpptasks.detect.os, gluegen.cpptasks.setup.compiler, c.build.openal.soft.default, c.build.openal.soft.android"> + <copy todir="../${rootrel.build}/obj" failonerror="false"> + <fileset dir="${build}/openal-soft" erroronmissingdir="false"> + <include name="*openal.${native.library.suffix}" /> + </fileset> + </copy> + </target> + <!-- ================================================================== --> <!-- - Build the joal.jar file. diff --git a/make/scripts/make.joal.all.android-armv6-cross.sh b/make/scripts/make.joal.all.android-armv6-cross.sh index ffc8786..7822d14 100755 --- a/make/scripts/make.joal.all.android-armv6-cross.sh +++ b/make/scripts/make.joal.all.android-armv6-cross.sh @@ -30,14 +30,14 @@ if [ -z "$NDK_ROOT" ] ; then elif [ -e /opt/android-ndk ] ; then NDK_ROOT=/opt/android-ndk # - # Specific android-ndk-r7b + # Specific android-ndk-r8d # - elif [ -e /usr/local/android-ndk-r7b ] ; then - NDK_ROOT=/usr/local/android-ndk-r7b - elif [ -e /opt-linux-x86/android-ndk-r7b ] ; then - NDK_ROOT=/opt-linux-x86/android-ndk-r7b - elif [ -e /opt/android-ndk-r7b ] ; then - NDK_ROOT=/opt/android-ndk-r7b + elif [ -e /usr/local/android-ndk-r8d ] ; then + NDK_ROOT=/usr/local/android-ndk-r8d + elif [ -e /opt-linux-x86/android-ndk-r8d ] ; then + NDK_ROOT=/opt-linux-x86/android-ndk-r8d + elif [ -e /opt/android-ndk-r8d ] ; then + NDK_ROOT=/opt/android-ndk-r8d else echo NDK_ROOT is not specified and does not exist in default locations exit 1 @@ -70,7 +70,8 @@ export SOURCE_LEVEL=1.6 export TARGET_LEVEL=1.6 export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar -export GCC_VERSION=4.4.3 +#export GCC_VERSION=4.4.3 +export GCC_VERSION=4.7 HOST_ARCH=linux-x86 export TARGET_TRIPLE=arm-linux-androideabi @@ -78,6 +79,7 @@ export NDK_TOOLCHAIN_ROOT=$NDK_ROOT/toolchains/${TARGET_TRIPLE}-${GCC_VERSION}/p export TARGET_PLATFORM_ROOT=${NDK_ROOT}/platforms/android-${ANDROID_VERSION}/arch-arm # Need to add toolchain bins to the PATH. +export PATH_VANILLA=$PATH export PATH="$NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin:$ANDROID_HOME/platform-tools:$PATH" export GLUEGEN_CPPTASKS_FILE=`pwd`/../../gluegen/make/lib/gluegen-cpptasks-android-armv6.xml diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index e7c4189..db2bc59 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -86,5 +86,5 @@ function testnormal() { #testnormal com.jogamp.openal.test.manual.OpenALTest $* -#testnormal com.jogamp.openal.test.manual.Sound3DTest $* -testnormal com.jogamp.openal.test.junit.ALExtLoopbackDeviceSOFTTest $* +testnormal com.jogamp.openal.test.manual.Sound3DTest $* +#testnormal com.jogamp.openal.test.junit.ALExtLoopbackDeviceSOFTTest $* diff --git a/src/test/com/jogamp/openal/test/manual/Sound3DTest.java b/src/test/com/jogamp/openal/test/manual/Sound3DTest.java index 55bf28a..6b975fb 100644 --- a/src/test/com/jogamp/openal/test/manual/Sound3DTest.java +++ b/src/test/com/jogamp/openal/test/manual/Sound3DTest.java @@ -1,4 +1,4 @@ -package com.jogamp.openal; +package com.jogamp.openal.test.manual; /** * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. |