aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZingo Andersen <zingo.andersen@arm.com>2021-10-27 06:58:19 +0200
committerZingo Andersen <zingo.andersen@arm.com>2021-11-03 16:50:39 +0000
commit1417356bb77327e285db10564bd0da735ac8afeb (patch)
tree7e64c6b64308353f8388106f9bb4bf01a2ce8f7b
parentde68d7d0c56ec309fe7cf6bd4b7e8aa407a4e985 (diff)
downloadarmnn-1417356bb77327e285db10564bd0da735ac8afeb.tar.gz
Make it possible for backends to add include paths in Android
Signed-off-by: Zingo Andersen <zingo.andersen@arm.com> Change-Id: I1ae9d7e45d5829330daeece3a99ec08938ead143
-rw-r--r--Android.mk13
1 files changed, 10 insertions, 3 deletions
diff --git a/Android.mk b/Android.mk
index 7137baf79e..aa82e49e38 100644
--- a/Android.mk
+++ b/Android.mk
@@ -45,13 +45,15 @@ endif
LOCAL_ARM_MODE := arm
LOCAL_PROPRIETARY_MODULE := true
-# placeholder to hold all backend source files, common and specific to the backends
+# Placeholder to hold all backend source files and include paths, common and specific to the backends
ARMNN_BACKEND_SOURCES :=
+ARMNN_BACKEND_INCLUDES :=
#
-# iterate through the backend common and specific include paths, include them into the
+# Iterate through the backend common and specific include paths, include them into the
# current makefile and append the sources held by the COMMON_SOURCES and BACKEND_SOURCES variable
# (included from the given makefile) to the ARMNN_BACKEND_SOURCES list
+# and optional include paths set by BACKEND_INCLUDES to the ARMNN_BACKEND_INCLUDES list
#
$(foreach mkPath,$(ARMNN_BACKEND_COMMON_MAKEFILE_DIRS),\
$(eval include $(LOCAL_PATH)/$(mkPath)/common.mk)\
@@ -63,6 +65,10 @@ $(foreach mkPath,$(ARMNN_BACKEND_MAKEFILE_DIRS),\
$(eval ARMNN_BACKEND_SOURCES := $(ARMNN_BACKEND_SOURCES)\
$(patsubst %,$(mkPath)/%,$(BACKEND_SOURCES))))
+$(foreach mkPath,$(ARMNN_BACKEND_MAKEFILE_DIRS),\
+ $(eval include $(LOCAL_PATH)/$(mkPath)/backend.mk)\
+ $(eval ARMNN_BACKEND_INCLUDES += $(BACKEND_INCLUDES)))
+
# Mark source files as dependent on Android.mk and backend makefiles
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk \
$(ARMNN_BACKEND_MAKEFILE_LOCAL_PATHS)
@@ -94,7 +100,8 @@ LOCAL_C_INCLUDES := \
$(ARMNN_PROFILING_HEADER_PATH) \
$(ARMNN_BACKENDS_HEADER_PATH) \
$(ARMNN_SERIALIZER_HEADER_PATH) \
- $(ARMNN_DESERIALIZER_HEADER_PATH)
+ $(ARMNN_DESERIALIZER_HEADER_PATH) \
+ $(ARMNN_BACKEND_INCLUDES)
LOCAL_SRC_FILES := \
$(ARMNN_BACKEND_SOURCES) \