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.
15cc_defaults {
16    name: "contexthub_libs_default",
17    relative_install_path: "hw",
18    srcs: [
19        "nanohubhal.cpp",
20        "nanohubhal_default.cpp",
21        "system_comms.cpp",
22    ],
23    cflags: ["-Wall", "-Werror", "-Wextra"],
24    shared_libs: [
25        "libcutils",
26        "libjsoncpp",
27        "liblog",
28        "libstagefright_foundation",
29        "libutils",
30    ],
31    static_libs: [
32        "libhubutilcommon",
33    ],
34    header_libs: [
35        "libnanohub_common_headers",
36        "libhardware_headers",
37    ],
38    vendor: true,
39}
40
41cc_defaults {
42    name: "contexthub_hidl_libs_default",
43    srcs: [
44        "NanohubHidlAdapter.cpp",
45    ],
46    shared_libs: [
47        "libhidlbase",
48        "android.hardware.contexthub@1.0",
49    ],
50}
51
52cc_library_shared {
53    name: "context_hub.default",
54    srcs: [
55        "legacyhal.cpp",
56    ],
57    defaults: [
58        "contexthub_libs_default",
59    ],
60}
61
62cc_library_shared {
63    name: "android.hardware.contexthub@1.0-impl.nanohub",
64    shared_libs: [
65        "libbase",
66    ],
67    defaults: [
68        "contexthub_libs_default",
69        "contexthub_hidl_libs_default",
70    ],
71}
72
73cc_binary {
74    name: "android.hardware.contexthub@1.0-service.nanohub",
75    init_rc: ["android.hardware.contexthub@1.0-service.nanohub.rc"],
76    srcs: [
77        "service.cpp",
78    ],
79    defaults: [
80        "contexthub_libs_default",
81        "contexthub_hidl_libs_default",
82    ],
83}
84