2010-01-02 20:10:08 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-02-14 07:15:34 +01:00
|
|
|
set -e -u
|
|
|
|
|
2015-04-07 16:07:24 +02:00
|
|
|
ANDROID_NDK=${ANDROID_NDK:-''}
|
|
|
|
|
2017-01-18 17:33:49 +01:00
|
|
|
if [ ! -d jni ]; then
|
|
|
|
echo "no jni directory; please run from root of source tree"
|
2012-02-14 07:15:34 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
2010-01-02 20:10:08 +01:00
|
|
|
|
2015-04-07 16:07:24 +02:00
|
|
|
if [ -z "$ANDROID_NDK" ]; then
|
|
|
|
if which ndk-build >/dev/null; then
|
|
|
|
ANDROID_NDK=$(dirname $(which ndk-build))
|
|
|
|
else
|
|
|
|
echo -n "ANDROID_NDK not set... "
|
|
|
|
echo "NDK not found; install and set ANDROID_NDK to point to it"
|
|
|
|
exit 1
|
|
|
|
fi
|
2010-01-02 20:10:08 +01:00
|
|
|
fi
|
|
|
|
|
2015-04-07 16:07:24 +02:00
|
|
|
${ANDROID_NDK}/ndk-build $*
|
2010-01-02 20:10:08 +01:00
|
|
|
|
|
|
|
echo "$0 done"
|