Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright © 2017 ARM Ltd. All rights reserved. |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
| 5 | |
| 6 | ANDROID_NN_DRIVER_LOCAL_PATH := $(call my-dir) |
| 7 | LOCAL_PATH := $(ANDROID_NN_DRIVER_LOCAL_PATH) |
| 8 | |
| 9 | P_OR_LATER := 0 |
| 10 | Q_OR_LATER := 0 |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 11 | R_OR_LATER := 0 |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 12 | |
| 13 | ifeq ($(PLATFORM_VERSION),9) |
| 14 | P_OR_LATER := 1 |
| 15 | endif # PLATFORM_VERSION == 9 |
| 16 | ifeq ($(PLATFORM_VERSION),P) |
| 17 | P_OR_LATER := 1 |
| 18 | endif # PLATFORM_VERSION == P |
| 19 | |
| 20 | ifeq ($(PLATFORM_VERSION),10) |
| 21 | P_OR_LATER := 1 |
| 22 | Q_OR_LATER := 1 |
| 23 | endif # PLATFORM_VERSION == 10 |
| 24 | ifeq ($(PLATFORM_VERSION),Q) |
| 25 | P_OR_LATER := 1 |
| 26 | Q_OR_LATER := 1 |
| 27 | endif # PLATFORM_VERSION == Q |
| 28 | |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 29 | ifeq ($(PLATFORM_VERSION),R) |
| 30 | P_OR_LATER := 1 |
| 31 | Q_OR_LATER := 1 |
| 32 | R_OR_LATER := 1 |
| 33 | endif # PLATFORM_VERSION == R |
| 34 | |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 35 | CPP_VERSION := c++14 |
| 36 | |
| 37 | ifeq ($(Q_OR_LATER),1) |
| 38 | CPP_VERSION := c++17 |
| 39 | endif |
| 40 | |
| 41 | # Configure these paths if you move the source or Khronos headers |
| 42 | ARMNN_HEADER_PATH := $(LOCAL_PATH)/armnn/include |
| 43 | ARMNN_UTILS_HEADER_PATH := $(LOCAL_PATH)/armnn/src/armnnUtils |
| 44 | OPENCL_HEADER_PATH := $(LOCAL_PATH)/clframework/include |
| 45 | NN_HEADER_PATH := $(LOCAL_PATH)/../../../frameworks/ml/nn/runtime/include |
| 46 | |
| 47 | # Variables to control CL/NEON/reference backend support |
| 48 | # Set them to '0' to disable support for a specific backend |
| 49 | ARMNN_COMPUTE_CL_ENABLED := 1 |
| 50 | ARMNN_COMPUTE_NEON_ENABLED := 1 |
| 51 | ARMNN_REF_ENABLED := 1 |
| 52 | |
| 53 | ifeq ($(ARMNN_COMPUTE_CL_ENABLE),0) |
| 54 | ARMNN_COMPUTE_CL_ENABLED := 0 |
| 55 | endif |
| 56 | |
| 57 | ifeq ($(ARMNN_COMPUTE_NEON_ENABLE),0) |
| 58 | ARMNN_COMPUTE_NEON_ENABLED := 0 |
| 59 | endif |
| 60 | |
| 61 | ifeq ($(ARMNN_REF_ENABLE),0) |
| 62 | ARMNN_REF_ENABLED := 0 |
| 63 | endif |
| 64 | |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 65 | ifeq ($(PLATFORM_VERSION),R) |
| 66 | ARMNN_COMPUTE_CL_ENABLED := 0 |
| 67 | endif # PLATFORM_VERSION == R |
| 68 | |
alered01 | 7c395b2 | 2020-04-03 15:37:24 +0100 | [diff] [blame] | 69 | # Variable to control inclusion of libOpenCL shared library |
| 70 | ARMNN_INCLUDE_LIBOPENCL := $(ARMNN_COMPUTE_CL_ENABLED) |
| 71 | ifeq ($(ARMNN_LIBOPENCL),0) |
| 72 | ARMNN_INCLUDE_LIBOPENCL := 0 |
| 73 | endif |
| 74 | |
Narumol Prangnawarat | cad4e91 | 2020-06-02 12:07:43 +0100 | [diff] [blame^] | 75 | # Variable to control retire rate of priority queue |
| 76 | RETIRE_RATE := 3 |
| 77 | |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 78 | ####################### |
| 79 | # libarmnn-driver@1.0 # |
| 80 | ####################### |
| 81 | include $(CLEAR_VARS) |
| 82 | |
| 83 | LOCAL_MODULE := libarmnn-driver@1.0 |
| 84 | ifeq ($(Q_OR_LATER),1) |
| 85 | # "eng" is deprecated in Android Q |
| 86 | LOCAL_MODULE_TAGS := optional |
| 87 | else |
| 88 | LOCAL_MODULE_TAGS := eng optional |
| 89 | endif |
| 90 | LOCAL_ARM_MODE := arm |
| 91 | LOCAL_PROPRIETARY_MODULE := true |
| 92 | # Mark source files as dependent on Android.mk |
| 93 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 94 | |
| 95 | LOCAL_C_INCLUDES := \ |
| 96 | $(ARMNN_HEADER_PATH) \ |
| 97 | $(ARMNN_UTILS_HEADER_PATH) \ |
| 98 | $(OPENCL_HEADER_PATH) \ |
| 99 | $(NN_HEADER_PATH) |
| 100 | |
| 101 | LOCAL_CFLAGS := \ |
| 102 | -std=$(CPP_VERSION) \ |
| 103 | -fexceptions \ |
| 104 | -Werror \ |
| 105 | -Wno-format-security |
| 106 | |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 107 | # Required to build with the changes made to the Android ML framework specific to Android R |
| 108 | ifeq ($(PLATFORM_VERSION),R) |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 109 | LOCAL_CFLAGS+= \ |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 110 | -DARMNN_ANDROID_R |
| 111 | endif # R or later |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 112 | |
| 113 | ifeq ($(ARMNN_DRIVER_DEBUG),1) |
| 114 | LOCAL_CFLAGS+= \ |
| 115 | -UNDEBUG |
| 116 | endif # ARMNN_DRIVER_DEBUG == 1 |
| 117 | |
| 118 | ifeq ($(Q_OR_LATER),1) |
| 119 | LOCAL_CFLAGS += \ |
| 120 | -DBOOST_NO_AUTO_PTR |
| 121 | endif # PLATFORM_VERSION == Q or later |
| 122 | |
| 123 | ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1) |
| 124 | LOCAL_CFLAGS += \ |
| 125 | -DARMCOMPUTECL_ENABLED |
| 126 | endif # ARMNN_COMPUTE_CL_ENABLED == 1 |
| 127 | |
| 128 | ifeq ($(ARMNN_COMPUTE_NEON_ENABLED),1) |
| 129 | LOCAL_CFLAGS += \ |
| 130 | -DARMCOMPUTENEON_ENABLED |
| 131 | endif # ARMNN_COMPUTE_NEON_ENABLED == 1 |
| 132 | |
| 133 | ifeq ($(ARMNN_REF_ENABLED),1) |
| 134 | LOCAL_CFLAGS += \ |
| 135 | -DARMNNREF_ENABLED |
| 136 | endif # ARMNN_REF_ENABLED == 1 |
| 137 | |
| 138 | LOCAL_SRC_FILES := \ |
| 139 | 1.0/ArmnnDriverImpl.cpp \ |
| 140 | 1.0/HalPolicy.cpp \ |
| 141 | ArmnnDriverImpl.cpp \ |
| 142 | DriverOptions.cpp \ |
| 143 | ArmnnDevice.cpp \ |
| 144 | ArmnnPreparedModel.cpp \ |
| 145 | ModelToINetworkConverter.cpp \ |
| 146 | RequestThread.cpp \ |
| 147 | Utils.cpp \ |
| 148 | ConversionUtils.cpp |
| 149 | |
| 150 | LOCAL_STATIC_LIBRARIES := \ |
| 151 | libneuralnetworks_common \ |
| 152 | libboost_log \ |
| 153 | libboost_program_options \ |
| 154 | libboost_system \ |
| 155 | libboost_thread \ |
| 156 | libboost_filesystem \ |
| 157 | arm_compute_library |
| 158 | |
| 159 | LOCAL_WHOLE_STATIC_LIBRARIES := libarmnn |
| 160 | |
| 161 | LOCAL_SHARED_LIBRARIES := \ |
| 162 | libbase \ |
| 163 | libhidlbase \ |
| 164 | libhidltransport \ |
| 165 | libhidlmemory \ |
| 166 | liblog \ |
| 167 | libutils \ |
| 168 | android.hardware.neuralnetworks@1.0 \ |
| 169 | android.hidl.allocator@1.0 \ |
| 170 | android.hidl.memory@1.0 |
| 171 | |
| 172 | ifeq ($(P_OR_LATER),1) |
| 173 | # Required to build the 1.0 version of the NN Driver on Android P and later versions, |
| 174 | # as the 1.0 version of the NN API needs the 1.1 HAL headers to be included regardless. |
| 175 | LOCAL_SHARED_LIBRARIES+= \ |
| 176 | android.hardware.neuralnetworks@1.1 |
| 177 | endif # PLATFORM_VERSION == 9 |
| 178 | |
| 179 | ifeq ($(Q_OR_LATER),1) |
| 180 | LOCAL_SHARED_LIBRARIES+= \ |
| 181 | libnativewindow \ |
| 182 | libui \ |
| 183 | libfmq \ |
| 184 | libcutils \ |
| 185 | android.hardware.neuralnetworks@1.2 |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 186 | endif # Q or later |
| 187 | |
| 188 | ifeq ($(R_OR_LATER),1) |
| 189 | LOCAL_SHARED_LIBRARIES+= \ |
Sadik Armagan | d7be72e | 2020-04-23 12:56:05 +0100 | [diff] [blame] | 190 | libsync \ |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 191 | android.hardware.neuralnetworks@1.3 |
| 192 | endif # R or later |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 193 | |
alered01 | dbae247 | 2020-04-07 12:31:10 +0100 | [diff] [blame] | 194 | ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1) |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 195 | LOCAL_SHARED_LIBRARIES+= \ |
| 196 | libOpenCL |
| 197 | endif |
| 198 | |
| 199 | include $(BUILD_STATIC_LIBRARY) |
| 200 | |
| 201 | ifeq ($(P_OR_LATER),1) |
| 202 | # The following target is available starting from Android P |
| 203 | |
| 204 | ####################### |
| 205 | # libarmnn-driver@1.1 # |
| 206 | ####################### |
| 207 | include $(CLEAR_VARS) |
| 208 | |
| 209 | LOCAL_MODULE := libarmnn-driver@1.1 |
| 210 | ifeq ($(Q_OR_LATER),1) |
| 211 | # "eng" is deprecated in Android Q |
| 212 | LOCAL_MODULE_TAGS := optional |
| 213 | else |
| 214 | LOCAL_MODULE_TAGS := eng optional |
| 215 | endif |
| 216 | #PRODUCT_PACKAGES_ENG := libarmnn-driver@1.1 |
| 217 | LOCAL_ARM_MODE := arm |
| 218 | LOCAL_PROPRIETARY_MODULE := true |
| 219 | # Mark source files as dependent on Android.mk |
| 220 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 221 | |
| 222 | LOCAL_C_INCLUDES := \ |
| 223 | $(ARMNN_HEADER_PATH) \ |
| 224 | $(ARMNN_UTILS_HEADER_PATH) \ |
| 225 | $(OPENCL_HEADER_PATH) \ |
| 226 | $(NN_HEADER_PATH) |
| 227 | |
| 228 | LOCAL_CFLAGS := \ |
| 229 | -std=$(CPP_VERSION) \ |
| 230 | -fexceptions \ |
| 231 | -Werror \ |
| 232 | -Wno-format-security \ |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 233 | -DARMNN_ANDROID_NN_V1_1 |
| 234 | |
| 235 | ifeq ($(ARMNN_DRIVER_DEBUG),1) |
| 236 | LOCAL_CFLAGS+= \ |
| 237 | -UNDEBUG |
| 238 | endif # ARMNN_DRIVER_DEBUG == 1 |
| 239 | |
| 240 | ifeq ($(Q_OR_LATER),1) |
| 241 | LOCAL_CFLAGS += \ |
| 242 | -DBOOST_NO_AUTO_PTR |
| 243 | endif # PLATFORM_VERSION == Q or later |
| 244 | |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 245 | # Required to build with the changes made to the Android ML framework specific to Android R |
| 246 | ifeq ($(PLATFORM_VERSION),R) |
| 247 | LOCAL_CFLAGS+= \ |
| 248 | -DARMNN_ANDROID_R |
| 249 | endif # R or later |
| 250 | |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 251 | ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1) |
| 252 | LOCAL_CFLAGS += \ |
| 253 | -DARMCOMPUTECL_ENABLED |
| 254 | endif # ARMNN_COMPUTE_CL_ENABLED == 1 |
| 255 | |
| 256 | ifeq ($(ARMNN_COMPUTE_NEON_ENABLED),1) |
| 257 | LOCAL_CFLAGS += \ |
| 258 | -DARMCOMPUTENEON_ENABLED |
| 259 | endif # ARMNN_COMPUTE_NEON_ENABLED == 1 |
| 260 | |
| 261 | ifeq ($(ARMNN_REF_ENABLED),1) |
| 262 | LOCAL_CFLAGS += \ |
| 263 | -DARMNNREF_ENABLED |
| 264 | endif # ARMNN_REF_ENABLED == 1 |
| 265 | |
| 266 | LOCAL_SRC_FILES := \ |
| 267 | 1.0/ArmnnDriverImpl.cpp \ |
| 268 | 1.0/HalPolicy.cpp \ |
| 269 | 1.1/ArmnnDriverImpl.cpp \ |
| 270 | 1.1/HalPolicy.cpp \ |
| 271 | ArmnnDriverImpl.cpp \ |
| 272 | DriverOptions.cpp \ |
| 273 | ArmnnDevice.cpp \ |
| 274 | ArmnnPreparedModel.cpp \ |
| 275 | ModelToINetworkConverter.cpp \ |
| 276 | RequestThread.cpp \ |
| 277 | Utils.cpp \ |
| 278 | ConversionUtils.cpp |
| 279 | |
| 280 | LOCAL_STATIC_LIBRARIES := \ |
| 281 | libneuralnetworks_common \ |
| 282 | libboost_log \ |
| 283 | libboost_program_options \ |
| 284 | libboost_system \ |
| 285 | libboost_thread \ |
| 286 | libboost_filesystem \ |
| 287 | arm_compute_library |
| 288 | |
| 289 | LOCAL_WHOLE_STATIC_LIBRARIES := libarmnn |
| 290 | |
| 291 | LOCAL_SHARED_LIBRARIES := \ |
| 292 | libbase \ |
| 293 | libhidlbase \ |
| 294 | libhidltransport \ |
| 295 | libhidlmemory \ |
| 296 | liblog \ |
| 297 | libutils \ |
| 298 | android.hardware.neuralnetworks@1.0 \ |
| 299 | android.hardware.neuralnetworks@1.1 \ |
| 300 | android.hidl.allocator@1.0 \ |
| 301 | android.hidl.memory@1.0 |
| 302 | |
| 303 | ifeq ($(Q_OR_LATER),1) |
| 304 | LOCAL_SHARED_LIBRARIES+= \ |
| 305 | libnativewindow \ |
| 306 | libui \ |
| 307 | libfmq \ |
| 308 | libcutils \ |
| 309 | android.hardware.neuralnetworks@1.2 |
| 310 | endif # PLATFORM_VERSION == Q |
| 311 | |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 312 | ifeq ($(R_OR_LATER),1) |
| 313 | LOCAL_SHARED_LIBRARIES+= \ |
Sadik Armagan | d7be72e | 2020-04-23 12:56:05 +0100 | [diff] [blame] | 314 | libsync \ |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 315 | android.hardware.neuralnetworks@1.3 |
| 316 | endif # R or later |
| 317 | |
alered01 | 7c395b2 | 2020-04-03 15:37:24 +0100 | [diff] [blame] | 318 | ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1) |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 319 | LOCAL_SHARED_LIBRARIES+= \ |
| 320 | libOpenCL |
| 321 | endif |
| 322 | |
| 323 | include $(BUILD_STATIC_LIBRARY) |
| 324 | |
| 325 | endif # PLATFORM_VERSION == 9 |
| 326 | |
| 327 | ifeq ($(Q_OR_LATER),1) |
| 328 | # The following target is available starting from Android Q |
| 329 | |
| 330 | ####################### |
| 331 | # libarmnn-driver@1.2 # |
| 332 | ####################### |
| 333 | include $(CLEAR_VARS) |
| 334 | |
| 335 | LOCAL_MODULE := libarmnn-driver@1.2 |
| 336 | LOCAL_MODULE_TAGS := optional |
| 337 | LOCAL_ARM_MODE := arm |
| 338 | LOCAL_PROPRIETARY_MODULE := true |
| 339 | # Mark source files as dependent on Android.mk |
| 340 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 341 | |
| 342 | LOCAL_C_INCLUDES := \ |
| 343 | $(ARMNN_HEADER_PATH) \ |
| 344 | $(ARMNN_UTILS_HEADER_PATH) \ |
| 345 | $(OPENCL_HEADER_PATH) \ |
| 346 | $(NN_HEADER_PATH) |
| 347 | |
| 348 | LOCAL_CFLAGS := \ |
| 349 | -std=$(CPP_VERSION) \ |
| 350 | -fexceptions \ |
| 351 | -Werror \ |
| 352 | -Wno-format-security \ |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 353 | -DBOOST_NO_AUTO_PTR \ |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 354 | -DARMNN_ANDROID_NN_V1_2 |
| 355 | |
| 356 | ifeq ($(ARMNN_DRIVER_DEBUG),1) |
| 357 | LOCAL_CFLAGS+= \ |
| 358 | -UNDEBUG |
| 359 | endif # ARMNN_DRIVER_DEBUG == 1 |
| 360 | |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 361 | # Required to build with the changes made to the Android ML framework specific to Android R |
| 362 | ifeq ($(PLATFORM_VERSION),R) |
| 363 | LOCAL_CFLAGS+= \ |
| 364 | -DARMNN_ANDROID_R |
| 365 | endif # R or later |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 366 | |
| 367 | ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1) |
| 368 | LOCAL_CFLAGS += \ |
| 369 | -DARMCOMPUTECL_ENABLED |
| 370 | endif # ARMNN_COMPUTE_CL_ENABLED == 1 |
| 371 | |
| 372 | ifeq ($(ARMNN_COMPUTE_NEON_ENABLED),1) |
| 373 | LOCAL_CFLAGS += \ |
| 374 | -DARMCOMPUTENEON_ENABLED |
| 375 | endif # ARMNN_COMPUTE_NEON_ENABLED == 1 |
| 376 | |
| 377 | ifeq ($(ARMNN_REF_ENABLED),1) |
| 378 | LOCAL_CFLAGS += \ |
| 379 | -DARMNNREF_ENABLED |
| 380 | endif # ARMNN_REF_ENABLED == 1 |
| 381 | |
| 382 | LOCAL_SRC_FILES := \ |
| 383 | 1.0/ArmnnDriverImpl.cpp \ |
| 384 | 1.0/HalPolicy.cpp \ |
| 385 | 1.1/ArmnnDriverImpl.cpp \ |
| 386 | 1.1/HalPolicy.cpp \ |
| 387 | 1.2/ArmnnDriverImpl.cpp \ |
| 388 | 1.2/HalPolicy.cpp \ |
| 389 | ArmnnDevice.cpp \ |
| 390 | ArmnnDriverImpl.cpp \ |
| 391 | ArmnnPreparedModel.cpp \ |
| 392 | ArmnnPreparedModel_1_2.cpp \ |
| 393 | ConversionUtils.cpp \ |
| 394 | DriverOptions.cpp \ |
| 395 | ModelToINetworkConverter.cpp \ |
| 396 | RequestThread.cpp \ |
| 397 | Utils.cpp |
| 398 | |
| 399 | LOCAL_STATIC_LIBRARIES := \ |
| 400 | libneuralnetworks_common \ |
| 401 | libboost_log \ |
| 402 | libboost_program_options \ |
| 403 | libboost_system \ |
| 404 | libboost_thread \ |
| 405 | libboost_filesystem \ |
| 406 | arm_compute_library |
| 407 | |
| 408 | LOCAL_WHOLE_STATIC_LIBRARIES := libarmnn |
| 409 | |
| 410 | LOCAL_SHARED_LIBRARIES := \ |
| 411 | libbase \ |
| 412 | libhidlbase \ |
| 413 | libhidltransport \ |
| 414 | libhidlmemory \ |
| 415 | liblog \ |
| 416 | libutils \ |
| 417 | libnativewindow \ |
| 418 | libui \ |
| 419 | libfmq \ |
| 420 | libcutils \ |
| 421 | android.hidl.allocator@1.0 \ |
| 422 | android.hidl.memory@1.0 \ |
| 423 | android.hardware.neuralnetworks@1.0 \ |
| 424 | android.hardware.neuralnetworks@1.1 \ |
| 425 | android.hardware.neuralnetworks@1.2 |
| 426 | |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 427 | ifeq ($(R_OR_LATER),1) |
| 428 | LOCAL_SHARED_LIBRARIES+= \ |
Sadik Armagan | d7be72e | 2020-04-23 12:56:05 +0100 | [diff] [blame] | 429 | libsync \ |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 430 | android.hardware.neuralnetworks@1.3 |
| 431 | endif # R or later |
| 432 | |
alered01 | 7c395b2 | 2020-04-03 15:37:24 +0100 | [diff] [blame] | 433 | ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1) |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 434 | LOCAL_SHARED_LIBRARIES+= \ |
| 435 | libOpenCL |
| 436 | endif |
| 437 | |
| 438 | include $(BUILD_STATIC_LIBRARY) |
| 439 | |
| 440 | endif # PLATFORM_VERSION == Q |
| 441 | |
Kevin May | 42477c1 | 2020-03-26 13:34:14 +0000 | [diff] [blame] | 442 | ifeq ($(R_OR_LATER),1) |
| 443 | # The following target is available starting from Android R |
| 444 | |
| 445 | ####################### |
| 446 | # libarmnn-driver@1.3 # |
| 447 | ####################### |
| 448 | include $(CLEAR_VARS) |
| 449 | |
| 450 | LOCAL_MODULE := libarmnn-driver@1.3 |
| 451 | LOCAL_MODULE_TAGS := optional |
| 452 | LOCAL_ARM_MODE := arm |
| 453 | LOCAL_PROPRIETARY_MODULE := true |
| 454 | # Mark source files as dependent on Android.mk |
| 455 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 456 | |
| 457 | LOCAL_C_INCLUDES := \ |
| 458 | $(ARMNN_HEADER_PATH) \ |
| 459 | $(ARMNN_UTILS_HEADER_PATH) \ |
| 460 | $(OPENCL_HEADER_PATH) \ |
| 461 | $(NN_HEADER_PATH) |
| 462 | |
| 463 | LOCAL_CFLAGS := \ |
| 464 | -std=$(CPP_VERSION) \ |
| 465 | -fexceptions \ |
| 466 | -Werror \ |
| 467 | -Wno-format-security \ |
| 468 | -DBOOST_NO_AUTO_PTR \ |
| 469 | -DARMNN_ANDROID_NN_V1_3 \ |
| 470 | -DARMNN_ANDROID_R |
| 471 | |
| 472 | ifeq ($(ARMNN_DRIVER_DEBUG),1) |
| 473 | LOCAL_CFLAGS+= \ |
| 474 | -UNDEBUG |
| 475 | endif # ARMNN_DRIVER_DEBUG == 1 |
| 476 | |
| 477 | ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1) |
| 478 | LOCAL_CFLAGS += \ |
| 479 | -DARMCOMPUTECL_ENABLED |
| 480 | endif # ARMNN_COMPUTE_CL_ENABLED == 1 |
| 481 | |
| 482 | ifeq ($(ARMNN_COMPUTE_NEON_ENABLED),1) |
| 483 | LOCAL_CFLAGS += \ |
| 484 | -DARMCOMPUTENEON_ENABLED |
| 485 | endif # ARMNN_COMPUTE_NEON_ENABLED == 1 |
| 486 | |
| 487 | ifeq ($(ARMNN_REF_ENABLED),1) |
| 488 | LOCAL_CFLAGS += \ |
| 489 | -DARMNNREF_ENABLED |
| 490 | endif # ARMNN_REF_ENABLED == 1 |
| 491 | |
Narumol Prangnawarat | cad4e91 | 2020-06-02 12:07:43 +0100 | [diff] [blame^] | 492 | LOCAL_CFLAGS += \ |
| 493 | -DRETIRE_RATE=$(RETIRE_RATE) |
| 494 | |
Kevin May | 42477c1 | 2020-03-26 13:34:14 +0000 | [diff] [blame] | 495 | LOCAL_SRC_FILES := \ |
| 496 | 1.0/ArmnnDriverImpl.cpp \ |
| 497 | 1.0/HalPolicy.cpp \ |
| 498 | 1.1/ArmnnDriverImpl.cpp \ |
| 499 | 1.1/HalPolicy.cpp \ |
| 500 | 1.2/ArmnnDriverImpl.cpp \ |
| 501 | 1.2/HalPolicy.cpp \ |
| 502 | 1.3/ArmnnDriverImpl.cpp \ |
| 503 | 1.3/HalPolicy.cpp \ |
| 504 | ArmnnDevice.cpp \ |
| 505 | ArmnnDriverImpl.cpp \ |
| 506 | ArmnnPreparedModel.cpp \ |
| 507 | ArmnnPreparedModel_1_2.cpp \ |
| 508 | ArmnnPreparedModel_1_3.cpp \ |
| 509 | ConversionUtils.cpp \ |
| 510 | DriverOptions.cpp \ |
| 511 | ModelToINetworkConverter.cpp \ |
| 512 | RequestThread.cpp \ |
Narumol Prangnawarat | cad4e91 | 2020-06-02 12:07:43 +0100 | [diff] [blame^] | 513 | RequestThread_1_3.cpp \ |
Kevin May | 42477c1 | 2020-03-26 13:34:14 +0000 | [diff] [blame] | 514 | Utils.cpp |
| 515 | |
| 516 | LOCAL_STATIC_LIBRARIES := \ |
| 517 | libneuralnetworks_common \ |
| 518 | libboost_log \ |
| 519 | libboost_program_options \ |
| 520 | libboost_system \ |
| 521 | libboost_thread \ |
| 522 | libboost_filesystem \ |
| 523 | arm_compute_library |
| 524 | |
| 525 | LOCAL_WHOLE_STATIC_LIBRARIES := libarmnn |
| 526 | |
| 527 | LOCAL_SHARED_LIBRARIES := \ |
| 528 | libbase \ |
| 529 | libhidlbase \ |
| 530 | libhidltransport \ |
| 531 | libhidlmemory \ |
| 532 | liblog \ |
| 533 | libutils \ |
| 534 | libnativewindow \ |
| 535 | libui \ |
| 536 | libfmq \ |
| 537 | libcutils \ |
| 538 | android.hidl.allocator@1.0 \ |
| 539 | android.hidl.memory@1.0 \ |
Sadik Armagan | d7be72e | 2020-04-23 12:56:05 +0100 | [diff] [blame] | 540 | libsync \ |
Kevin May | 42477c1 | 2020-03-26 13:34:14 +0000 | [diff] [blame] | 541 | android.hardware.neuralnetworks@1.0 \ |
| 542 | android.hardware.neuralnetworks@1.1 \ |
| 543 | android.hardware.neuralnetworks@1.2 \ |
| 544 | android.hardware.neuralnetworks@1.3 |
| 545 | |
alered01 | 7c395b2 | 2020-04-03 15:37:24 +0100 | [diff] [blame] | 546 | ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1) |
Kevin May | 42477c1 | 2020-03-26 13:34:14 +0000 | [diff] [blame] | 547 | LOCAL_SHARED_LIBRARIES+= \ |
| 548 | libOpenCL |
| 549 | endif |
| 550 | |
| 551 | include $(BUILD_STATIC_LIBRARY) |
| 552 | |
| 553 | endif # PLATFORM_VERSION == R |
| 554 | |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 555 | ##################################################### |
Kevin May | abc95d0 | 2020-05-15 15:34:03 +0100 | [diff] [blame] | 556 | # android.hardware.neuralnetworks@1.0-service-armnn # |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 557 | ##################################################### |
| 558 | include $(CLEAR_VARS) |
| 559 | |
Kevin May | abc95d0 | 2020-05-15 15:34:03 +0100 | [diff] [blame] | 560 | LOCAL_MODULE := android.hardware.neuralnetworks@1.0-service-armnn |
| 561 | LOCAL_INIT_RC := android.hardware.neuralnetworks@1.0-service-armnn.rc |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 562 | ifeq ($(Q_OR_LATER),1) |
| 563 | # "eng" is deprecated in Android Q |
| 564 | LOCAL_MODULE_TAGS := optional |
| 565 | else |
| 566 | LOCAL_MODULE_TAGS := eng optional |
| 567 | endif |
| 568 | LOCAL_ARM_MODE := arm |
| 569 | LOCAL_MODULE_RELATIVE_PATH := hw |
| 570 | LOCAL_PROPRIETARY_MODULE := true |
| 571 | # Mark source files as dependent on Android.mk |
| 572 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 573 | |
| 574 | LOCAL_C_INCLUDES := \ |
| 575 | $(ARMNN_HEADER_PATH) \ |
| 576 | $(NN_HEADER_PATH) |
| 577 | |
| 578 | LOCAL_CFLAGS := \ |
| 579 | -std=$(CPP_VERSION) \ |
| 580 | -fexceptions |
| 581 | |
| 582 | ifeq ($(ARMNN_DRIVER_DEBUG),1) |
| 583 | LOCAL_CFLAGS += \ |
| 584 | -UNDEBUG |
| 585 | endif # ARMNN_DRIVER_DEBUG == 1 |
| 586 | |
| 587 | ifeq ($(Q_OR_LATER),1) |
| 588 | LOCAL_CFLAGS += \ |
| 589 | -DBOOST_NO_AUTO_PTR |
| 590 | endif # PLATFORM_VERSION == Q or later |
| 591 | |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 592 | # Required to build with the changes made to the Android ML framework specific to Android R |
| 593 | ifeq ($(PLATFORM_VERSION),R) |
| 594 | LOCAL_CFLAGS+= \ |
| 595 | -DARMNN_ANDROID_R |
| 596 | endif # R or later |
| 597 | |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 598 | LOCAL_SRC_FILES := \ |
| 599 | service.cpp |
| 600 | |
| 601 | LOCAL_STATIC_LIBRARIES := \ |
| 602 | libneuralnetworks_common \ |
| 603 | libboost_log \ |
| 604 | libboost_program_options \ |
| 605 | libboost_system \ |
| 606 | libboost_thread \ |
| 607 | libboost_filesystem \ |
| 608 | arm_compute_library |
| 609 | |
| 610 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 611 | libarmnn-driver@1.0 |
| 612 | |
| 613 | LOCAL_SHARED_LIBRARIES := \ |
| 614 | libbase \ |
| 615 | libhidlbase \ |
| 616 | libhidltransport \ |
| 617 | libhidlmemory \ |
| 618 | libdl \ |
| 619 | libhardware \ |
| 620 | liblog \ |
| 621 | libtextclassifier_hash \ |
| 622 | libutils \ |
| 623 | android.hardware.neuralnetworks@1.0 \ |
| 624 | android.hidl.allocator@1.0 \ |
| 625 | android.hidl.memory@1.0 |
| 626 | |
| 627 | ifeq ($(P_OR_LATER),1) |
| 628 | # Required to build the 1.0 version of the NN Driver on Android P and later versions, |
| 629 | # as the 1.0 version of the NN API needs the 1.1 HAL headers to be included regardless. |
| 630 | LOCAL_SHARED_LIBRARIES+= \ |
| 631 | android.hardware.neuralnetworks@1.1 |
| 632 | endif # PLATFORM_VERSION == 9 |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 633 | |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 634 | ifeq ($(Q_OR_LATER),1) |
| 635 | LOCAL_SHARED_LIBRARIES+= \ |
| 636 | libnativewindow \ |
| 637 | libui \ |
| 638 | libfmq \ |
| 639 | libcutils \ |
| 640 | android.hardware.neuralnetworks@1.2 |
| 641 | endif # PLATFORM_VERSION == Q |
| 642 | |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 643 | ifeq ($(R_OR_LATER),1) |
| 644 | LOCAL_SHARED_LIBRARIES+= \ |
Sadik Armagan | d7be72e | 2020-04-23 12:56:05 +0100 | [diff] [blame] | 645 | libsync \ |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 646 | android.hardware.neuralnetworks@1.3 |
| 647 | endif # R or later |
| 648 | |
alered01 | 7c395b2 | 2020-04-03 15:37:24 +0100 | [diff] [blame] | 649 | ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1) |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 650 | LOCAL_SHARED_LIBRARIES+= \ |
| 651 | libOpenCL |
| 652 | endif |
| 653 | |
| 654 | include $(BUILD_EXECUTABLE) |
| 655 | |
| 656 | ifeq ($(P_OR_LATER),1) |
| 657 | # The following target is available starting from Android P |
| 658 | |
| 659 | ##################################################### |
Kevin May | abc95d0 | 2020-05-15 15:34:03 +0100 | [diff] [blame] | 660 | # android.hardware.neuralnetworks@1.1-service-armnn # |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 661 | ##################################################### |
| 662 | include $(CLEAR_VARS) |
| 663 | |
Kevin May | abc95d0 | 2020-05-15 15:34:03 +0100 | [diff] [blame] | 664 | LOCAL_MODULE := android.hardware.neuralnetworks@1.1-service-armnn |
| 665 | LOCAL_INIT_RC := android.hardware.neuralnetworks@1.1-service-armnn.rc |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 666 | ifeq ($(Q_OR_LATER),1) |
| 667 | # "eng" is deprecated in Android Q |
| 668 | LOCAL_MODULE_TAGS := optional |
| 669 | else |
| 670 | LOCAL_MODULE_TAGS := eng optional |
| 671 | endif |
| 672 | LOCAL_ARM_MODE := arm |
| 673 | LOCAL_MODULE_RELATIVE_PATH := hw |
| 674 | LOCAL_PROPRIETARY_MODULE := true |
| 675 | # Mark source files as dependent on Android.mk |
| 676 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 677 | |
| 678 | LOCAL_C_INCLUDES := \ |
| 679 | $(ARMNN_HEADER_PATH) \ |
| 680 | $(NN_HEADER_PATH) |
| 681 | |
| 682 | LOCAL_CFLAGS := \ |
| 683 | -std=$(CPP_VERSION) \ |
| 684 | -fexceptions \ |
| 685 | -DARMNN_ANDROID_NN_V1_1 |
| 686 | |
| 687 | ifeq ($(ARMNN_DRIVER_DEBUG),1) |
| 688 | LOCAL_CFLAGS += \ |
| 689 | -UNDEBUG |
| 690 | endif # ARMNN_DRIVER_DEBUG == 1 |
| 691 | |
| 692 | ifeq ($(Q_OR_LATER),1) |
| 693 | LOCAL_CFLAGS += \ |
| 694 | -DBOOST_NO_AUTO_PTR |
| 695 | endif # PLATFORM_VERSION == Q or later |
| 696 | |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 697 | # Required to build with the changes made to the Android ML framework specific to Android R |
| 698 | ifeq ($(PLATFORM_VERSION),R) |
| 699 | LOCAL_CFLAGS+= \ |
| 700 | -DARMNN_ANDROID_R |
| 701 | endif # R or later |
| 702 | |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 703 | LOCAL_SRC_FILES := \ |
| 704 | service.cpp |
| 705 | |
| 706 | LOCAL_STATIC_LIBRARIES := \ |
| 707 | libneuralnetworks_common \ |
| 708 | libboost_log \ |
| 709 | libboost_program_options \ |
| 710 | libboost_system \ |
| 711 | libboost_thread \ |
| 712 | libboost_filesystem \ |
| 713 | arm_compute_library |
| 714 | |
| 715 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 716 | libarmnn-driver@1.1 |
| 717 | |
| 718 | LOCAL_SHARED_LIBRARIES := \ |
| 719 | libbase \ |
| 720 | libhidlbase \ |
| 721 | libhidltransport \ |
| 722 | libhidlmemory \ |
| 723 | libdl \ |
| 724 | libhardware \ |
| 725 | liblog \ |
| 726 | libtextclassifier_hash \ |
| 727 | libutils \ |
| 728 | android.hardware.neuralnetworks@1.0 \ |
| 729 | android.hardware.neuralnetworks@1.1 \ |
| 730 | android.hidl.allocator@1.0 \ |
| 731 | android.hidl.memory@1.0 |
| 732 | |
| 733 | ifeq ($(Q_OR_LATER),1) |
| 734 | LOCAL_SHARED_LIBRARIES+= \ |
| 735 | libnativewindow \ |
| 736 | libui \ |
| 737 | libfmq \ |
| 738 | libcutils \ |
| 739 | android.hardware.neuralnetworks@1.2 |
| 740 | endif # PLATFORM_VERSION == Q |
| 741 | |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 742 | ifeq ($(R_OR_LATER),1) |
| 743 | LOCAL_SHARED_LIBRARIES+= \ |
Sadik Armagan | d7be72e | 2020-04-23 12:56:05 +0100 | [diff] [blame] | 744 | libsync \ |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 745 | android.hardware.neuralnetworks@1.3 |
| 746 | endif # PLATFORM_VERSION == R |
| 747 | |
alered01 | 7c395b2 | 2020-04-03 15:37:24 +0100 | [diff] [blame] | 748 | ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1) |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 749 | LOCAL_SHARED_LIBRARIES+= \ |
| 750 | libOpenCL |
| 751 | endif |
| 752 | |
| 753 | include $(BUILD_EXECUTABLE) |
| 754 | |
| 755 | endif # PLATFORM_VERSION == 9 |
| 756 | |
| 757 | ifeq ($(Q_OR_LATER),1) |
| 758 | # The following target is available starting from Android Q |
| 759 | |
| 760 | ##################################################### |
Kevin May | abc95d0 | 2020-05-15 15:34:03 +0100 | [diff] [blame] | 761 | # android.hardware.neuralnetworks@1.2-service-armnn # |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 762 | ##################################################### |
| 763 | include $(CLEAR_VARS) |
| 764 | |
Kevin May | abc95d0 | 2020-05-15 15:34:03 +0100 | [diff] [blame] | 765 | LOCAL_MODULE := android.hardware.neuralnetworks@1.2-service-armnn |
| 766 | LOCAL_INIT_RC := android.hardware.neuralnetworks@1.2-service-armnn.rc |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 767 | LOCAL_MODULE_TAGS := optional |
| 768 | LOCAL_ARM_MODE := arm |
| 769 | LOCAL_MODULE_RELATIVE_PATH := hw |
| 770 | LOCAL_PROPRIETARY_MODULE := true |
| 771 | # Mark source files as dependent on Android.mk |
| 772 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 773 | |
| 774 | LOCAL_C_INCLUDES := \ |
| 775 | $(ARMNN_HEADER_PATH) \ |
| 776 | $(NN_HEADER_PATH) |
| 777 | |
| 778 | LOCAL_CFLAGS := \ |
| 779 | -std=$(CPP_VERSION) \ |
| 780 | -fexceptions \ |
| 781 | -DARMNN_ANDROID_NN_V1_2 \ |
| 782 | -DBOOST_NO_AUTO_PTR |
| 783 | |
| 784 | ifeq ($(ARMNN_DRIVER_DEBUG),1) |
| 785 | LOCAL_CFLAGS += \ |
| 786 | -UNDEBUG |
| 787 | endif # ARMNN_DRIVER_DEBUG == 1 |
| 788 | |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 789 | # Required to build with the changes made to the Android ML framework specific to Android R |
| 790 | ifeq ($(PLATFORM_VERSION),R) |
| 791 | LOCAL_CFLAGS+= \ |
| 792 | -DARMNN_ANDROID_R |
| 793 | endif # R or later |
| 794 | |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 795 | LOCAL_SRC_FILES := \ |
| 796 | service.cpp |
| 797 | |
| 798 | LOCAL_STATIC_LIBRARIES := \ |
| 799 | libneuralnetworks_common \ |
| 800 | libboost_log \ |
| 801 | libboost_program_options \ |
| 802 | libboost_system \ |
| 803 | libboost_thread \ |
| 804 | libboost_filesystem \ |
| 805 | arm_compute_library |
| 806 | |
| 807 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 808 | libarmnn-driver@1.2 |
| 809 | |
| 810 | LOCAL_SHARED_LIBRARIES := \ |
| 811 | libbase \ |
| 812 | libhidlbase \ |
| 813 | libhidltransport \ |
| 814 | libhidlmemory \ |
| 815 | libdl \ |
| 816 | libhardware \ |
| 817 | liblog \ |
| 818 | libtextclassifier_hash \ |
| 819 | libutils \ |
| 820 | libnativewindow \ |
| 821 | libui \ |
| 822 | libfmq \ |
| 823 | libcutils \ |
| 824 | android.hidl.allocator@1.0 \ |
| 825 | android.hidl.memory@1.0 \ |
| 826 | android.hardware.neuralnetworks@1.0 \ |
| 827 | android.hardware.neuralnetworks@1.1 \ |
| 828 | android.hardware.neuralnetworks@1.2 |
| 829 | |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 830 | ifeq ($(R_OR_LATER),1) |
| 831 | LOCAL_SHARED_LIBRARIES+= \ |
Sadik Armagan | d7be72e | 2020-04-23 12:56:05 +0100 | [diff] [blame] | 832 | libsync \ |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 833 | android.hardware.neuralnetworks@1.3 |
| 834 | endif # R or later |
| 835 | |
alered01 | 7c395b2 | 2020-04-03 15:37:24 +0100 | [diff] [blame] | 836 | ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1) |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 837 | LOCAL_SHARED_LIBRARIES+= \ |
| 838 | libOpenCL |
| 839 | endif |
| 840 | |
| 841 | include $(BUILD_EXECUTABLE) |
| 842 | |
| 843 | endif # PLATFORM_VERSION == Q |
| 844 | |
Kevin May | 42477c1 | 2020-03-26 13:34:14 +0000 | [diff] [blame] | 845 | ifeq ($(R_OR_LATER),1) |
| 846 | # The following target is available starting from Android R |
| 847 | |
| 848 | ##################################################### |
Kevin May | abc95d0 | 2020-05-15 15:34:03 +0100 | [diff] [blame] | 849 | # android.hardware.neuralnetworks@1.3-service-armnn # |
Kevin May | 42477c1 | 2020-03-26 13:34:14 +0000 | [diff] [blame] | 850 | ##################################################### |
| 851 | include $(CLEAR_VARS) |
| 852 | |
Kevin May | abc95d0 | 2020-05-15 15:34:03 +0100 | [diff] [blame] | 853 | LOCAL_MODULE := android.hardware.neuralnetworks@1.3-service-armnn |
| 854 | LOCAL_INIT_RC := android.hardware.neuralnetworks@1.3-service-armnn.rc |
Kevin May | 42477c1 | 2020-03-26 13:34:14 +0000 | [diff] [blame] | 855 | LOCAL_MODULE_TAGS := optional |
| 856 | LOCAL_ARM_MODE := arm |
| 857 | LOCAL_MODULE_RELATIVE_PATH := hw |
| 858 | LOCAL_PROPRIETARY_MODULE := true |
| 859 | # Mark source files as dependent on Android.mk |
| 860 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 861 | |
| 862 | LOCAL_C_INCLUDES := \ |
| 863 | $(ARMNN_HEADER_PATH) \ |
| 864 | $(NN_HEADER_PATH) |
| 865 | |
| 866 | LOCAL_CFLAGS := \ |
| 867 | -std=$(CPP_VERSION) \ |
| 868 | -fexceptions \ |
| 869 | -DARMNN_ANDROID_NN_V1_3 \ |
| 870 | -DBOOST_NO_AUTO_PTR \ |
| 871 | -DARMNN_ANDROID_R |
| 872 | |
| 873 | ifeq ($(ARMNN_DRIVER_DEBUG),1) |
| 874 | LOCAL_CFLAGS += \ |
| 875 | -UNDEBUG |
| 876 | endif # ARMNN_DRIVER_DEBUG == 1 |
| 877 | |
| 878 | LOCAL_SRC_FILES := \ |
| 879 | service.cpp |
| 880 | |
| 881 | LOCAL_STATIC_LIBRARIES := \ |
| 882 | libneuralnetworks_common \ |
| 883 | libboost_log \ |
| 884 | libboost_program_options \ |
| 885 | libboost_system \ |
| 886 | libboost_thread \ |
| 887 | libboost_filesystem \ |
| 888 | arm_compute_library |
| 889 | |
| 890 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 891 | libarmnn-driver@1.3 |
| 892 | |
| 893 | LOCAL_SHARED_LIBRARIES := \ |
| 894 | libbase \ |
| 895 | libhidlbase \ |
| 896 | libhidltransport \ |
| 897 | libhidlmemory \ |
| 898 | libdl \ |
| 899 | libhardware \ |
| 900 | liblog \ |
| 901 | libtextclassifier_hash \ |
| 902 | libutils \ |
| 903 | libnativewindow \ |
| 904 | libui \ |
| 905 | libfmq \ |
| 906 | libcutils \ |
Sadik Armagan | d7be72e | 2020-04-23 12:56:05 +0100 | [diff] [blame] | 907 | libsync \ |
Kevin May | 42477c1 | 2020-03-26 13:34:14 +0000 | [diff] [blame] | 908 | android.hidl.allocator@1.0 \ |
| 909 | android.hidl.memory@1.0 \ |
| 910 | android.hardware.neuralnetworks@1.0 \ |
| 911 | android.hardware.neuralnetworks@1.1 \ |
| 912 | android.hardware.neuralnetworks@1.2 \ |
| 913 | android.hardware.neuralnetworks@1.3 |
| 914 | |
alered01 | 7c395b2 | 2020-04-03 15:37:24 +0100 | [diff] [blame] | 915 | ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1) |
Kevin May | 42477c1 | 2020-03-26 13:34:14 +0000 | [diff] [blame] | 916 | LOCAL_SHARED_LIBRARIES+= \ |
| 917 | libOpenCL |
| 918 | endif |
| 919 | |
| 920 | include $(BUILD_EXECUTABLE) |
| 921 | |
| 922 | endif # PLATFORM_VERSION == R |
| 923 | |
Mike Kelly | 0e41513 | 2020-02-11 11:21:25 +0000 | [diff] [blame] | 924 | ########################## |
| 925 | # armnn module and tests # |
| 926 | ########################## |
| 927 | # Note we use ANDROID_NN_DRIVER_LOCAL_PATH rather than LOCAL_PATH because LOCAL_PATH will be overwritten |
| 928 | # when including other .mk files that set it. |
| 929 | include $(ANDROID_NN_DRIVER_LOCAL_PATH)/armnn/Android.mk |
| 930 | include $(ANDROID_NN_DRIVER_LOCAL_PATH)/test/Android.mk |