blob: 87f0b6361d4c9f42aa46687b6568312089963a45 [file] [log] [blame]
telsoa015307bc12018-03-09 13:51:08 +00001#
2# Copyright © 2017 ARM Ltd. All rights reserved.
David Beck93e48982018-09-05 13:05:09 +01003# SPDX-License-Identifier: MIT
telsoa015307bc12018-03-09 13:51:08 +00004#
5
6LOCAL_PATH := $(call my-dir)
7
8# Configure these paths if you move the source or Khronos headers
9#
10OPENCL_HEADER_PATH := $(LOCAL_PATH)/../../mali/product/khronos/original
11NN_HEADER_PATH := $(LOCAL_PATH)/../../../../frameworks/ml/nn/runtime/include
12ARMNN_HEADER_PATH := $(LOCAL_PATH)/../armnn/include
13ARMNN_DRIVER_HEADER_PATH := $(LOCAL_PATH)/..
14
telsoa01ce3e84a2018-08-31 09:31:35 +010015##########################
16# armnn-driver-tests@1.0 #
17##########################
telsoa015307bc12018-03-09 13:51:08 +000018include $(CLEAR_VARS)
19
telsoa01ce3e84a2018-08-31 09:31:35 +010020LOCAL_MODULE := armnn-driver-tests@1.0
21LOCAL_MODULE_TAGS := eng optional
22LOCAL_ARM_MODE := arm
23LOCAL_PROPRIETARY_MODULE := true
24# Mark source files as dependent on Android.mk
25LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
26
27LOCAL_C_INCLUDES := \
28 $(OPENCL_HEADER_PATH) \
29 $(NN_HEADER_PATH) \
30 $(ARMNN_HEADER_PATH) \
31 $(ARMNN_DRIVER_HEADER_PATH)
telsoa015307bc12018-03-09 13:51:08 +000032
33LOCAL_CFLAGS := \
telsoa01ce3e84a2018-08-31 09:31:35 +010034 -std=c++14 \
35 -fexceptions \
36 -Werror \
37 -O0 \
38 -UNDEBUG
39ifeq ($(PLATFORM_VERSION),9)
40# Required to build with the changes made to the Android ML framework starting from Android P,
41# regardless of the HAL version used for the build.
42LOCAL_CFLAGS+= \
43 -DARMNN_ANDROID_P
Matteo Martincigh69558df2018-08-31 16:18:19 +010044endif # PLATFORM_VERSION == 9
telsoa015307bc12018-03-09 13:51:08 +000045
telsoa01ce3e84a2018-08-31 09:31:35 +010046LOCAL_SRC_FILES := \
Nikhil Raj77605822018-09-03 11:25:56 +010047 1.0/Convolution2D.cpp \
Matthew Benthamf61c2702019-04-23 16:43:27 +010048 1.0/FullyConnectedReshape.cpp \
telsoa01ce3e84a2018-08-31 09:31:35 +010049 Tests.cpp \
50 UtilsTests.cpp \
51 Concurrent.cpp \
telsoa01ce3e84a2018-08-31 09:31:35 +010052 FullyConnected.cpp \
53 GenericLayerTests.cpp \
54 DriverTestHelpers.cpp \
55 SystemProperties.cpp \
56 Lstm.cpp \
57 Merger.cpp \
58 TestTensor.cpp
telsoa015307bc12018-03-09 13:51:08 +000059
60LOCAL_STATIC_LIBRARIES := \
telsoa01ce3e84a2018-08-31 09:31:35 +010061 libneuralnetworks_common \
telsoa01ce3e84a2018-08-31 09:31:35 +010062 libboost_log \
63 libboost_system \
64 libboost_unit_test_framework \
65 libboost_thread \
66 armnn-arm_compute
telsoa015307bc12018-03-09 13:51:08 +000067
David Beckbeb3e1f2018-10-15 14:15:42 +010068LOCAL_WHOLE_STATIC_LIBRARIES := \
69 libarmnn-driver@1.0
70
telsoa01ce3e84a2018-08-31 09:31:35 +010071LOCAL_SHARED_LIBRARIES := \
72 libbase \
73 libhidlbase \
74 libhidltransport \
75 libhidlmemory \
76 liblog \
77 libtextclassifier_hash \
78 libutils \
79 android.hardware.neuralnetworks@1.0 \
80 android.hidl.allocator@1.0 \
81 android.hidl.memory@1.0 \
82 libOpenCL
surmeh01deb3bdb2018-07-05 12:06:04 +010083ifeq ($(PLATFORM_VERSION),9)
84# Required to build the 1.0 version of the NN Driver on Android P and later versions,
85# as the 1.0 version of the NN API needs the 1.1 HAL headers to be included regardless.
86LOCAL_SHARED_LIBRARIES+= \
87 android.hardware.neuralnetworks@1.1
Matteo Martincigh69558df2018-08-31 16:18:19 +010088endif # PLATFORM_VERSION == 9
surmeh01deb3bdb2018-07-05 12:06:04 +010089
telsoa01ce3e84a2018-08-31 09:31:35 +010090include $(BUILD_EXECUTABLE)
telsoa015307bc12018-03-09 13:51:08 +000091
Matteo Martincigh69558df2018-08-31 16:18:19 +010092ifeq ($(PLATFORM_VERSION),9)
93# The following target is available starting from Android P
94
telsoa01ce3e84a2018-08-31 09:31:35 +010095##########################
96# armnn-driver-tests@1.1 #
97##########################
98include $(CLEAR_VARS)
99
100LOCAL_MODULE := armnn-driver-tests@1.1
telsoa015307bc12018-03-09 13:51:08 +0000101LOCAL_MODULE_TAGS := eng optional
telsoa015307bc12018-03-09 13:51:08 +0000102LOCAL_ARM_MODE := arm
telsoa01ce3e84a2018-08-31 09:31:35 +0100103LOCAL_PROPRIETARY_MODULE := true
telsoa015307bc12018-03-09 13:51:08 +0000104# Mark source files as dependent on Android.mk
105LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
106
telsoa01ce3e84a2018-08-31 09:31:35 +0100107LOCAL_C_INCLUDES := \
108 $(OPENCL_HEADER_PATH) \
109 $(NN_HEADER_PATH) \
110 $(ARMNN_HEADER_PATH) \
111 $(ARMNN_DRIVER_HEADER_PATH)
112
113LOCAL_CFLAGS := \
114 -std=c++14 \
115 -fexceptions \
116 -Werror \
117 -O0 \
118 -UNDEBUG \
119 -DARMNN_ANDROID_P \
120 -DARMNN_ANDROID_NN_V1_1
121
122LOCAL_SRC_FILES := \
Nikhil Raj77605822018-09-03 11:25:56 +0100123 1.0/Convolution2D.cpp \
124 1.1/Convolution2D.cpp \
Matteo Martincigh8d50f8f2018-10-25 15:39:33 +0100125 1.1/Mean.cpp \
saoste0150db26c2018-10-24 12:33:42 +0100126 1.1/Transpose.cpp \
telsoa01ce3e84a2018-08-31 09:31:35 +0100127 Tests.cpp \
128 UtilsTests.cpp \
129 Concurrent.cpp \
telsoa01ce3e84a2018-08-31 09:31:35 +0100130 FullyConnected.cpp \
131 GenericLayerTests.cpp \
132 DriverTestHelpers.cpp \
133 SystemProperties.cpp \
134 Lstm.cpp \
135 Merger.cpp \
136 TestTensor.cpp
137
138LOCAL_STATIC_LIBRARIES := \
telsoa01ce3e84a2018-08-31 09:31:35 +0100139 libneuralnetworks_common \
telsoa01ce3e84a2018-08-31 09:31:35 +0100140 libboost_log \
141 libboost_system \
142 libboost_unit_test_framework \
143 libboost_thread \
144 armnn-arm_compute
145
David Beckbeb3e1f2018-10-15 14:15:42 +0100146LOCAL_WHOLE_STATIC_LIBRARIES := \
147 libarmnn-driver@1.1
148
telsoa01ce3e84a2018-08-31 09:31:35 +0100149LOCAL_SHARED_LIBRARIES := \
150 libbase \
151 libhidlbase \
152 libhidltransport \
153 libhidlmemory \
154 liblog \
155 libtextclassifier_hash \
156 libutils \
157 android.hardware.neuralnetworks@1.0 \
158 android.hardware.neuralnetworks@1.1 \
159 android.hidl.allocator@1.0 \
160 android.hidl.memory@1.0 \
161 libOpenCL
surmeh0149b9e102018-05-17 14:11:25 +0100162
telsoa015307bc12018-03-09 13:51:08 +0000163include $(BUILD_EXECUTABLE)
164
Matteo Martincigh69558df2018-08-31 16:18:19 +0100165endif # PLATFORM_VERSION == 9
166