From 4f28cab5ce5ee3c456219433c6a5965ff8c5ac07 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Thu, 22 Dec 2011 12:08:50 +0300 Subject: [PATCH] [android] Build armeabi and armeabi-v7a simultaneously for the project - Also added Production configuration support --- android/jni/Android.mk | 22 ++++++++++++++++++++-- android/jni/Application.mk | 7 +++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/android/jni/Android.mk b/android/jni/Android.mk index f360107ff2..e222ba4796 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -54,10 +54,28 @@ LOCAL_LDLIBS := -llog -lGLESv1_CM \ LOCAL_LDLIBS += -Wl,--gc-sections +OMIM_CONFIG := release +OMIM_SUBFOLDER := release ifeq ($(NDK_DEBUG),1) - LOCAL_LDLIBS += -L../../omim-android-debug/out/debug + OMIM_CONFIG := debug + OMIM_SUBFOLDER := debug else - LOCAL_LDLIBS += -L../../omim-android-release/out/release + ifeq ($(PRODUCTION),1) + OMIM_CONFIG := production + LOCAL_CFLAGS += -O3 + endif endif +# empty means armv5 +OMIM_ABI := +ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) + OMIM_ABI := -armv7 +else + ifeq ($(TARGET_ARCH_ABI),x86) + OMIM_ABI := -x86 + endif +endif + +LOCAL_LDLIBS += -L../../omim-android-$(OMIM_CONFIG)$(OMIM_ABI)/out/$(OMIM_SUBFOLDER) + include $(BUILD_SHARED_LIBRARY) diff --git a/android/jni/Application.mk b/android/jni/Application.mk index f15083474e..f7dc0371f9 100644 --- a/android/jni/Application.mk +++ b/android/jni/Application.mk @@ -1,5 +1,5 @@ APP_PLATFORM := android-5 -APP_ABI := armeabi +APP_ABI := armeabi armeabi-v7a APP_STL := gnustl_static APP_CFLAGS += -I../3party/boost @@ -9,4 +9,7 @@ ifeq ($(NDK_DEBUG),1) else APP_OPTIM := release APP_CFLAGS += -DRELEASE -D_RELEASE -endif \ No newline at end of file +ifeq ($(PRODUCTION),1) + APP_CFLAGS += -DOMIM_PRODUCTION +endif +endif