ndk-build

This commit is contained in:
Alexey Pelykh 2013-08-04 07:48:27 +03:00
parent dbcd77a557
commit ee4143d538
2 changed files with 8 additions and 40 deletions

View file

@ -1,8 +1,5 @@
#!/bin/bash
SCRIPT_LOC="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
NAME=$(basename $(dirname "${BASH_SOURCE[0]}") )
if [ ! -d "$ANDROID_SDK" ]; then
echo "ANDROID_SDK is not set"
exit
@ -11,19 +8,15 @@ if [ ! -d "$ANDROID_NDK" ]; then
echo "ANDROID_NDK is not set"
exit
fi
export ANDROID_SDK_ROOT=$ANDROID_SDK
export ANDROID_NDK_ROOT=$ANDROID_NDK
export ANDROID_NDK_TOOLCHAIN_VERSION=4.7
if [ -z "$OSMAND_X86_ONLY" ] && [ -z "$OSMAND_ARM_ONLY" ] && [ -z "$OSMAND_ARMv5_ONLY" ] && [ -z "$OSMAND_ARMv7a_ONLY" ] && [ -z "$OSMAND_MIPS_ONLY" ]; then
export BUILD_ALL=1
echo "BUILD_ALL set to true"
SCRIPT_LOC="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -z "$OSMAND_ARCHITECTURES_SET" ]; then
OSMAND_ARCHITECTURES_SET=(x86 mips arm armv5 armv7 armv7-neon)
export OSMAND_ARCHITECTURES_SET
fi
if [ -d "$SCRIPT_LOC/../../core/avian/" ]; then
export BUILD_ONLY_OLD_LIB=1
fi
"$SCRIPT_LOC/../../core/android-configure.sh"
OSMAND_ANDROID_EXTERNAL_DEPENDENCIES=(expat freetype gdal giflib glm glsl-optimizer harfbuzz jpeg libpng protobuf qtbase-android skia)
"$SCRIPT_LOC/../core/externals/configure.sh" ${OSMAND_ANDROID_EXTERNAL_DEPENDENCIES[*]}
"$SCRIPT_LOC/../core/externals/build.sh" ${OSMAND_ANDROID_EXTERNAL_DEPENDENCIES[*]}
(cd "$SCRIPT_LOC" && "$ANDROID_NDK/ndk-build" -j`nproc`)

View file

@ -1,25 +0,0 @@
#!/bin/bash
SCRIPT_LOC="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
NAME=$(basename $(dirname "${BASH_SOURCE[0]}") )
if [ ! -d "$ANDROID_SDK" ]; then
echo "ANDROID_SDK is not set"
exit
fi
if [ ! -d "$ANDROID_NDK" ]; then
echo "ANDROID_NDK is not set"
exit
fi
export ANDROID_SDK_ROOT=$ANDROID_SDK
export ANDROID_NDK_ROOT=$ANDROID_NDK
export ANDROID_NDK_TOOLCHAIN_VERSION=4.7
if [ -z "$OSMAND_X86_ONLY" ] && [ -z "$OSMAND_ARM_ONLY" ] && [ -z "$OSMAND_ARMv5_ONLY" ] && [ -z "$OSMAND_ARMv7a_ONLY" ] && [ -z "$OSMAND_MIPS_ONLY" ]; then
BUILD_ALL=1
echo "BUILD_ALL set to true"
fi
export BUILD_ONLY_OLD_LIB=1
"$SCRIPT_LOC/../../core/externals/configure.sh"
(cd "$SCRIPT_LOC" && "$ANDROID_NDK/ndk-build" -j`nproc`)