[Android] Android mk should use APP_PLATFORM
ANDROID_API is not always visible for Android.mk, thus not safe to be used.
Prefer APP_PLATFORM which is always set due the way ndk-build is invoked
from master makefile.
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
diff --git a/android/Android.mk b/android/Android.mk
index 492d295..dcccd02 100644
--- a/android/Android.mk
+++ b/android/Android.mk
@@ -18,7 +18,7 @@
# Force a clean if target API has changed and a previous build exists
ifneq ("$(wildcard $(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/android_api.txt)","")
CACHED_API := $(shell cat "$(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/android_api.txt")
- ifneq ($(ANDROID_API),$(CACHED_API))
+ ifneq ($(APP_PLATFORM),$(CACHED_API))
$(info [!] Previous build was targeting different API level - cleaning)
DUMMY_CLEAN := $(shell make clean)
endif
@@ -184,7 +184,7 @@
# required.
all:POST_BUILD_EVENT
POST_BUILD_EVENT:
- @echo $(ANDROID_API) > $(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/android_api.txt
+ @echo $(APP_PLATFORM) > $(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/android_api.txt
@echo $(NDK_TOOLCHAIN) > $(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/ndk_toolchain.txt
@test -f $(LOCAL_PATH)/obj/local/$(TARGET_ARCH_ABI)/libhfuzz.a && \
cp $(LOCAL_PATH)/obj/local/$(TARGET_ARCH_ABI)/libhfuzz.a \