From 568b719c1b8b6b04e442336aae9e40009a751ea5 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 29 Nov 2012 10:28:46 +0900 Subject: [PATCH] Make a bunch of improvements to the droid cross scripts. Native versions of qfcc and pak are now built automatically, and the android toolchain now defaults to a more sensible place. Also, the separate pkg-config replacement is no longer necessary. --- .../cross/droid/arm-linux-androideabi-pkg-config | 16 ---------------- tools/cross/droid/cross-configure.sh | 15 +++++++++++++-- tools/cross/droid/cross-make.sh | 12 ++++++++++-- 3 files changed, 23 insertions(+), 20 deletions(-) delete mode 100755 tools/cross/droid/arm-linux-androideabi-pkg-config diff --git a/tools/cross/droid/arm-linux-androideabi-pkg-config b/tools/cross/droid/arm-linux-androideabi-pkg-config deleted file mode 100755 index 84b7ed7cc..000000000 --- a/tools/cross/droid/arm-linux-androideabi-pkg-config +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# This file has no copyright assigned and is placed in the Public Domain. -# No warranty is given. - -# When using the android cross compiler tools, the native Linux -# pkg-config executable works fine as long as the default PKG_CONFIG_LIBDIR -# is overridden. -export PKG_CONFIG_LIBDIR=$ANDROID_SYSROOT - -# Also want to override the standard user defined PKG_CONFIG_PATH with -# a android specific one. -export PKG_CONFIG_PATH=$ANDROID_SYSROOT/usr/local/lib/pkgconfig - -# Now just execute pkg-config with the given command line args. -pkg-config $@ diff --git a/tools/cross/droid/cross-configure.sh b/tools/cross/droid/cross-configure.sh index 9ac1a44d2..150b4946f 100755 --- a/tools/cross/droid/cross-configure.sh +++ b/tools/cross/droid/cross-configure.sh @@ -1,8 +1,19 @@ #!/bin/sh -x -export ANDROID_NDK_ROOT=/home/bill/Downloads/android-ndk-r7 +set -e +mkdir -p native android-ndk-r7 +cd native +../../configure \ + --disable-shared \ + --without-clients \ + --without-servers \ + --with-tools=qfcc,pak +cd ../android-ndk-r7 +export ANDROID_NDK_ROOT=/opt/android-ndk-r7 export ANDROID_SYSROOT=$ANDROID_NDK_ROOT/android-14-toolchain/sysroot +export PKG_CONFIG_LIBDIR=$ANDROID_SYSROOT +export PKG_CONFIG_PATH=$ANDROID_SYSROOT/usr/local/lib/pkgconfig export PATH=$ANDROID_NDK_ROOT/android-14-toolchain/bin:$PATH -../configure \ +../../configure \ --build=x86_64-unknown-linux-gnu \ --with-sysroot=$ANDROID_SYSROOT \ --host=arm-linux-androideabi \ diff --git a/tools/cross/droid/cross-make.sh b/tools/cross/droid/cross-make.sh index 58746f937..c8ec9d762 100755 --- a/tools/cross/droid/cross-make.sh +++ b/tools/cross/droid/cross-make.sh @@ -1,7 +1,15 @@ #!/bin/sh -x -export ANDROID_NDK_ROOT=/home/bill/Downloads/android-ndk-r7 +set -e +if test -d native; then + cd native + make $* + cd ../android-ndk-r7 + ln -fs ../native/tools/qfcc/source/qfcc . + ln -fs ../native/tools/pak/pak . +fi +export ANDROID_NDK_ROOT=/opt/android-ndk-r7 export ANDROID_SYSROOT=$ANDROID_NDK_ROOT/android-14-toolchain/sysroot export PATH=$ANDROID_NDK_ROOT/android-14-toolchain/bin:$PATH -make PAK=pak QFCC=qfcc $* +make PAK='$(top_builddir)/pak' QFCC='$(top_builddir)/qfcc' $*