1/* 2 * Copyright (C) 2022 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 */ 16soong_namespace { 17} 18 19package { 20 default_team: "trendy_team_context_hub", 21 // See: http://go/android-license-faq 22 // A large-scale-change added 'default_applicable_licenses' to import 23 // all of the 'license_kinds' from "system_chre_license" 24 // to get the below license kinds: 25 // SPDX-license-identifier-Apache-2.0 26 default_applicable_licenses: ["system_chre_license"], 27} 28 29cc_binary { 30 name: "android.hardware.contexthub-service.generic", 31 defaults: ["chre_aidl_hal_generic_defaults"], 32 vendor: true, 33 relative_install_path: "hw", 34 srcs: ["aidl/service.cc"], 35 init_rc: ["aidl/android.hardware.contexthub-service.generic.rc"], 36 vintf_fragments: ["aidl/android.hardware.contexthub-service.generic.xml"], 37 visibility: ["//visibility:public"], 38} 39 40filegroup { 41 name: "hal_aidl_generic_srcs", 42 srcs: [ 43 "aidl/generic_context_hub_aidl.cc", 44 "common/bluetooth_socket_fbs_hal.cc", 45 "common/hal_chre_socket_connection.cc", 46 "common/permissions_util.cc", 47 ], 48} 49 50cc_defaults { 51 name: "chre_aidl_hal_generic_defaults", 52 defaults: [ 53 "//system/chre:contexthub_hal_defaults", 54 "//system/chre:pw_rpc_cflags_chre", 55 "//system/chre:pw_rpc_nanopb_lib_dependencies", 56 ], 57 vendor: true, 58 srcs: [ 59 "//system/chre/host/hal_generic:hal_aidl_generic_srcs", 60 "//system/chre:contexthub_hal_client_srcs", 61 ], 62 cflags: [ 63 "-DCHRE_HAL_SOCKET_METRICS_ENABLED", 64 "-Wthread-safety", // Need to be explicitly set 65 ], 66 shared_libs: [ 67 "android.hardware.bluetooth.socket-V1-ndk", 68 ], 69 static_libs: [ 70 "chre_config_util", 71 ], 72} 73 74cc_library_headers { 75 name: "chre_aidl_hal_generic", 76 vendor: true, 77 export_include_dirs: [ 78 "aidl", 79 ], 80} 81