aboutsummaryrefslogtreecommitdiff
path: root/Android.mk
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-01-31 15:35:59 +0000
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-02-01 10:24:15 +0000
commitd95e906f135ab9c7a7ac4c9f5d2cef8beb154a88 (patch)
treeda56a3d5b9546409d7860126a46419e5b0eaa7d5 /Android.mk
parent339bcae73515c66899432b5844d7c239c570c4b8 (diff)
downloadarmnn-d95e906f135ab9c7a7ac4c9f5d2cef8beb154a88.tar.gz
IVGCVSW-2603 The macros ARMCOMPUTECL_ENABLED and ARMCOMPUTENEON_ENABLED
no longer work * Added two master variables ARMNN_COMPUTE_CL_ENABLED and ARMNN_COMPUTE_NEON_ENABLED to android-nn-driver/Android.mk to easily control backend support * Setting either of those two new variables then properly sets the corresponding build macro * If a specific backend gets disabled, the corresponding source files will be excluded from the build * Unified the usage of the pre-compile macros !android-nn-driver:613 Change-Id: I582ff73493b70ba9e22ca2e38d875a0f19566c8a Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk24
1 files changed, 20 insertions, 4 deletions
diff --git a/Android.mk b/Android.mk
index 0e0fa9c89c..1b0ffea024 100644
--- a/Android.mk
+++ b/Android.mk
@@ -158,10 +158,18 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_CFLAGS := \
-std=c++14 \
-fexceptions \
- -DARMCOMPUTECL_ENABLED \
- -DARMCOMPUTENEON_ENABLED \
-Wno-unused-parameter \
-frtti
+# The variable to enable/disable the CL backend (ARMNN_COMPUTE_CL_ENABLED) is declared in android-nn-driver/Android.mk
+ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1)
+LOCAL_CFLAGS += \
+ -DARMCOMPUTECL_ENABLED
+endif # ARMNN_COMPUTE_CL_ENABLED == 1
+# The variable to enable/disable the NEON backend (ARMNN_COMPUTE_NEON_ENABLED) is declared in android-nn-driver/Android.mk
+ifeq ($(ARMNN_COMPUTE_NEON_ENABLED),1)
+LOCAL_CFLAGS += \
+ -DARMCOMPUTENEON_ENABLED
+endif # ARMNN_COMPUTE_NEON_ENABLED == 1
include $(BUILD_STATIC_LIBRARY)
@@ -209,9 +217,17 @@ LOCAL_CFLAGS := \
-std=c++14 \
-fexceptions \
-frtti \
- -isystem vendor/arm/android-nn-driver/boost_1_64_0 \
- -DARMCOMPUTECL_ENABLED \
+ -isystem vendor/arm/android-nn-driver/boost_1_64_0
+# The variable to enable/disable the CL backend (ARMNN_COMPUTE_CL_ENABLED) is declared in android-nn-driver/Android.mk
+ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1)
+LOCAL_CFLAGS += \
+ -DARMCOMPUTECL_ENABLED
+endif # ARMNN_COMPUTE_CL_ENABLED == 1
+# The variable to enable/disable the NEON backend (ARMNN_COMPUTE_NEON_ENABLED) is declared in android-nn-driver/Android.mk
+ifeq ($(ARMNN_COMPUTE_NEON_ENABLED),1)
+LOCAL_CFLAGS += \
-DARMCOMPUTENEON_ENABLED
+endif # ARMNN_COMPUTE_NEON_ENABLED == 1
LOCAL_SRC_FILES := \
$(ARMNN_BACKEND_TEST_SOURCES) \