aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2023-01-18 19:19:01 -0800
committerJames Zern <jzern@google.com>2023-01-18 19:19:01 -0800
commit5e861795339a7c196a381c3aaf5209b5d4c8c468 (patch)
treee225f1c0ab103acd01bd6381bf41e436299e0201
parent7a8052ccda29b3f16f93927cbea46e32c86f422c (diff)
downloadlibvpx-5e861795339a7c196a381c3aaf5209b5d4c8c468.tar.gz
*/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: I803912146dac788b7f0af27199c7613cabbc9fa0
-rw-r--r--build/make/Android.mk3
-rw-r--r--test/android/Android.mk4
2 files changed, 7 insertions, 0 deletions
diff --git a/build/make/Android.mk b/build/make/Android.mk
index b8032e67a..ba24f541b 100644
--- a/build/make/Android.mk
+++ b/build/make/Android.mk
@@ -8,6 +8,8 @@
## be found in the AUTHORS file in the root of the source tree.
##
+# Ignore this file during non-NDK builds.
+ifdef NDK_ROOT
#
# This file is to be used for compiling libvpx for Android using the NDK.
# In an Android project place a libvpx checkout in the jni directory.
@@ -212,3 +214,4 @@ endif
ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes)
$(call import-module,android/cpufeatures)
endif
+endif # NDK_ROOT
diff --git a/test/android/Android.mk b/test/android/Android.mk
index 87155fcb5..9a7533ebb 100644
--- a/test/android/Android.mk
+++ b/test/android/Android.mk
@@ -10,6 +10,9 @@
# The test app itself runs on the command line through adb shell
# The paths are really messed up as the libvpx make file
# expects to be made from a parent directory.
+
+# Ignore this file during non-NDK builds.
+ifdef NDK_ROOT
CUR_WD := $(call my-dir)
BINDINGS_DIR := $(CUR_WD)/../../..
LOCAL_PATH := $(CUR_WD)/../../..
@@ -61,3 +64,4 @@ LOCAL_SRC_FILES := $(addprefix ./test/, $(FILTERED_SRC))
# some test files depend on *_rtcd.h, ensure they're generated first.
$(eval $(call rtcd_dep_template))
include $(BUILD_EXECUTABLE)
+endif # NDK_ROOT