/* * Copyright 2017 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 { // Inherits all licenses from parent to get Apache 2.0 and package name default_applicable_licenses: [ "packages_modules_NeuralNetworks_license", ], } cc_defaults { name: "neuralnetworks_utils_defaults", defaults: ["neuralnetworks_defaults"], host_supported: true, vendor_available: true, apex_available: [ "//apex_available:platform", "com.android.neuralnetworks", "test_com.android.neuralnetworks", ], min_sdk_version: "30", target: { host: { cflags: [ "-D__ANDROID_API_S__=31", ], }, }, } cc_library_headers { name: "neuralnetworks_types_headers", host_supported: true, export_include_dirs: ["include"], } cc_defaults { name: "neuralnetworks_types_defaults", defaults: ["neuralnetworks_utils_defaults"], srcs: [ "operations/src/*.cpp", "src/OperationsUtils.cpp", "src/OperationsValidationUtils.cpp", "src/SharedMemory.cpp", "src/SharedMemoryAndroid.cpp", "src/TypeUtils.cpp", "src/Types.cpp", "src/Validation.cpp", ], target: { android: { shared_libs: [ "libnativewindow", ], static_libs: ["libarect"], }, }, local_include_dirs: [ "include/nnapi", "operations/include", ], export_include_dirs: ["include"], shared_libs: [ "libbase", "libcutils", "libutils", ], export_shared_lib_headers: [ "libbase", "libcutils", "libutils", ], } cc_library_static { name: "neuralnetworks_types", defaults: ["neuralnetworks_types_defaults"], } cc_library_static { name: "neuralnetworks_types_experimental", defaults: ["neuralnetworks_types_defaults"], cflags: ["-DNN_EXPERIMENTAL_FEATURE"], } cc_library_static { name: "neuralnetworks_types_cl", host_supported: false, defaults: [ "neuralnetworks_cl_defaults", "neuralnetworks_utils_defaults", ], srcs: [ "operations/src/*.cpp", "src/DynamicCLDeps.cpp", "src/OperationsUtils.cpp", "src/OperationsValidationUtils.cpp", "src/SharedMemory.cpp", "src/SharedMemoryAndroid.cpp", "src/TypeUtils.cpp", "src/Types.cpp", "src/Validation.cpp", ], local_include_dirs: [ "include/nnapi", "operations/include", ], export_include_dirs: ["include"], static_libs: [ "libbase_ndk", ], export_static_lib_headers: [ "libbase_ndk", ], shared_libs: [ "libandroid", ], }