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