| /* |
| * Copyright 2021 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| // package has name collision with other module, must use licenses in targets |
| // package { |
| // default_applicable_licenses: ["Android-Apache-2.0"], |
| // } |
| |
| cc_library_headers { |
| name: "neuralnetworks_supportlibrary_types_ndk", |
| export_include_dirs: ["public"], |
| licenses: ["Android-Apache-2.0"], |
| sdk_version: "current", |
| vendor_available: true, |
| min_sdk_version: "29", |
| } |
| |
| /** Version of the shim (Adapter between SL/Updatable Driver and sAIDL service) |
| * intended to be used by a non-updatable (without an OTA) NNAPI vendor drivers |
| * backed by a SL/Updatable Driver. |
| */ |
| package { |
| default_applicable_licenses: ["Android-Apache-2.0"], |
| } |
| |
| cc_library_static { |
| name: "libneuralnetworks_shim_static", |
| apex_available: [ |
| "//apex_available:platform", |
| "com.android.neuralnetworks", |
| "test_com.android.neuralnetworks", |
| ], |
| srcs: [ |
| "NeuralNetworksShim.cpp", |
| "ShimBufferTracker.cpp", |
| "ShimConverter.cpp", |
| "ShimDevice.cpp", |
| "ShimDeviceManager.cpp", |
| "ShimPreparedModel.cpp", |
| "ShimUtils.cpp", |
| ], |
| licenses: ["Android-Apache-2.0"], |
| vendor_available: true, |
| min_sdk_version: "30", |
| cflags: [ |
| // Needed by neuralnetworks_supportlibrary_loader |
| // Should be removed after doing b/117845862 |
| "-DNNTEST_SLTS", |
| "-DNN_COMPATIBILITY_LIBRARY_BUILD", |
| "-Wall", |
| "-Werror", |
| ], |
| header_libs: [ |
| "libneuralnetworks_headers", |
| ], |
| local_include_dirs: [ |
| "include", |
| ], |
| static_libs: [ |
| "android.hardware.common-V2-ndk_platform", |
| "android.hardware.neuralnetworks-V1-ndk_platform", |
| "libaidlcommonsupport", |
| "libarect", |
| "libcutils", |
| "libneuralnetworks_common", |
| "neuralnetworks_supportlibrary_loader", |
| "neuralnetworks_utils_hal_aidl", |
| "neuralnetworks_utils_hal_common", |
| ], |
| shared_libs: [ |
| "libbase", |
| "libbinder_ndk", |
| "libhidlbase", |
| "libhidlmemory", |
| "liblog", |
| "libnativewindow", |
| ], |
| export_include_dirs: [ |
| "public", |
| ], |
| } |
| |
| cc_library_static { |
| name: "neuralnetworks_supportlibrary_loader", |
| srcs: [ |
| "SupportLibrary.cpp", |
| "SupportLibraryWrapper.cpp", |
| ], |
| shared_libs: [ |
| "libnativewindow", |
| ], |
| cflags: [ |
| "-DNNTEST_COMPUTE_MODE", |
| "-DNNTEST_ONLY_PUBLIC_API", |
| "-DNNTEST_SLTS", |
| "-DNN_COMPATIBILITY_LIBRARY_BUILD", |
| "-Wall", |
| "-Werror", |
| ], |
| apex_available: [ |
| "//apex_available:platform", |
| "com.android.neuralnetworks", |
| "test_com.android.neuralnetworks", |
| ], |
| export_include_dirs: [ |
| "include", |
| "public", |
| ], |
| static_libs: [ |
| "libarect", |
| "libbase", |
| ], |
| licenses: ["Android-Apache-2.0"], |
| vendor_available: true, |
| min_sdk_version: "29", |
| header_libs: [ |
| "libneuralnetworks_headers", |
| ], |
| } |