diff options
author | Nowar Gu <nowar100@gmail.com> | 2011-07-07 16:21:51 +0800 |
---|---|---|
committer | modcarl <modcarl@gmail.com> | 2011-07-18 21:00:40 +0800 |
commit | 8aaaf655459e6873b676278e9e4fe67ddad66eaf (patch) | |
tree | 1331bae9c17958f7af3c1217289151d607491fdb | |
parent | 60ac93921d8cb55932acd762a0ba40c593212b83 (diff) | |
download | gdk-8aaaf655459e6873b676278e9e4fe67ddad66eaf.tar.gz |
Keep NDK building system away from Makefile since annoying two-pass make process.
-rw-r--r-- | build/core/build-local.mk | 10 | ||||
-rwxr-xr-x | gdk-build | 19 |
2 files changed, 19 insertions, 10 deletions
diff --git a/build/core/build-local.mk b/build/core/build-local.mk index b68eb98..7ed3001 100644 --- a/build/core/build-local.mk +++ b/build/core/build-local.mk @@ -89,13 +89,3 @@ include $(BUILD_SYSTEM)/add-application.mk # Build it include $(BUILD_SYSTEM)/build-all.mk - - -# -# Transfer the control to NDK -# -ifndef NDK_ROOT - $(info Android GDK: You must specify NDK_ROOT.) - $(error Abort.) -endif -include $(NDK_ROOT)/build/core/build-local.mk @@ -37,6 +37,22 @@ # cd ndk # ./ndk-build -C <project-path> # + +if [ $# -lt 1 ]; then + echo "Usage: $0 --ndk-root=<where> ..." + echo + exit 1 +fi + +if [ `echo $1 | awk -F '--' '{print $1}' | awk -F '=' '{print $1}' != "ndk-root"` ]; then + echo "Usage: $0 --ndk-root=<where> ..." + echo + exit 1 +fi + +NDK_ROOT=`echo $1 | awk -F '--' '{print $2}' | awk -F '=' '{print $2}'` +shift 1 + PROGDIR=`dirname $0` PROGDIR=`cd $PROGDIR && pwd` @@ -87,3 +103,6 @@ if [ "$OSTYPE" = "cygwin" ] ; then fi $GNUMAKE -f $PROGDIR/build/core/build-local.mk "$@" + +# Transfer the control power to NDK +$GNUMAKE -f $NDK_ROOT/build/core/build-local.mk "$@" |