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