telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright © 2017 ARM Ltd. All rights reserved. |
David Beck | 93e4898 | 2018-09-05 13:05:09 +0100 | [diff] [blame] | 3 | # SPDX-License-Identifier: MIT |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 4 | # |
| 5 | |
| 6 | LOCAL_PATH := $(call my-dir) |
| 7 | |
| 8 | # Configure these paths if you move the source or Khronos headers |
| 9 | # |
| 10 | OPENCL_HEADER_PATH := $(LOCAL_PATH)/../../mali/product/khronos/original |
| 11 | NN_HEADER_PATH := $(LOCAL_PATH)/../../../../frameworks/ml/nn/runtime/include |
| 12 | ARMNN_HEADER_PATH := $(LOCAL_PATH)/../armnn/include |
| 13 | ARMNN_DRIVER_HEADER_PATH := $(LOCAL_PATH)/.. |
| 14 | |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 15 | ########################## |
| 16 | # armnn-driver-tests@1.0 # |
| 17 | ########################## |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 18 | include $(CLEAR_VARS) |
| 19 | |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 20 | LOCAL_MODULE := armnn-driver-tests@1.0 |
| 21 | LOCAL_MODULE_TAGS := eng optional |
| 22 | LOCAL_ARM_MODE := arm |
| 23 | LOCAL_PROPRIETARY_MODULE := true |
| 24 | # Mark source files as dependent on Android.mk |
| 25 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 26 | |
| 27 | LOCAL_C_INCLUDES := \ |
| 28 | $(OPENCL_HEADER_PATH) \ |
| 29 | $(NN_HEADER_PATH) \ |
| 30 | $(ARMNN_HEADER_PATH) \ |
| 31 | $(ARMNN_DRIVER_HEADER_PATH) |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 32 | |
| 33 | LOCAL_CFLAGS := \ |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 34 | -std=c++14 \ |
| 35 | -fexceptions \ |
| 36 | -Werror \ |
| 37 | -O0 \ |
| 38 | -UNDEBUG |
| 39 | ifeq ($(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. |
| 42 | LOCAL_CFLAGS+= \ |
| 43 | -DARMNN_ANDROID_P |
Matteo Martincigh | 69558df | 2018-08-31 16:18:19 +0100 | [diff] [blame] | 44 | endif # PLATFORM_VERSION == 9 |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 45 | |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 46 | LOCAL_SRC_FILES := \ |
Nikhil Raj | 7760582 | 2018-09-03 11:25:56 +0100 | [diff] [blame] | 47 | 1.0/Convolution2D.cpp \ |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 48 | Tests.cpp \ |
| 49 | UtilsTests.cpp \ |
| 50 | Concurrent.cpp \ |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 51 | FullyConnected.cpp \ |
| 52 | GenericLayerTests.cpp \ |
| 53 | DriverTestHelpers.cpp \ |
| 54 | SystemProperties.cpp \ |
| 55 | Lstm.cpp \ |
| 56 | Merger.cpp \ |
| 57 | TestTensor.cpp |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 58 | |
| 59 | LOCAL_STATIC_LIBRARIES := \ |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 60 | libneuralnetworks_common \ |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 61 | libboost_log \ |
| 62 | libboost_system \ |
| 63 | libboost_unit_test_framework \ |
| 64 | libboost_thread \ |
| 65 | armnn-arm_compute |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 66 | |
David Beck | beb3e1f | 2018-10-15 14:15:42 +0100 | [diff] [blame^] | 67 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 68 | libarmnn-driver@1.0 |
| 69 | |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 70 | LOCAL_SHARED_LIBRARIES := \ |
| 71 | libbase \ |
| 72 | libhidlbase \ |
| 73 | libhidltransport \ |
| 74 | libhidlmemory \ |
| 75 | liblog \ |
| 76 | libtextclassifier_hash \ |
| 77 | libutils \ |
| 78 | android.hardware.neuralnetworks@1.0 \ |
| 79 | android.hidl.allocator@1.0 \ |
| 80 | android.hidl.memory@1.0 \ |
| 81 | libOpenCL |
surmeh01 | deb3bdb | 2018-07-05 12:06:04 +0100 | [diff] [blame] | 82 | ifeq ($(PLATFORM_VERSION),9) |
| 83 | # Required to build the 1.0 version of the NN Driver on Android P and later versions, |
| 84 | # as the 1.0 version of the NN API needs the 1.1 HAL headers to be included regardless. |
| 85 | LOCAL_SHARED_LIBRARIES+= \ |
| 86 | android.hardware.neuralnetworks@1.1 |
Matteo Martincigh | 69558df | 2018-08-31 16:18:19 +0100 | [diff] [blame] | 87 | endif # PLATFORM_VERSION == 9 |
surmeh01 | deb3bdb | 2018-07-05 12:06:04 +0100 | [diff] [blame] | 88 | |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 89 | include $(BUILD_EXECUTABLE) |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 90 | |
Matteo Martincigh | 69558df | 2018-08-31 16:18:19 +0100 | [diff] [blame] | 91 | ifeq ($(PLATFORM_VERSION),9) |
| 92 | # The following target is available starting from Android P |
| 93 | |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 94 | ########################## |
| 95 | # armnn-driver-tests@1.1 # |
| 96 | ########################## |
| 97 | include $(CLEAR_VARS) |
| 98 | |
| 99 | LOCAL_MODULE := armnn-driver-tests@1.1 |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 100 | LOCAL_MODULE_TAGS := eng optional |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 101 | LOCAL_ARM_MODE := arm |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 102 | LOCAL_PROPRIETARY_MODULE := true |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 103 | # Mark source files as dependent on Android.mk |
| 104 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 105 | |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 106 | LOCAL_C_INCLUDES := \ |
| 107 | $(OPENCL_HEADER_PATH) \ |
| 108 | $(NN_HEADER_PATH) \ |
| 109 | $(ARMNN_HEADER_PATH) \ |
| 110 | $(ARMNN_DRIVER_HEADER_PATH) |
| 111 | |
| 112 | LOCAL_CFLAGS := \ |
| 113 | -std=c++14 \ |
| 114 | -fexceptions \ |
| 115 | -Werror \ |
| 116 | -O0 \ |
| 117 | -UNDEBUG \ |
| 118 | -DARMNN_ANDROID_P \ |
| 119 | -DARMNN_ANDROID_NN_V1_1 |
| 120 | |
| 121 | LOCAL_SRC_FILES := \ |
Nikhil Raj | 7760582 | 2018-09-03 11:25:56 +0100 | [diff] [blame] | 122 | 1.0/Convolution2D.cpp \ |
| 123 | 1.1/Convolution2D.cpp \ |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 124 | Tests.cpp \ |
| 125 | UtilsTests.cpp \ |
| 126 | Concurrent.cpp \ |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 127 | FullyConnected.cpp \ |
| 128 | GenericLayerTests.cpp \ |
| 129 | DriverTestHelpers.cpp \ |
| 130 | SystemProperties.cpp \ |
| 131 | Lstm.cpp \ |
| 132 | Merger.cpp \ |
| 133 | TestTensor.cpp |
| 134 | |
| 135 | LOCAL_STATIC_LIBRARIES := \ |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 136 | libneuralnetworks_common \ |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 137 | libboost_log \ |
| 138 | libboost_system \ |
| 139 | libboost_unit_test_framework \ |
| 140 | libboost_thread \ |
| 141 | armnn-arm_compute |
| 142 | |
David Beck | beb3e1f | 2018-10-15 14:15:42 +0100 | [diff] [blame^] | 143 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 144 | libarmnn-driver@1.1 |
| 145 | |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 146 | LOCAL_SHARED_LIBRARIES := \ |
| 147 | libbase \ |
| 148 | libhidlbase \ |
| 149 | libhidltransport \ |
| 150 | libhidlmemory \ |
| 151 | liblog \ |
| 152 | libtextclassifier_hash \ |
| 153 | libutils \ |
| 154 | android.hardware.neuralnetworks@1.0 \ |
| 155 | android.hardware.neuralnetworks@1.1 \ |
| 156 | android.hidl.allocator@1.0 \ |
| 157 | android.hidl.memory@1.0 \ |
| 158 | libOpenCL |
surmeh01 | 49b9e10 | 2018-05-17 14:11:25 +0100 | [diff] [blame] | 159 | |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 160 | include $(BUILD_EXECUTABLE) |
| 161 | |
Matteo Martincigh | 69558df | 2018-08-31 16:18:19 +0100 | [diff] [blame] | 162 | endif # PLATFORM_VERSION == 9 |
| 163 | |