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 | ANDROID_NN_DRIVER_LOCAL_PATH := $(call my-dir) |
| 7 | LOCAL_PATH := $(ANDROID_NN_DRIVER_LOCAL_PATH) |
| 8 | |
| 9 | # Configure these paths if you move the source or Khronos headers |
| 10 | OPENCL_HEADER_PATH := $(LOCAL_PATH)/../mali/product/khronos/original |
| 11 | NN_HEADER_PATH := $(LOCAL_PATH)/../../../frameworks/ml/nn/runtime/include |
| 12 | |
| 13 | ################### |
| 14 | # libarmnn-driver # |
| 15 | ################### |
| 16 | include $(CLEAR_VARS) |
| 17 | |
| 18 | LOCAL_MODULE := libarmnn-driver |
| 19 | LOCAL_MODULE_TAGS := eng optional |
| 20 | LOCAL_ARM_MODE := arm |
| 21 | # Mark source files as dependent on Android.mk |
| 22 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 23 | |
| 24 | LOCAL_C_INCLUDES := \ |
| 25 | $(OPENCL_HEADER_PATH) \ |
| 26 | $(NN_HEADER_PATH) |
| 27 | |
| 28 | LOCAL_CFLAGS := \ |
| 29 | -std=c++14 \ |
| 30 | -fexceptions \ |
| 31 | -Werror \ |
| 32 | -Wno-format-security |
| 33 | ifeq ($(ARMNN_DRIVER_DEBUG),1) |
| 34 | LOCAL_CFLAGS+= -UNDEBUG |
| 35 | endif |
| 36 | |
| 37 | LOCAL_SRC_FILES := \ |
| 38 | ArmnnDriver.cpp \ |
| 39 | ArmnnPreparedModel.cpp \ |
| 40 | ModelToINetworkConverter.cpp \ |
| 41 | RequestThread.cpp \ |
| 42 | Utils.cpp |
| 43 | |
| 44 | LOCAL_STATIC_LIBRARIES := \ |
| 45 | libneuralnetworks_common \ |
| 46 | libarmnn \ |
| 47 | libboost_log \ |
| 48 | libboost_program_options \ |
| 49 | libboost_system \ |
| 50 | libboost_thread \ |
| 51 | armnn-arm_compute \ |
| 52 | |
| 53 | LOCAL_SHARED_LIBRARIES := \ |
| 54 | libbase \ |
| 55 | libhidlbase \ |
| 56 | libhidltransport \ |
| 57 | libhidlmemory \ |
| 58 | liblog \ |
| 59 | libutils \ |
| 60 | android.hardware.neuralnetworks@1.0 \ |
| 61 | android.hidl.allocator@1.0 \ |
| 62 | android.hidl.memory@1.0 \ |
| 63 | libOpenCL |
| 64 | |
| 65 | include $(BUILD_STATIC_LIBRARY) |
| 66 | |
| 67 | ##################################################### |
| 68 | # android.hardware.neuralnetworks@1.0-service-armnn # |
| 69 | ##################################################### |
| 70 | include $(CLEAR_VARS) |
| 71 | |
| 72 | LOCAL_MODULE := android.hardware.neuralnetworks@1.0-service-armnn |
| 73 | LOCAL_INIT_RC := android.hardware.neuralnetworks@1.0-service-armnn.rc |
| 74 | LOCAL_MODULE_TAGS := eng optional |
| 75 | LOCAL_ARM_MODE := arm |
| 76 | LOCAL_MODULE_RELATIVE_PATH := hw |
| 77 | LOCAL_PROPRIETARY_MODULE := true |
| 78 | # Mark source files as dependent on Android.mk |
| 79 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 80 | |
| 81 | LOCAL_C_INCLUDES := \ |
| 82 | $(NN_HEADER_PATH) |
| 83 | |
| 84 | LOCAL_CFLAGS := \ |
| 85 | -std=c++14 \ |
| 86 | -fexceptions |
| 87 | ifeq ($(ARMNN_DRIVER_DEBUG),1) |
| 88 | LOCAL_CFLAGS+= -UNDEBUG |
| 89 | endif |
| 90 | |
| 91 | LOCAL_SRC_FILES := \ |
| 92 | service.cpp |
| 93 | |
| 94 | LOCAL_STATIC_LIBRARIES := \ |
| 95 | libarmnn-driver \ |
| 96 | libneuralnetworks_common \ |
| 97 | libarmnn \ |
| 98 | libboost_log \ |
| 99 | libboost_program_options \ |
| 100 | libboost_system \ |
| 101 | libboost_thread \ |
| 102 | armnn-arm_compute |
| 103 | |
| 104 | LOCAL_SHARED_LIBRARIES := \ |
| 105 | libbase \ |
| 106 | libhidlbase \ |
| 107 | libhidltransport \ |
| 108 | libhidlmemory \ |
| 109 | libdl \ |
| 110 | libhardware \ |
| 111 | libtextclassifier \ |
| 112 | libtextclassifier_hash \ |
| 113 | liblog \ |
| 114 | libutils \ |
| 115 | android.hardware.neuralnetworks@1.0 \ |
| 116 | android.hidl.allocator@1.0 \ |
| 117 | android.hidl.memory@1.0 \ |
| 118 | libOpenCL |
| 119 | |
| 120 | include $(BUILD_EXECUTABLE) |
| 121 | |
| 122 | ########################## |
| 123 | # armnn module and tests # |
| 124 | ########################## |
| 125 | # Note we use ANDROID_NN_DRIVER_LOCAL_PATH rather than LOCAL_PATH because LOCAL_PATH will be overwritten |
| 126 | # when including other .mk files that set it. |
| 127 | include $(ANDROID_NN_DRIVER_LOCAL_PATH)/armnn/Android.mk |
| 128 | include $(ANDROID_NN_DRIVER_LOCAL_PATH)/test/Android.mk |