summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrevor Drake <trevordrake.gerrit@gmail.com>2015-03-01 11:19:19 +0000
committerTrevor Drake <trevordrake.gerrit@gmail.com>2015-03-08 06:31:36 +0000
commitf185676ef11dd491a06cb90e5f1e49bcc9ca717a (patch)
tree358cd8ea92d70fd21c07a64be4d5613bfc997756
parent79547e027abdfb4b2106f136ade2b6fd5f9b12d2 (diff)
downloadandroid_external_zlib-f185676ef11dd491a06cb90e5f1e49bcc9ca717a.tar.gz
android_external_zlib-f185676ef11dd491a06cb90e5f1e49bcc9ca717a.tar.bz2
android_external_zlib-f185676ef11dd491a06cb90e5f1e49bcc9ca717a.zip
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
-rw-r--r--Android.mk4
1 files changed, 4 insertions, 0 deletions
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)