aboutsummaryrefslogtreecommitdiff
path: root/src/backends/neon/backend.mk
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends/neon/backend.mk')
-rw-r--r--src/backends/neon/backend.mk30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/backends/neon/backend.mk b/src/backends/neon/backend.mk
index 34f797ff46..d9f2ad2255 100644
--- a/src/backends/neon/backend.mk
+++ b/src/backends/neon/backend.mk
@@ -7,6 +7,12 @@
# in the Android build and it is picked up by the Android.mk
# file in the root of ArmNN
+# 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)
+
+# ARMNN_COMPUTE_NEON_ENABLED == 1
+# Include the source files for the NEON backend
+
BACKEND_SOURCES := \
NeonBackend.cpp \
NeonInterceptorScheduler.cpp \
@@ -42,10 +48,25 @@ BACKEND_SOURCES := \
workloads/NeonSoftmaxUint8Workload.cpp \
workloads/NeonSubtractionFloatWorkload.cpp
+else
+
+# ARMNN_COMPUTE_NEON_ENABLED == 0
+# No source file will be compiled for the NEON backend
+
+BACKEND_SOURCES :=
+
+endif
+
# BACKEND_TEST_SOURCES contains the list of files to be included
# in the Android unit test build (armnn-tests) and it is picked
# up by the Android.mk file in the root of ArmNN
+# 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)
+
+# ARMNN_COMPUTE_NEON_ENABLED == 1
+# Include the source files for the NEON backend tests
+
BACKEND_TEST_SOURCES := \
test/NeonCreateWorkloadTests.cpp \
test/NeonEndToEndTests.cpp \
@@ -56,3 +77,12 @@ BACKEND_TEST_SOURCES := \
test/NeonOptimizedNetworkTests.cpp \
test/NeonRuntimeTests.cpp \
test/NeonTimerTest.cpp
+
+else
+
+# ARMNN_COMPUTE_NEON_ENABLED == 0
+# No source file will be compiled for the NEON backend tests
+
+BACKEND_TEST_SOURCES :=
+
+endif