blob: c38b92e82f56cd34deaf92ca2d211155dac47860 [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 \
telsoa01ce3e84a2018-08-31 09:31:35 +010048 Tests.cpp \
49 UtilsTests.cpp \
50 Concurrent.cpp \
telsoa01ce3e84a2018-08-31 09:31:35 +010051 FullyConnected.cpp \
52 GenericLayerTests.cpp \
53 DriverTestHelpers.cpp \
54 SystemProperties.cpp \
55 Lstm.cpp \
56 Merger.cpp \
57 TestTensor.cpp
telsoa015307bc12018-03-09 13:51:08 +000058
59LOCAL_STATIC_LIBRARIES := \
telsoa01ce3e84a2018-08-31 09:31:35 +010060 libarmnn-driver@1.0 \
61 libneuralnetworks_common \
62 libarmnn \
63 libboost_log \
64 libboost_system \
65 libboost_unit_test_framework \
66 libboost_thread \
67 armnn-arm_compute
telsoa015307bc12018-03-09 13:51:08 +000068
telsoa01ce3e84a2018-08-31 09:31:35 +010069LOCAL_SHARED_LIBRARIES := \
70 libbase \
71 libhidlbase \
72 libhidltransport \
73 libhidlmemory \
74 liblog \
75 libtextclassifier_hash \
76 libutils \
77 android.hardware.neuralnetworks@1.0 \
78 android.hidl.allocator@1.0 \
79 android.hidl.memory@1.0 \
80 libOpenCL
surmeh01deb3bdb2018-07-05 12:06:04 +010081ifeq ($(PLATFORM_VERSION),9)
82# Required to build the 1.0 version of the NN Driver on Android P and later versions,
83# as the 1.0 version of the NN API needs the 1.1 HAL headers to be included regardless.
84LOCAL_SHARED_LIBRARIES+= \
85 android.hardware.neuralnetworks@1.1
Matteo Martincigh69558df2018-08-31 16:18:19 +010086endif # PLATFORM_VERSION == 9
surmeh01deb3bdb2018-07-05 12:06:04 +010087
telsoa01ce3e84a2018-08-31 09:31:35 +010088include $(BUILD_EXECUTABLE)
telsoa015307bc12018-03-09 13:51:08 +000089
Matteo Martincigh69558df2018-08-31 16:18:19 +010090ifeq ($(PLATFORM_VERSION),9)
91# The following target is available starting from Android P
92
telsoa01ce3e84a2018-08-31 09:31:35 +010093##########################
94# armnn-driver-tests@1.1 #
95##########################
96include $(CLEAR_VARS)
97
98LOCAL_MODULE := armnn-driver-tests@1.1
telsoa015307bc12018-03-09 13:51:08 +000099LOCAL_MODULE_TAGS := eng optional
telsoa015307bc12018-03-09 13:51:08 +0000100LOCAL_ARM_MODE := arm
telsoa01ce3e84a2018-08-31 09:31:35 +0100101LOCAL_PROPRIETARY_MODULE := true
telsoa015307bc12018-03-09 13:51:08 +0000102# Mark source files as dependent on Android.mk
103LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
104
telsoa01ce3e84a2018-08-31 09:31:35 +0100105LOCAL_C_INCLUDES := \
106 $(OPENCL_HEADER_PATH) \
107 $(NN_HEADER_PATH) \
108 $(ARMNN_HEADER_PATH) \
109 $(ARMNN_DRIVER_HEADER_PATH)
110
111LOCAL_CFLAGS := \
112 -std=c++14 \
113 -fexceptions \
114 -Werror \
115 -O0 \
116 -UNDEBUG \
117 -DARMNN_ANDROID_P \
118 -DARMNN_ANDROID_NN_V1_1
119
120LOCAL_SRC_FILES := \
Nikhil Raj77605822018-09-03 11:25:56 +0100121 1.0/Convolution2D.cpp \
122 1.1/Convolution2D.cpp \
telsoa01ce3e84a2018-08-31 09:31:35 +0100123 Tests.cpp \
124 UtilsTests.cpp \
125 Concurrent.cpp \
telsoa01ce3e84a2018-08-31 09:31:35 +0100126 FullyConnected.cpp \
127 GenericLayerTests.cpp \
128 DriverTestHelpers.cpp \
129 SystemProperties.cpp \
130 Lstm.cpp \
131 Merger.cpp \
132 TestTensor.cpp
133
134LOCAL_STATIC_LIBRARIES := \
135 libarmnn-driver@1.1 \
136 libneuralnetworks_common \
137 libarmnn \
138 libboost_log \
139 libboost_system \
140 libboost_unit_test_framework \
141 libboost_thread \
142 armnn-arm_compute
143
144LOCAL_SHARED_LIBRARIES := \
145 libbase \
146 libhidlbase \
147 libhidltransport \
148 libhidlmemory \
149 liblog \
150 libtextclassifier_hash \
151 libutils \
152 android.hardware.neuralnetworks@1.0 \
153 android.hardware.neuralnetworks@1.1 \
154 android.hidl.allocator@1.0 \
155 android.hidl.memory@1.0 \
156 libOpenCL
surmeh0149b9e102018-05-17 14:11:25 +0100157
telsoa015307bc12018-03-09 13:51:08 +0000158include $(BUILD_EXECUTABLE)
159
Matteo Martincigh69558df2018-08-31 16:18:19 +0100160endif # PLATFORM_VERSION == 9
161