Skip to content

Commit

Permalink
*/Android.mk: add a check for NDK_ROOT
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jzern committed Dec 16, 2022
1 parent 1d58575 commit 6fc1a9f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 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
Expand Down Expand Up @@ -289,3 +291,4 @@ include $(WEBP_SRC_PATH)/examples/Android.mk
ifeq ($(USE_CPUFEATURES),yes)
$(call import-module,android/cpufeatures)
endif
endif # NDK_ROOT
3 changes: 3 additions & 0 deletions examples/Android.mk
@@ -1,3 +1,5 @@
# Ignore this file during non-NDK builds.
ifdef NDK_ROOT
LOCAL_PATH := $(call my-dir)

################################################################################
Expand Down Expand Up @@ -91,3 +93,4 @@ LOCAL_STATIC_LIBRARIES := example_util imageio_util webp
LOCAL_MODULE := webpinfo_example

include $(BUILD_EXECUTABLE)
endif # NDK_ROOT
3 changes: 3 additions & 0 deletions imageio/Android.mk
@@ -1,3 +1,5 @@
# Ignore this file during non-NDK builds.
ifdef NDK_ROOT
LOCAL_PATH := $(call my-dir)

################################################################################
Expand Down Expand Up @@ -52,3 +54,4 @@ LOCAL_STATIC_LIBRARIES := imageio_util
LOCAL_MODULE := imageenc

include $(BUILD_STATIC_LIBRARY)
endif # NDK_ROOT

0 comments on commit 6fc1a9f

Please sign in to comment.