From 6fc1a9f96e6ed2e5cb8be068a06bf49bf1e2e354 Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 15 Dec 2022 19:11:51 -0800 Subject: [PATCH] */Android.mk: add a check for NDK_ROOT This simplifies integration with the Android platform and avoids the files from being used when a non-NDK build is performed. In that case Android.bp is preferred. Change-Id: I6e334cf8b05a19da8452405f5f448f9e4b6e4a40 --- Android.mk | 3 +++ examples/Android.mk | 3 +++ imageio/Android.mk | 3 +++ 3 files changed, 9 insertions(+) diff --git a/Android.mk b/Android.mk index b53ee294..9d16f083 100644 --- a/Android.mk +++ b/Android.mk @@ -1,3 +1,5 @@ +# Ignore this file during non-NDK builds. +ifdef NDK_ROOT LOCAL_PATH := $(call my-dir) WEBP_CFLAGS := -Wall -DANDROID -DHAVE_MALLOC_H -DHAVE_PTHREAD -DWEBP_USE_THREAD @@ -289,3 +291,4 @@ include $(WEBP_SRC_PATH)/examples/Android.mk ifeq ($(USE_CPUFEATURES),yes) $(call import-module,android/cpufeatures) endif +endif # NDK_ROOT diff --git a/examples/Android.mk b/examples/Android.mk index 13fb3b46..ae0f5b42 100644 --- a/examples/Android.mk +++ b/examples/Android.mk @@ -1,3 +1,5 @@ +# Ignore this file during non-NDK builds. +ifdef NDK_ROOT LOCAL_PATH := $(call my-dir) ################################################################################ @@ -91,3 +93,4 @@ LOCAL_STATIC_LIBRARIES := example_util imageio_util webp LOCAL_MODULE := webpinfo_example include $(BUILD_EXECUTABLE) +endif # NDK_ROOT diff --git a/imageio/Android.mk b/imageio/Android.mk index e779f71e..1c8b8367 100644 --- a/imageio/Android.mk +++ b/imageio/Android.mk @@ -1,3 +1,5 @@ +# Ignore this file during non-NDK builds. +ifdef NDK_ROOT LOCAL_PATH := $(call my-dir) ################################################################################ @@ -52,3 +54,4 @@ LOCAL_STATIC_LIBRARIES := imageio_util LOCAL_MODULE := imageenc include $(BUILD_STATIC_LIBRARY) +endif # NDK_ROOT