1// 2// Copyright (C) 2018 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. 15package { 16 // See: http://go/android-license-faq 17 // A large-scale-change added 'default_applicable_licenses' to import 18 // all of the 'license_kinds' from "device_google_contexthub_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: ["device_google_contexthub_license"], 22} 23 24cc_defaults { 25 name: "contexthub_libs_default", 26 relative_install_path: "hw", 27 srcs: [ 28 "nanohubhal.cpp", 29 "nanohubhal_default.cpp", 30 "system_comms.cpp", 31 ], 32 cflags: ["-Wall", "-Werror", "-Wextra"], 33 shared_libs: [ 34 "libcutils", 35 "libjsoncpp", 36 "liblog", 37 "libstagefright_foundation", 38 "libutils", 39 ], 40 static_libs: [ 41 "libhubutilcommon", 42 ], 43 header_libs: [ 44 "libnanohub_common_headers", 45 "libhardware_headers", 46 ], 47 vendor: true, 48} 49 50cc_defaults { 51 name: "contexthub_hidl_libs_default", 52 srcs: [ 53 "NanohubHidlAdapter.cpp", 54 ], 55 shared_libs: [ 56 "libhidlbase", 57 "android.hardware.contexthub@1.0", 58 ], 59} 60 61cc_library_shared { 62 name: "context_hub.default", 63 srcs: [ 64 "legacyhal.cpp", 65 ], 66 defaults: [ 67 "contexthub_libs_default", 68 ], 69} 70 71cc_library_shared { 72 name: "android.hardware.contexthub@1.0-impl.nanohub", 73 shared_libs: [ 74 "libbase", 75 ], 76 defaults: [ 77 "contexthub_libs_default", 78 "contexthub_hidl_libs_default", 79 ], 80} 81 82cc_binary { 83 name: "android.hardware.contexthub@1.0-service.nanohub", 84 init_rc: ["android.hardware.contexthub@1.0-service.nanohub.rc"], 85 srcs: [ 86 "service.cpp", 87 ], 88 defaults: [ 89 "contexthub_libs_default", 90 "contexthub_hidl_libs_default", 91 ], 92} 93