From ee4143d538556329f267a747efdfb3321766ee34 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Sun, 4 Aug 2013 07:48:27 +0300 Subject: [PATCH] ndk-build --- OsmAnd/ndk-build.sh | 23 ++++++++--------------- OsmAnd/old-ndk-build.sh | 25 ------------------------- 2 files changed, 8 insertions(+), 40 deletions(-) delete mode 100755 OsmAnd/old-ndk-build.sh diff --git a/OsmAnd/ndk-build.sh b/OsmAnd/ndk-build.sh index f4caa39dd6..4778fadb0d 100755 --- a/OsmAnd/ndk-build.sh +++ b/OsmAnd/ndk-build.sh @@ -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`) diff --git a/OsmAnd/old-ndk-build.sh b/OsmAnd/old-ndk-build.sh deleted file mode 100755 index 715b49cfb0..0000000000 --- a/OsmAnd/old-ndk-build.sh +++ /dev/null @@ -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`) \ No newline at end of file