1/*
2 * Copyright (C) 2017 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 */
16
17cc_library_static {
18    name: "chre_client",
19    vendor: true,
20    export_include_dirs: [
21        "host/common/include",
22        "platform/shared/include",
23        "util/include",
24    ],
25    srcs: [
26        "host/common/fragmented_load_transaction.cc",
27        "host/common/host_protocol_host.cc",
28        "host/common/socket_client.cc",
29        "platform/shared/host_protocol_common.cc",
30    ],
31    header_libs: ["chre_flatbuffers"],
32    export_header_lib_headers: ["chre_flatbuffers"],
33    shared_libs: [
34        "libcutils",
35        "liblog",
36        "libutils",
37    ],
38    cflags: ["-Wall", "-Werror"],
39}
40
41cc_binary {
42    name: "chre_test_client",
43    vendor: true,
44    local_include_dirs: [
45        "chre_api/include/chre_api",
46        "util/include",
47    ],
48    srcs: [
49        "host/common/test/chre_test_client.cc",
50    ],
51    cflags: ["-Wall", "-Werror"],
52    shared_libs: [
53        "libcutils",
54        "liblog",
55        "libutils",
56    ],
57    static_libs: ["chre_client"],
58}
59
60cc_binary {
61    name: "chre_power_test_client",
62    vendor: true,
63    local_include_dirs: [
64        "chre_api/include/chre_api",
65        "util/include",
66        "apps/power_test/common/include",
67    ],
68    srcs: [
69        "host/common/test/power_test/chre_power_test_client.cc",
70    ],
71    cflags: ["-Wall", "-Werror"],
72    shared_libs: [
73        "libcutils",
74        "liblog",
75        "libutils",
76    ],
77    static_libs: ["chre_client"],
78}
79
80cc_test {
81    name: "audio_stress_test",
82    vendor: true,
83    local_include_dirs: [
84        "chre_api/include/chre_api",
85        "util/include",
86    ],
87    srcs: [
88        "host/common/audio_stress_test/audio_stress_test.cc",
89    ],
90    cflags: ["-Wall", "-Werror"],
91    shared_libs: [
92        "libcutils",
93        "liblog",
94        "libutils",
95    ],
96    static_libs: ["chre_client"],
97    gtest: false,
98}
99
100cc_library_headers {
101    name: "[email protected]",
102    vendor: true,
103    export_include_dirs: ["host/hal_generic/common/"],
104    cflags: ["-Wall", "-Werror"],
105    shared_libs: [
106        "libcutils",
107        "liblog",
108        "libhidlbase",
109        "libutils",
110        "[email protected]",
111    ],
112    static_libs: ["chre_client"],
113}
114
115cc_library_shared {
116    name: "[email protected]",
117    vendor: true,
118    relative_install_path: "hw",
119    srcs: [
120        "host/hal_generic/V1_0/generic_context_hub_v1_0.cc",
121    ],
122    cflags: ["-Wall", "-Werror"],
123    header_libs: [
124        "[email protected]",
125    ],
126    shared_libs: [
127        "libcutils",
128        "liblog",
129        "libhidlbase",
130        "libutils",
131        "[email protected]",
132    ],
133    static_libs: ["chre_client"],
134}
135
136cc_binary {
137    name: "[email protected]",
138    defaults: ["hidl_defaults"],
139    vendor: true,
140    relative_install_path: "hw",
141    srcs: [
142        "host/hal_generic/V1_1/generic_context_hub_v1_1.cc",
143        "host/hal_generic/V1_1/service.cc",
144    ],
145    init_rc: ["host/hal_generic/V1_1/android.hardware.contexthub@1.1-service-generic.rc"],
146    cflags: ["-Wall", "-Werror"],
147    header_libs: [
148        "[email protected]",
149    ],
150    shared_libs: [
151        "libcutils",
152        "liblog",
153        "libhidlbase",
154        "libutils",
155        "[email protected]",
156        "[email protected]",
157    ],
158    static_libs: ["chre_client"],
159    vintf_fragments: ["host/hal_generic/V1_1/android.hardware.contexthub@1.1-generic.xml"],
160}
161
162cc_library_headers {
163    name: "chre_api",
164    vendor: true,
165    export_include_dirs: [
166        "chre_api/include/chre_api",
167    ]
168}
169
170cc_library_headers {
171    name: "chre_flatbuffers",
172    vendor: true,
173    export_include_dirs: [
174        "external/flatbuffers/include",
175    ],
176}
177
178subdirs = [
179    "apps/wifi_offload",
180]
181