• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    // See: http://go/android-license-faq
21    // A large-scale-change added 'default_applicable_licenses' to import
22    // all of the 'license_kinds' from "system_chre_license"
23    // to get the below license kinds:
24    //   SPDX-license-identifier-Apache-2.0
25    default_applicable_licenses: ["system_chre_license"],
26}
27
28cc_binary {
29    name: "android.hardware.contexthub-service.generic",
30    defaults: ["hidl_defaults"],
31    vendor: true,
32    relative_install_path: "hw",
33    srcs: [
34        "aidl/generic_context_hub_aidl.cc",
35        "aidl/service.cc",
36        "common/hal_chre_socket_connection.cc",
37        "common/permissions_util.cc",
38    ],
39    include_dirs: [
40        "system/chre/util/include",
41    ],
42    local_include_dirs: [
43        "common/",
44    ],
45    init_rc: ["aidl/android.hardware.contexthub-service.generic.rc"],
46    cflags: [
47        "-Wall",
48        "-Werror",
49        "-DCHRE_MESSAGE_TO_HOST_MAX_SIZE=4000", // Needed to import CHRE APIs.
50        "-DCHRE_HAL_SOCKET_METRICS_ENABLED",
51        "-DCHRE_IS_HOST_BUILD",
52    ],
53    shared_libs: [
54        "android.frameworks.stats-V1-ndk",
55        "libcutils",
56        "libjsoncpp",
57        "liblog",
58        "libprotobuf-cpp-lite",
59        "libutils",
60        "libbase",
61        "libbinder_ndk",
62        "android.hardware.contexthub-V2-ndk",
63        "chremetrics-cpp",
64        "chre_atoms_log",
65    ],
66    header_libs: [
67        "chre_api",
68    ],
69    static_libs: [
70        "chre_client",
71        "chre_config_util",
72        "event_logger",
73    ],
74    vintf_fragments: ["aidl/android.hardware.contexthub-service.generic.xml"],
75}
76