1/* 2 * Copyright 2017 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 17cc_library_headers { 18 name: "libneuralnetworks_headers", 19 host_supported: false, 20 vendor_available: true, 21 export_include_dirs: ["include"], 22} 23 24cc_library_headers { 25 name: "libneuralnetworks_private_headers", 26 host_supported: false, 27 export_include_dirs: ["."], 28} 29 30cc_library { 31 name: "libneuralnetworks", 32 defaults: ["neuralnetworks_defaults"], 33 host_supported: false, 34 openmp: true, 35 36 srcs: [ 37 "Callbacks.cpp", 38 "CompilationBuilder.cpp", 39 "ExecutionBuilder.cpp", 40 "ExecutionPlan.cpp", 41 "Manager.cpp", 42 "Memory.cpp", 43 "ModelBuilder.cpp", 44 "NeuralNetworks.cpp", 45 "VersionedIDevice.cpp", 46 ], 47 48 target: { 49 android: { 50 version_script: "libneuralnetworks.map.txt", 51 shared_libs: [ 52 "libbase", 53 "libcutils", 54 "libhidlbase", 55 "libhidltransport", 56 "libhidlmemory", 57 "liblog", 58 "libutils", 59 "android.hardware.neuralnetworks@1.0", 60 "android.hardware.neuralnetworks@1.1", 61 "android.hidl.allocator@1.0", 62 "android.hidl.memory@1.0", 63 ], 64 }, 65 host: { 66 shared_libs: [ 67 ], 68 }, 69 }, 70 71 static_libs: [ 72 "libneuralnetworks_common", 73 ], 74 75 shared_libs: [ 76 "libtextclassifier_hash" 77 ], 78 79 header_libs: [ 80 "libneuralnetworks_headers", 81 ], 82 83 export_header_lib_headers: [ 84 "libneuralnetworks_headers", 85 ], 86} 87 88ndk_headers { 89 name: "libneuralnetworks_ndk_headers", 90 from: "include", 91 to: "android", 92 srcs: ["include/NeuralNetworks.h"], 93 license: "NOTICE", 94} 95 96ndk_library { 97 name: "libneuralnetworks", 98 symbol_file: "libneuralnetworks.map.txt", 99 // Android O-MR1 100 first_version: "27", 101} 102 103llndk_library { 104 name: "libneuralnetworks", 105 symbol_file: "libneuralnetworks.map.txt", 106 export_include_dirs: ["include"], 107} 108