2014-11-02 17:33:23 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2016-06-07 23:18:49 +01:00
|
|
|
NDK_VER=android-ndk-r11c
|
2016-06-07 23:18:21 +01:00
|
|
|
NDK_ABI_VER=4.9
|
2015-08-01 18:46:32 +01:00
|
|
|
|
|
|
|
if [ $TRAVIS_OS_NAME == "linux" ]
|
|
|
|
then
|
|
|
|
NDK_PLATFORM=linux-x86_64
|
|
|
|
elif [ $TRAVIS_OS_NAME == "osx" ]
|
|
|
|
then
|
|
|
|
NDK_PLATFORM=darwin-x86_64
|
|
|
|
else
|
|
|
|
echo "Unsupported platform $TRAVIS_OS_NAME"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-06-07 23:18:49 +01:00
|
|
|
export FILENAME=$NDK_VER-$NDK_PLATFORM.zip
|
2015-08-01 18:46:32 +01:00
|
|
|
|
2014-11-02 17:33:23 -08:00
|
|
|
(cd '/tmp' \
|
2016-06-07 23:18:49 +01:00
|
|
|
&& wget http://dl.google.com/android/repository/$FILENAME \
|
|
|
|
&& unzip $FILENAME &> /dev/null ) || exit 1
|
2015-08-01 18:46:32 +01:00
|
|
|
unset FILENAME
|
2014-11-02 17:33:23 -08:00
|
|
|
|
2015-08-01 18:46:32 +01:00
|
|
|
export ANDROID_NDK_ROOT="/tmp/$NDK_VER"
|
2016-06-07 23:18:21 +01:00
|
|
|
export TOOLCHAIN_PATH="$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$NDK_ABI_VER/prebuilt/$NDK_PLATFORM/bin"
|
|
|
|
export TOOLCHAIN_NAME="arm-linux-androideabi-$NDK_ABI_VER"
|
2014-11-02 17:33:23 -08:00
|
|
|
export TOOLCHAIN_HOST="arm-linux-androideabi"
|
|
|
|
export TOOLCHAIN_ARCH="arm"
|
|
|
|
|
|
|
|
source ./build.sh
|