/* * 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: "NeuralNetworksSampleDriver_defaults", defaults: ["neuralnetworks_defaults"], host_supported: true, // b/109953668, disable OpenMP // openmp: true, srcs: [ "SampleDriver.cpp", "SampleDriverFull.cpp", "SampleDriverPartial.cpp", "SampleDriverUtils.cpp", ], header_libs: [ "libneuralnetworks_headers", ], shared_libs: [ "android.hardware.neuralnetworks@1.0", "android.hardware.neuralnetworks@1.1", "android.hardware.neuralnetworks@1.2", "android.hardware.neuralnetworks@1.3", "libbase", "libcutils", "libfmq", "libhidlbase", "libhidlmemory", "liblog", "libtextclassifier_hash", "libutils", ], static_libs: [ "libneuralnetworks_common", ], target: { android: { shared_libs: [ "libhardware", "libnativewindow", ], }, host: { cflags: [ "-D__INTRODUCED_IN(n)=", ], }, }, } cc_defaults { name: "NeuralNetworksSampleDriver_server_defaults", defaults: ["NeuralNetworksSampleDriver_defaults"], host_supported: false, relative_install_path: "hw", proprietary: true, } cc_binary { name: "android.hardware.neuralnetworks@1.3-service-sample-all", srcs: ["SampleDriverAll.cpp"], defaults: ["NeuralNetworksSampleDriver_server_defaults"], init_rc: ["config/android.hardware.neuralnetworks@1.3-service-sample-all.rc"], vintf_fragments: ["config/android.hardware.neuralnetworks@1.3-service-sample-all.xml"], } cc_binary { name: "android.hardware.neuralnetworks@1.3-service-sample-float-xnnpack", srcs: ["SampleDriverFloatXNNPACK.cpp"], defaults: ["NeuralNetworksSampleDriver_server_defaults"], init_rc: ["config/android.hardware.neuralnetworks@1.3-service-sample-float-xnnpack.rc"], vintf_fragments: [ "config/android.hardware.neuralnetworks@1.3-service-sample-float-xnnpack.xml", ], static_libs: [ "libXNNPACK", "libpthreadpool", ], cflags: [ "-Wno-unused-parameter", ], } cc_binary { name: "android.hardware.neuralnetworks@1.3-service-sample-limited", srcs: ["SampleDriverLimited.cpp"], defaults: ["neuralnetworks_defaults"], header_libs: [ "libneuralnetworks_headers", ], shared_libs: [ "android.hardware.neuralnetworks@1.0", "android.hardware.neuralnetworks@1.1", "android.hardware.neuralnetworks@1.2", "android.hardware.neuralnetworks@1.3", "libbase", "libcutils", "libdl", "libfmq", "libhardware", "libhidlbase", "libhidlmemory", "liblog", "libnativewindow", "libtextclassifier_hash", "libutils", ], static_libs: [ "libneuralnetworks_common", "neuralnetworks_canonical_sample_driver", "neuralnetworks_utils_hal_adapter", ], relative_install_path: "hw", proprietary: true, init_rc: ["config/android.hardware.neuralnetworks@1.3-service-sample-limited.rc"], vintf_fragments: ["config/android.hardware.neuralnetworks@1.3-service-sample-limited.xml"], } cc_library_static { name: "libSampleDriver", defaults: ["NeuralNetworksSampleDriver_defaults"], export_include_dirs: ["."], }