telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright © 2017 ARM Ltd. All rights reserved. |
| 3 | # See LICENSE file in the project root for full license information. |
| 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 := \ |
| 47 | Tests.cpp \ |
| 48 | UtilsTests.cpp \ |
| 49 | Concurrent.cpp \ |
| 50 | Convolution2D.cpp \ |
| 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 | 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 |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 68 | |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 69 | LOCAL_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 |
surmeh01 | deb3bdb | 2018-07-05 12:06:04 +0100 | [diff] [blame] | 81 | ifeq ($(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. |
| 84 | LOCAL_SHARED_LIBRARIES+= \ |
| 85 | android.hardware.neuralnetworks@1.1 |
Matteo Martincigh | 69558df | 2018-08-31 16:18:19 +0100 | [diff] [blame^] | 86 | endif # PLATFORM_VERSION == 9 |
surmeh01 | deb3bdb | 2018-07-05 12:06:04 +0100 | [diff] [blame] | 87 | |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 88 | include $(BUILD_EXECUTABLE) |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 89 | |
Matteo Martincigh | 69558df | 2018-08-31 16:18:19 +0100 | [diff] [blame^] | 90 | ifeq ($(PLATFORM_VERSION),9) |
| 91 | # The following target is available starting from Android P |
| 92 | |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 93 | ########################## |
| 94 | # armnn-driver-tests@1.1 # |
| 95 | ########################## |
| 96 | include $(CLEAR_VARS) |
| 97 | |
| 98 | LOCAL_MODULE := armnn-driver-tests@1.1 |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 99 | LOCAL_MODULE_TAGS := eng optional |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 100 | LOCAL_ARM_MODE := arm |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 101 | LOCAL_PROPRIETARY_MODULE := true |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 102 | # Mark source files as dependent on Android.mk |
| 103 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 104 | |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 105 | LOCAL_C_INCLUDES := \ |
| 106 | $(OPENCL_HEADER_PATH) \ |
| 107 | $(NN_HEADER_PATH) \ |
| 108 | $(ARMNN_HEADER_PATH) \ |
| 109 | $(ARMNN_DRIVER_HEADER_PATH) |
| 110 | |
| 111 | LOCAL_CFLAGS := \ |
| 112 | -std=c++14 \ |
| 113 | -fexceptions \ |
| 114 | -Werror \ |
| 115 | -O0 \ |
| 116 | -UNDEBUG \ |
| 117 | -DARMNN_ANDROID_P \ |
| 118 | -DARMNN_ANDROID_NN_V1_1 |
| 119 | |
| 120 | LOCAL_SRC_FILES := \ |
| 121 | Tests.cpp \ |
| 122 | UtilsTests.cpp \ |
| 123 | Concurrent.cpp \ |
| 124 | Convolution2D.cpp \ |
| 125 | FullyConnected.cpp \ |
| 126 | GenericLayerTests.cpp \ |
| 127 | DriverTestHelpers.cpp \ |
| 128 | SystemProperties.cpp \ |
| 129 | Lstm.cpp \ |
| 130 | Merger.cpp \ |
| 131 | TestTensor.cpp |
| 132 | |
| 133 | LOCAL_STATIC_LIBRARIES := \ |
| 134 | libarmnn-driver@1.1 \ |
| 135 | libneuralnetworks_common \ |
| 136 | libarmnn \ |
| 137 | libboost_log \ |
| 138 | libboost_system \ |
| 139 | libboost_unit_test_framework \ |
| 140 | libboost_thread \ |
| 141 | armnn-arm_compute |
| 142 | |
| 143 | LOCAL_SHARED_LIBRARIES := \ |
| 144 | libbase \ |
| 145 | libhidlbase \ |
| 146 | libhidltransport \ |
| 147 | libhidlmemory \ |
| 148 | liblog \ |
| 149 | libtextclassifier_hash \ |
| 150 | libutils \ |
| 151 | android.hardware.neuralnetworks@1.0 \ |
| 152 | android.hardware.neuralnetworks@1.1 \ |
| 153 | android.hidl.allocator@1.0 \ |
| 154 | android.hidl.memory@1.0 \ |
| 155 | libOpenCL |
surmeh01 | 49b9e10 | 2018-05-17 14:11:25 +0100 | [diff] [blame] | 156 | |
telsoa01 | 5307bc1 | 2018-03-09 13:51:08 +0000 | [diff] [blame] | 157 | include $(BUILD_EXECUTABLE) |
| 158 | |
Matteo Martincigh | 69558df | 2018-08-31 16:18:19 +0100 | [diff] [blame^] | 159 | endif # PLATFORM_VERSION == 9 |
| 160 | |