xref: /aosp_15_r20/system/chre/host/hal_generic/Android.bp (revision 84e339476a462649f82315436d70fd732297a399)
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/hal_chre_socket_connection.cc",
45        "common/permissions_util.cc",
46    ],
47}
48
49cc_defaults {
50    name: "chre_aidl_hal_generic_defaults",
51    defaults: [
52        "//system/chre:contexthub_hal_defaults",
53        "//system/chre:pw_rpc_cflags_chre",
54        "//system/chre:pw_rpc_nanopb_lib_dependencies",
55    ],
56    vendor: true,
57    srcs: [
58        "//system/chre/host/hal_generic:hal_aidl_generic_srcs",
59        "//system/chre:contexthub_hal_client_srcs",
60    ],
61    cflags: [
62        "-DCHRE_HAL_SOCKET_METRICS_ENABLED",
63        "-Wthread-safety", // Need to be explicitly set
64    ],
65    static_libs: [
66        "chre_config_util",
67    ],
68}
69
70cc_library_headers {
71    name: "chre_aidl_hal_generic",
72    vendor: true,
73    export_include_dirs: [
74        "aidl",
75    ],
76}
77