From 8e0b520dca357e42182ce0ffcafea62bedf801ef Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 16 Apr 2013 00:28:19 +0200 Subject: [PATCH] Update build --- OsmAnd/jni/Android.mk | 10 ++++++++++ OsmAnd/old-ndk-build.sh | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100755 OsmAnd/old-ndk-build.sh diff --git a/OsmAnd/jni/Android.mk b/OsmAnd/jni/Android.mk index 69c633ee79..361d680d5b 100755 --- a/OsmAnd/jni/Android.mk +++ b/OsmAnd/jni/Android.mk @@ -1,9 +1,19 @@ +ifdef BUILD_ONLY_OLD_LIB +# TODO + OSMAND_MAKEFILES := \ + $(all-subdir-makefiles) \ + $(call my-dir)/../../../jni/Android.mk \ + $(call my-dir)/../../../core/Android.mk \ + $(call all-makefiles-under,$(call my-dir)/../../../core/externals) \ + $(call my-dir)/../../../core/utils/Android.mk +else OSMAND_MAKEFILES := \ $(all-subdir-makefiles) \ $(call my-dir)/../../../jni/Android.mk \ $(call my-dir)/../../../core/Android.mk \ $(call all-makefiles-under,$(call my-dir)/../../../core/externals) \ $(call my-dir)/../../../core/utils/Android.mk +endif # Protect from previous builds ifneq ($(TARGET_ARCH_ABI),armeabi-v7a) diff --git a/OsmAnd/old-ndk-build.sh b/OsmAnd/old-ndk-build.sh new file mode 100755 index 0000000000..305b899bef --- /dev/null +++ b/OsmAnd/old-ndk-build.sh @@ -0,0 +1,23 @@ +#!/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 +(cd "$SCRIPT_LOC" && "$ANDROID_NDK/ndk-build" -j`nproc`) \ No newline at end of file