2010-01-02 19:10:08 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-02-13 22:15:34 -08:00
|
|
|
set -e -u
|
|
|
|
|
2015-04-07 07:07:24 -07:00
|
|
|
ANDROID_NDK=${ANDROID_NDK:-''}
|
|
|
|
|
2017-01-18 08:33:49 -08:00
|
|
|
if [ ! -d jni ]; then
|
|
|
|
echo "no jni directory; please run from root of source tree"
|
2012-02-13 22:15:34 -08:00
|
|
|
exit 1
|
|
|
|
fi
|
2010-01-02 19:10:08 +00:00
|
|
|
|
2015-04-07 07:07:24 -07: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 19:10:08 +00:00
|
|
|
fi
|
|
|
|
|
2015-04-07 07:07:24 -07:00
|
|
|
${ANDROID_NDK}/ndk-build $*
|
2010-01-02 19:10:08 +00:00
|
|
|
|
|
|
|
echo "$0 done"
|