1/* 2 * Copyright 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17// package has name collision with other module, must use licenses in targets 18// package { 19// default_applicable_licenses: ["Android-Apache-2.0"], 20// } 21 22cc_library_headers { 23 name: "neuralnetworks_supportlibrary_types_ndk", 24 export_include_dirs: ["public"], 25 licenses: ["Android-Apache-2.0"], 26 sdk_version: "current", 27 vendor_available: true, 28 min_sdk_version: "29", 29} 30 31/** Version of the shim (Adapter between SL/Updatable Driver and sAIDL service) 32 * intended to be used by a non-updatable (without an OTA) NNAPI vendor drivers 33 * backed by a SL/Updatable Driver. 34 */ 35package { 36 default_applicable_licenses: ["Android-Apache-2.0"], 37} 38 39cc_library_static { 40 name: "libneuralnetworks_shim_static", 41 apex_available: [ 42 "//apex_available:platform", 43 "com.android.neuralnetworks", 44 "test_com.android.neuralnetworks", 45 ], 46 srcs: [ 47 "NeuralNetworksShim.cpp", 48 "ShimBufferTracker.cpp", 49 "ShimConverter.cpp", 50 "ShimDevice.cpp", 51 "ShimDeviceManager.cpp", 52 "ShimPreparedModel.cpp", 53 "ShimUtils.cpp", 54 ], 55 licenses: ["Android-Apache-2.0"], 56 vendor_available: true, 57 min_sdk_version: "30", 58 cflags: [ 59 // Needed by neuralnetworks_supportlibrary_loader 60 // Should be removed after doing b/117845862 61 "-DNNTEST_SLTS", 62 "-DNN_COMPATIBILITY_LIBRARY_BUILD", 63 "-Wall", 64 "-Werror", 65 ], 66 header_libs: [ 67 "libneuralnetworks_headers", 68 ], 69 local_include_dirs: [ 70 "include", 71 ], 72 static_libs: [ 73 "android.hardware.common-V2-ndk_platform", 74 "android.hardware.neuralnetworks-V1-ndk_platform", 75 "libaidlcommonsupport", 76 "libarect", 77 "libcutils", 78 "libneuralnetworks_common", 79 "neuralnetworks_supportlibrary_loader", 80 "neuralnetworks_utils_hal_aidl", 81 "neuralnetworks_utils_hal_common", 82 ], 83 shared_libs: [ 84 "libbase", 85 "libbinder_ndk", 86 "libhidlbase", 87 "libhidlmemory", 88 "liblog", 89 "libnativewindow", 90 ], 91 export_include_dirs: [ 92 "public", 93 ], 94} 95 96cc_library_static { 97 name: "neuralnetworks_supportlibrary_loader", 98 srcs: [ 99 "SupportLibrary.cpp", 100 "SupportLibraryWrapper.cpp", 101 ], 102 shared_libs: [ 103 "libnativewindow", 104 ], 105 cflags: [ 106 "-DNNTEST_COMPUTE_MODE", 107 "-DNNTEST_ONLY_PUBLIC_API", 108 "-DNNTEST_SLTS", 109 "-DNN_COMPATIBILITY_LIBRARY_BUILD", 110 "-Wall", 111 "-Werror", 112 ], 113 apex_available: [ 114 "//apex_available:platform", 115 "com.android.neuralnetworks", 116 "test_com.android.neuralnetworks", 117 ], 118 export_include_dirs: [ 119 "include", 120 "public", 121 ], 122 static_libs: [ 123 "libarect", 124 "libbase", 125 ], 126 licenses: ["Android-Apache-2.0"], 127 vendor_available: true, 128 min_sdk_version: "29", 129 header_libs: [ 130 "libneuralnetworks_headers", 131 ], 132} 133