Clean ndk build

This commit is contained in:
Victor Shcherb 2018-09-30 20:50:14 +02:00
parent 490d533fdf
commit abd4e45d8f
2 changed files with 10 additions and 18 deletions

View file

@ -1,4 +1,3 @@
# APP_STL := gnustl_shared
APP_STL := c++_shared
APP_CPPFLAGS := -std=c++11 -fexceptions -frtti
APP_SHORT_COMMANDS := true
@ -6,9 +5,6 @@ APP_SHORT_COMMANDS := true
# Specify least supported Android platform version
APP_PLATFORM := android-14
# NDK_TOOLCHAIN_VERSION := 4.7
# NDK_TOOLCHAIN_VERSION := 4.9
# NDK_TOOLCHAIN_VERSION := 4.8
NDK_TOOLCHAIN_VERSION := clang
APP_ABI := x86 armeabi-v7a arm64-v8a
ifdef ARMV7_ONLY

View file

@ -4,23 +4,19 @@ SCRIPT_LOC="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
NAME=$(basename $(dirname "${BASH_SOURCE[0]}") )
if [ -d "$ANDROID_HOME" ]; then
# for backwards compatbility
export ANDROID_SDK=$ANDROID_HOME
else
echo "ANDROID_HOME is not set, trying ANDROID_SDK:"
if [ -d "$ANDROID_SDK" ]; then
export ANDROID_HOME=$ANDROID_SDK
else
echo "ANDROID_SDK is also not set"
exit
fi
export ANDROID_SDK_ROOT=$ANDROID_HOME
fi
if [ ! -d "$ANDROID_NDK" ]; then
if [ -d "$ANDROID_NDK" ]; then
export ANDROID_NDK_ROOT=$ANDROID_NDK
fi
if [ ! -d "$ANDROID_SDK_ROOT" ]; then
echo "ANDROID_SDK is not set"
exit
fi
if [ ! -d "$ANDROID_NDK_ROOT" ]; then
echo "ANDROID_NDK is not set"
exit
fi
export ANDROID_SDK_ROOT=$ANDROID_HOME
export ANDROID_NDK_ROOT=$ANDROID_NDK
#export ANDROID_NDK_TOOLCHAIN_VERSION=4.7
export BUILD_ONLY_OLD_LIB=1
"$SCRIPT_LOC/../../core-legacy/externals/configure.sh"
(cd "$SCRIPT_LOC" && "$ANDROID_NDK/ndk-build" -j2)
(cd "$SCRIPT_LOC" && "$ANDROID_NDK_ROOT/ndk-build" -j2)