From f185676ef11dd491a06cb90e5f1e49bcc9ca717a Mon Sep 17 00:00:00 2001 From: Trevor Drake Date: Sun, 1 Mar 2015 11:19:19 +0000 Subject: Add Build type check before using NDK. Setting the LOCAL_SDK_VERSION will force the module to use prebuilt libraries which ship as part of the ndk and are found at prebuilts/ndk/current/platforms/android-$(LOCAL_SDK_VERSION) We should only use the ndk prebuilts for unbundled build types, i.e when TARGET_BUILD_APPS is not empty Change-Id: I9014fd25fe358ea4454718f05213950e2c77bad8 --- Android.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Android.mk b/Android.mk index 6b79033..46ee1d2 100644 --- a/Android.mk +++ b/Android.mk @@ -26,9 +26,11 @@ LOCAL_MODULE := libz LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS += -O3 -DUSE_MMAP LOCAL_SRC_FILES := $(zlib_files) +ifneq ($(TARGET_BUILD_APPS),) ifeq ($(TARGET_ARCH),arm) LOCAL_SDK_VERSION := 9 endif +endif LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) include $(BUILD_SHARED_LIBRARY) @@ -39,9 +41,11 @@ LOCAL_MODULE := libz LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS += -O3 -DUSE_MMAP LOCAL_SRC_FILES := $(zlib_files) +ifneq ($(TARGET_BUILD_APPS),) ifeq ($(TARGET_ARCH),arm) LOCAL_SDK_VERSION := 9 endif +endif LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) include $(BUILD_STATIC_LIBRARY) -- cgit v1.2.3