blob: 6cccc3ac90ccdc1dbd815e6ce3608de306fcf968 [file] [log] [blame]
Brian Duddie72833b22017-03-16 13:00:21 -07001/*
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
Bob Badour5233aa92021-02-12 17:32:02 -080017package {
18 default_applicable_licenses: ["system_chre_license"],
19}
20
21// Added automatically by a large-scale-change that took the approach of
22// 'apply every license found to every target'. While this makes sure we respect
23// every license restriction, it may not be entirely correct.
24//
25// e.g. GPL in an MIT project might only apply to the contrib/ directory.
26//
27// Please consider splitting the single license below into multiple licenses,
28// taking care not to lose any license_kind information, and overriding the
29// default license using the 'licenses: [...]' property on targets as needed.
30//
31// For unused files, consider creating a 'fileGroup' with "//visibility:private"
32// to attach the license to, and including a comment whether the files may be
33// used in the current project.
34// See: http://go/android-license-faq
35license {
36 name: "system_chre_license",
37 visibility: [":__subpackages__"],
38 license_kinds: [
39 "SPDX-license-identifier-Apache-2.0",
40 "SPDX-license-identifier-BSD",
41 ],
42 license_text: [
43 "NOTICE",
44 ],
45}
46
Brian Duddie7621b322017-03-18 19:35:18 -070047cc_library_static {
48 name: "chre_client",
Steven Moreland9e280e72017-04-11 13:01:17 -070049 vendor: true,
Brian Duddie7621b322017-03-18 19:35:18 -070050 export_include_dirs: [
Brian Duddie7621b322017-03-18 19:35:18 -070051 "host/common/include",
52 "platform/shared/include",
Brian Duddie56944d82017-03-29 16:51:47 -070053 "util/include",
Brian Duddie72833b22017-03-16 13:00:21 -070054 ],
Brian Duddie72833b22017-03-16 13:00:21 -070055 srcs: [
Arthur Ishiguroabe6dd62018-03-08 15:37:07 -080056 "host/common/fragmented_load_transaction.cc",
Brian Duddie7621b322017-03-18 19:35:18 -070057 "host/common/host_protocol_host.cc",
Arthur Ishiguroabe6dd62018-03-08 15:37:07 -080058 "host/common/socket_client.cc",
Brian Duddie7621b322017-03-18 19:35:18 -070059 "platform/shared/host_protocol_common.cc",
Brian Duddie72833b22017-03-16 13:00:21 -070060 ],
Brian Duddie24ca58c2017-08-16 16:27:00 -070061 header_libs: ["chre_flatbuffers"],
62 export_header_lib_headers: ["chre_flatbuffers"],
Brian Duddie72833b22017-03-16 13:00:21 -070063 shared_libs: [
64 "libcutils",
65 "liblog",
66 "libutils",
67 ],
Chih-Hung Hsieh872df742017-10-02 15:34:31 -070068 cflags: ["-Wall", "-Werror"],
Brian Duddie7621b322017-03-18 19:35:18 -070069}
70
Harpreet "Eli" Sangha5309a1a2019-05-01 17:55:25 +090071cc_binary {
Brian Duddie7621b322017-03-18 19:35:18 -070072 name: "chre_test_client",
Steven Moreland9e280e72017-04-11 13:01:17 -070073 vendor: true,
Brian Duddie9d5b5002017-03-22 16:13:24 -070074 local_include_dirs: [
75 "chre_api/include/chre_api",
76 "util/include",
77 ],
Brian Duddie7621b322017-03-18 19:35:18 -070078 srcs: [
79 "host/common/test/chre_test_client.cc",
80 ],
Chih-Hung Hsieh872df742017-10-02 15:34:31 -070081 cflags: ["-Wall", "-Werror"],
Brian Duddie7621b322017-03-18 19:35:18 -070082 shared_libs: [
83 "libcutils",
84 "liblog",
85 "libutils",
86 ],
87 static_libs: ["chre_client"],
Brian Duddie72833b22017-03-16 13:00:21 -070088}
Brian Duddie3d891e32017-03-19 10:14:53 -070089
chaoyangfdcebfb02019-07-17 16:35:00 -070090cc_binary {
91 name: "chre_power_test_client",
92 vendor: true,
93 local_include_dirs: [
94 "chre_api/include/chre_api",
95 "util/include",
chaoyangf518632d2019-08-09 18:15:41 -070096 "apps/power_test/common/include",
chaoyangfdcebfb02019-07-17 16:35:00 -070097 ],
98 srcs: [
99 "host/common/test/power_test/chre_power_test_client.cc",
100 ],
101 cflags: ["-Wall", "-Werror"],
102 shared_libs: [
103 "libcutils",
104 "liblog",
105 "libutils",
106 ],
107 static_libs: ["chre_client"],
108}
109
Andrew Rossignol0d57e452018-07-24 11:40:30 -0700110cc_test {
111 name: "audio_stress_test",
112 vendor: true,
113 local_include_dirs: [
114 "chre_api/include/chre_api",
115 "util/include",
116 ],
117 srcs: [
118 "host/common/audio_stress_test/audio_stress_test.cc",
119 ],
120 cflags: ["-Wall", "-Werror"],
121 shared_libs: [
122 "libcutils",
123 "liblog",
124 "libutils",
125 ],
126 static_libs: ["chre_client"],
127 gtest: false,
128}
129
Anthony Stange1b95c2f2020-02-13 13:55:41 -0500130cc_library_headers {
131 name: "android.hardware.contexthub@1.X-shared-impl",
Steven Moreland9e280e72017-04-11 13:01:17 -0700132 vendor: true,
Anthony Stange1b95c2f2020-02-13 13:55:41 -0500133 export_include_dirs: ["host/hal_generic/common/"],
Chih-Hung Hsieh872df742017-10-02 15:34:31 -0700134 cflags: ["-Wall", "-Werror"],
Brian Duddie3d891e32017-03-19 10:14:53 -0700135 shared_libs: [
136 "libcutils",
137 "liblog",
138 "libhidlbase",
Brian Duddie3d891e32017-03-19 10:14:53 -0700139 "libutils",
140 "android.hardware.contexthub@1.0",
Brian Duddie3d891e32017-03-19 10:14:53 -0700141 ],
142 static_libs: ["chre_client"],
Brian Duddie3d891e32017-03-19 10:14:53 -0700143}
Brian Duddie24ca58c2017-08-16 16:27:00 -0700144
Anthony Stange1b95c2f2020-02-13 13:55:41 -0500145cc_library_shared {
146 name: "android.hardware.contexthub@1.0-impl.generic",
147 vendor: true,
148 relative_install_path: "hw",
149 srcs: [
150 "host/hal_generic/V1_0/generic_context_hub_v1_0.cc",
Arthur Ishigurod8311292021-08-27 12:50:53 -0700151 "host/hal_generic/common/hal_chre_socket_connection.cc",
Anthony Stangeffbd71f2021-02-15 22:15:48 +0000152 "host/hal_generic/common/permissions_util.cc",
Anthony Stange1b95c2f2020-02-13 13:55:41 -0500153 ],
154 cflags: ["-Wall", "-Werror"],
155 header_libs: [
156 "android.hardware.contexthub@1.X-shared-impl",
Anthony Stangeffbd71f2021-02-15 22:15:48 +0000157 "android.hardware.contexthub@1.X-common-utils",
Anthony Stange1b95c2f2020-02-13 13:55:41 -0500158 ],
159 shared_libs: [
160 "libcutils",
161 "liblog",
162 "libhidlbase",
163 "libutils",
164 "android.hardware.contexthub@1.0",
Anthony Stangeffbd71f2021-02-15 22:15:48 +0000165 "android.hardware.contexthub@1.1",
166 "android.hardware.contexthub@1.2",
Anthony Stange1b95c2f2020-02-13 13:55:41 -0500167 ],
168 static_libs: ["chre_client"],
169}
170
171cc_binary {
172 name: "android.hardware.contexthub@1.1-service.generic",
173 defaults: ["hidl_defaults"],
174 vendor: true,
175 relative_install_path: "hw",
176 srcs: [
177 "host/hal_generic/V1_1/generic_context_hub_v1_1.cc",
178 "host/hal_generic/V1_1/service.cc",
Arthur Ishiguro095954c2020-10-09 11:14:27 -0700179 "host/hal_generic/common/context_hub_settings_util.cc",
Arthur Ishigurod8311292021-08-27 12:50:53 -0700180 "host/hal_generic/common/hal_chre_socket_connection.cc",
Anthony Stangeffbd71f2021-02-15 22:15:48 +0000181 "host/hal_generic/common/permissions_util.cc",
Anthony Stange1b95c2f2020-02-13 13:55:41 -0500182 ],
183 init_rc: ["host/hal_generic/V1_1/android.hardware.contexthub@1.1-service-generic.rc"],
184 cflags: ["-Wall", "-Werror"],
185 header_libs: [
186 "android.hardware.contexthub@1.X-shared-impl",
Anthony Stangeffbd71f2021-02-15 22:15:48 +0000187 "android.hardware.contexthub@1.X-common-utils",
Anthony Stange1b95c2f2020-02-13 13:55:41 -0500188 ],
189 shared_libs: [
190 "libcutils",
191 "liblog",
192 "libhidlbase",
193 "libutils",
194 "android.hardware.contexthub@1.0",
195 "android.hardware.contexthub@1.1",
Arthur Ishiguro49acf502020-10-15 15:07:21 -0700196 "android.hardware.contexthub@1.2",
Anthony Stange1b95c2f2020-02-13 13:55:41 -0500197 ],
198 static_libs: ["chre_client"],
199 vintf_fragments: ["host/hal_generic/V1_1/android.hardware.contexthub@1.1-generic.xml"],
200}
201
Arthur Ishiguro367ddf72020-10-07 08:25:00 -0700202cc_binary {
203 name: "android.hardware.contexthub@1.2-service.generic",
204 defaults: ["hidl_defaults"],
205 vendor: true,
206 relative_install_path: "hw",
207 srcs: [
208 "host/hal_generic/V1_2/generic_context_hub_v1_2.cc",
209 "host/hal_generic/V1_2/service.cc",
210 "host/hal_generic/common/context_hub_settings_util.cc",
Arthur Ishigurod8311292021-08-27 12:50:53 -0700211 "host/hal_generic/common/hal_chre_socket_connection.cc",
Anthony Stangeffbd71f2021-02-15 22:15:48 +0000212 "host/hal_generic/common/permissions_util.cc",
Arthur Ishiguro367ddf72020-10-07 08:25:00 -0700213 ],
214 init_rc: ["host/hal_generic/V1_2/android.hardware.contexthub@1.2-service-generic.rc"],
215 cflags: ["-Wall", "-Werror"],
216 header_libs: [
217 "android.hardware.contexthub@1.X-shared-impl",
Anthony Stangeffbd71f2021-02-15 22:15:48 +0000218 "android.hardware.contexthub@1.X-common-utils",
Arthur Ishiguro367ddf72020-10-07 08:25:00 -0700219 ],
220 shared_libs: [
221 "libcutils",
222 "liblog",
223 "libhidlbase",
224 "libutils",
225 "android.hardware.contexthub@1.0",
226 "android.hardware.contexthub@1.1",
227 "android.hardware.contexthub@1.2",
228 ],
229 static_libs: ["chre_client"],
230 vintf_fragments: ["host/hal_generic/V1_2/android.hardware.contexthub@1.2-generic.xml"],
231}
232
Victor Berchet147f9ef2022-01-27 17:06:43 -0800233cc_library_static {
234 name: "event_logger",
235 vendor: true,
236 host_supported: true,
237 srcs: [
238 "host/hal_generic/aidl/event_logger.cc",
239 ],
240 local_include_dirs: [
241 "util/include",
242 "host/common/include",
243 ],
244 shared_libs: [
245 "android.hardware.contexthub-V1-ndk",
246 "libcutils",
247 "libutils",
248 ],
249 header_libs: [
250 "chre_flatbuffers",
251 ],
252 cflags: [
253 "-Wall",
254 "-Werror",
255 "-DCHRE_IS_HOST_BUILD",
256 ],
257}
258
259cc_test_host {
260 name: "hal_unit_tests",
261 vendor: true,
262 srcs: [
263 "host/test/**/*_test.cc",
264 ],
265 local_include_dirs: [
266 "util/include",
267 "host/common/include",
268 ],
269 static_libs: [
270 "android.hardware.contexthub-V1-ndk",
271 "event_logger",
272 "libgmock",
273 ],
274 shared_libs: [
275 "libcutils",
276 "libutils",
277 ],
278 header_libs: [
279 "chre_flatbuffers",
280 ],
281 defaults: [
282 "chre_linux_cflags",
283 ],
284 cflags: [
285 "-Wall",
286 "-Werror",
287 "-DCHRE_IS_HOST_BUILD",
288 ],
289}
290
Arthur Ishiguro176c3212021-08-10 12:48:13 -0700291cc_binary {
292 name: "android.hardware.contexthub-service.generic",
293 defaults: ["hidl_defaults"],
294 vendor: true,
295 relative_install_path: "hw",
296 srcs: [
297 "host/hal_generic/aidl/generic_context_hub_aidl.cc",
298 "host/hal_generic/aidl/service.cc",
299 "host/hal_generic/common/hal_chre_socket_connection.cc",
300 "host/hal_generic/common/permissions_util.cc",
301 ],
Victor Berchetb8391b32022-01-27 13:57:14 -0800302 local_include_dirs: [
303 "host/hal_generic/common/",
304 "util/include",
305 ],
Arthur Ishiguro176c3212021-08-10 12:48:13 -0700306 init_rc: ["host/hal_generic/aidl/android.hardware.contexthub-service.generic.rc"],
Arthur Ishiguro0eec13e2021-12-23 20:42:09 +0000307 cflags: [
308 "-Wall",
309 "-Werror",
310 "-DCHRE_MESSAGE_TO_HOST_MAX_SIZE=4000", // Needed to import CHRE APIs.
Yixuan Wangcae5ebf2022-01-08 00:30:04 +0000311 "-DCHRE_HAL_SOCKET_METRICS_ENABLED",
Victor Berchetb8391b32022-01-27 13:57:14 -0800312 "-DCHRE_IS_HOST_BUILD",
Arthur Ishiguro0eec13e2021-12-23 20:42:09 +0000313 ],
Arthur Ishiguro176c3212021-08-10 12:48:13 -0700314 shared_libs: [
Yixuan Wangcae5ebf2022-01-08 00:30:04 +0000315 "android.frameworks.stats-V1-ndk",
Arthur Ishiguro176c3212021-08-10 12:48:13 -0700316 "libcutils",
317 "liblog",
Yixuan Wangcae5ebf2022-01-08 00:30:04 +0000318 "libprotobuf-cpp-lite",
Arthur Ishiguro176c3212021-08-10 12:48:13 -0700319 "libutils",
320 "libbase",
321 "libbinder_ndk",
322 "android.hardware.contexthub-V1-ndk",
Yixuan Wangcae5ebf2022-01-08 00:30:04 +0000323 "//hardware/google/pixel:pixelatoms-cpp",
Arthur Ishiguro176c3212021-08-10 12:48:13 -0700324 ],
Haamed Gheibi256572f2022-02-04 13:47:17 -0800325 // TODO(b/217754528): Re-enable this module
326 enabled: false,
Arthur Ishiguro0eec13e2021-12-23 20:42:09 +0000327 header_libs: [
328 "chre_api",
329 ],
Yixuan Wangcae5ebf2022-01-08 00:30:04 +0000330 static_libs: [
Victor Berchet147f9ef2022-01-27 17:06:43 -0800331 "chre_client",
332 "event_logger",
Yixuan Wangcae5ebf2022-01-08 00:30:04 +0000333 ],
Arthur Ishiguro176c3212021-08-10 12:48:13 -0700334 vintf_fragments: ["host/hal_generic/aidl/android.hardware.contexthub-service.generic.xml"],
335}
336
Brian Duddie24ca58c2017-08-16 16:27:00 -0700337cc_library_headers {
Brian Duddie7ab2df12017-08-16 16:40:14 -0700338 name: "chre_api",
Brian Duddie303fed02017-08-18 10:16:19 -0700339 vendor: true,
Brian Duddie7ab2df12017-08-16 16:40:14 -0700340 export_include_dirs: [
341 "chre_api/include/chre_api",
Ahmad Rahmati5eb13392020-05-04 11:19:33 -0700342 "chre_api/include",
343 ],
344 host_supported: true,
Brian Duddie7ab2df12017-08-16 16:40:14 -0700345}
346
347cc_library_headers {
Brian Duddie24ca58c2017-08-16 16:27:00 -0700348 name: "chre_flatbuffers",
349 vendor: true,
Victor Berchet147f9ef2022-01-27 17:06:43 -0800350 host_supported: true,
Brian Duddie24ca58c2017-08-16 16:27:00 -0700351 export_include_dirs: [
352 "external/flatbuffers/include",
Mike Cailean2833f652018-03-12 13:33:43 -0700353 "host/common/include",
354 "platform/shared/include",
355 "util/include",
Brian Duddie24ca58c2017-08-16 16:27:00 -0700356 ],
357}
Mehdi Alizadehd2c8b6d2017-08-15 16:06:36 -0700358
Ahmad Rahmati5eb13392020-05-04 11:19:33 -0700359cc_library_headers {
360 name: "chre_pal",
361 vendor: true,
362 export_include_dirs: [
363 "pal/include",
364 ],
365 header_libs: [
366 "chre_api",
367 ],
368 export_header_lib_headers: [
369 "chre_api",
370 ],
371 host_supported: true,
372}
373
Arthur Ishiguroadc178a2021-03-02 13:10:32 -0800374cc_library_headers {
375 name: "chre_test_common",
376 vendor: true,
377 export_include_dirs: [
378 "test/common/include",
379 ],
380 host_supported: true,
381}
382
Arthur Ishiguro161bb2b2020-09-24 09:08:39 -0700383cc_library_static {
384 name: "chre_pal_linux",
385 vendor: true,
386 srcs: [
387 "platform/shared/pal_system_api.cc",
388 "platform/linux/assert.cc",
389 "platform/linux/fatal_error.cc",
390 "platform/linux/memory.cc",
391 "platform/linux/pal_gnss.cc",
karthik bharadwaj0a37c942022-01-26 15:50:04 -0800392 "platform/linux/pal_nan.cc",
Arthur Ishiguro161bb2b2020-09-24 09:08:39 -0700393 "platform/linux/pal_wifi.cc",
394 "platform/linux/pal_wwan.cc",
395 "platform/linux/platform_log.cc",
396 "platform/linux/system_time.cc",
397 ],
398 export_include_dirs: [
399 "platform/shared/include",
400 "platform/include",
401 "platform/linux/include",
402 "util/include",
403 ],
404 header_libs: [
405 "chre_pal",
406 ],
Victor Berchete61ac4b2022-02-25 14:24:16 -0800407 static_libs: [
408 "libgtest",
409 "libgmock",
410 ],
411 defaults: [
412 "chre_linux_cflags",
Arthur Ishiguro161bb2b2020-09-24 09:08:39 -0700413 ],
414 host_supported: true,
415}
416
Arthur Ishiguro87bfcb32020-09-26 10:25:48 -0700417cc_test_host {
418 name: "chre_unit_tests",
419 srcs: [
Arthur Ishiguro9cdbf912020-10-31 09:34:45 -0700420 "core/tests/**/*.cc",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800421 "pal/tests/**/*_test.cc",
Arthur Ishiguro22d37e32020-11-09 14:24:59 -0800422 "pal/util/tests/**/*.cc",
Arthur Ishigurob6024852021-01-28 11:08:46 -0800423 "pal/util/wifi_pal_convert.c",
Arthur Ishiguro22d37e32020-11-09 14:24:59 -0800424 "pal/util/wifi_scan_cache.c",
Stan Rokita4f6fc362020-10-28 10:56:22 -0700425 "platform/tests/**/*.cc",
Arthur Ishiguro87bfcb32020-09-26 10:25:48 -0700426 "util/tests/**/*.cc",
427 ],
Victor Berchete61ac4b2022-02-25 14:24:16 -0800428 exclude_srcs: [
429 // Exclude slow PAL tests.
430 "pal/tests/src/gnss_pal_impl_test.cc",
431 ],
Arthur Ishiguro87bfcb32020-09-26 10:25:48 -0700432 local_include_dirs: [
Arthur Ishiguro9989a0b2020-10-27 11:46:56 -0700433 "chre_api/include",
Arthur Ishiguro87bfcb32020-09-26 10:25:48 -0700434 "chre_api/include/chre_api",
Arthur Ishigurob7a226d2020-10-27 17:26:33 -0700435 "core/include",
Arthur Ishiguro9989a0b2020-10-27 11:46:56 -0700436 "pal/include",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800437 "pal/tests/include",
Arthur Ishiguro22d37e32020-11-09 14:24:59 -0800438 "pal/util/include",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800439 "platform/include",
Arthur Ishiguro87bfcb32020-09-26 10:25:48 -0700440 "platform/linux/include",
441 "platform/shared/include",
Arthur Ishiguro87bfcb32020-09-26 10:25:48 -0700442 "util/include",
443 ],
Arthur Ishiguro87bfcb32020-09-26 10:25:48 -0700444 cflags: [
Arthur Ishigurob7a226d2020-10-27 17:26:33 -0700445 "-DCHRE_MESSAGE_TO_HOST_MAX_SIZE=4096",
Arthur Ishiguro87bfcb32020-09-26 10:25:48 -0700446 "-DCHRE_MINIMUM_LOG_LEVEL=CHRE_LOG_LEVEL_DEBUG",
447 "-DCHRE_ASSERTIONS_ENABLED=true",
448 "-DCHRE_FILENAME=__FILE__",
449 "-DGTEST",
450 ],
451 static_libs: [
Victor Berchete61ac4b2022-02-25 14:24:16 -0800452 "chre_linux",
Arthur Ishiguro87bfcb32020-09-26 10:25:48 -0700453 "libgmock",
454 ],
Anthony Stange63d32d72021-09-20 18:40:48 +0000455 sanitize: {
456 address: true,
457 },
Arthur Ishiguro87bfcb32020-09-26 10:25:48 -0700458}
459
Arthur Ishiguro19c04802021-07-23 10:01:35 -0700460cc_test_host {
461 name: "chre_simulation_tests",
462 srcs: [
463 "test/simulation/*.cc",
464 ],
465 local_include_dirs: [
466 "test/simulation/inc",
Victor Berchetace1c0d2022-03-08 13:40:21 -0800467 "platform/shared",
Arthur Ishiguro19c04802021-07-23 10:01:35 -0700468 ],
469 static_libs: [
470 "chre_linux",
karthik bharadwaj0a37c942022-01-26 15:50:04 -0800471 "chre_pal_linux",
Arthur Ishiguro19c04802021-07-23 10:01:35 -0700472 ],
Arthur Ishiguro92ccef92021-12-22 23:03:34 +0000473 defaults: [
474 "chre_linux_cflags",
Arthur Ishiguro19c04802021-07-23 10:01:35 -0700475 ],
Arthur Ishigurob66bdbe2021-09-20 10:01:01 -0700476 sanitize: {
477 address: true,
478 },
Arthur Ishiguro19c04802021-07-23 10:01:35 -0700479}
480
481cc_library_static {
482 name: "chre_linux",
483 vendor: true,
484 srcs: [
Victor Berchete5779a12022-03-15 13:49:52 -0700485 "core/audio_request_manager.cc",
Anna Herrera0a6d83f2021-12-22 19:00:44 +0000486 "core/ble_request_manager.cc",
Anthonyacaff772022-01-18 20:27:17 +0000487 "core/ble_request_multiplexer.cc",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800488 "core/ble_request.cc",
489 "core/debug_dump_manager.cc",
Arthur Ishiguro19c04802021-07-23 10:01:35 -0700490 "core/event_loop_manager.cc",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800491 "core/event_loop.cc",
Arthur Ishiguro19c04802021-07-23 10:01:35 -0700492 "core/event_ref_queue.cc",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800493 "core/event.cc",
Arthur Ishiguroec296722021-07-28 17:03:39 -0700494 "core/gnss_manager.cc",
Arthur Ishiguro9bf94bc2021-12-03 04:23:17 +0000495 "core/host_comms_manager.cc",
Arthur Ishiguro9bf94bc2021-12-03 04:23:17 +0000496 "core/host_notifications.cc",
Anna Herrera4a97bb22022-01-26 01:36:48 +0000497 "core/init.cc",
498 "core/nanoapp.cc",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800499 "core/sensor_request_manager.cc",
500 "core/sensor_request_multiplexer.cc",
501 "core/sensor_request.cc",
502 "core/sensor_type_helpers.cc",
503 "core/sensor_type.cc",
504 "core/sensor.cc",
Anna Herrera4a97bb22022-01-26 01:36:48 +0000505 "core/settings.cc",
506 "core/timer_pool.cc",
karthik bharadwaj0a37c942022-01-26 15:50:04 -0800507 "core/wifi_request_manager.cc",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800508 "core/wifi_scan_request.cc",
Arthur Ishiguro19c04802021-07-23 10:01:35 -0700509 "platform/linux/assert.cc",
510 "platform/linux/context.cc",
511 "platform/linux/fatal_error.cc",
512 "platform/linux/host_link.cc",
Arthur Ishiguro19c04802021-07-23 10:01:35 -0700513 "platform/linux/memory_manager.cc",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800514 "platform/linux/memory.cc",
Victor Berchet826868f2022-03-11 16:00:57 -0800515 "platform/linux/pal_audio.cc",
Anna Herrera0a6d83f2021-12-22 19:00:44 +0000516 "platform/linux/pal_ble.cc",
Arthur Ishiguroec296722021-07-28 17:03:39 -0700517 "platform/linux/pal_gnss.cc",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800518 "platform/linux/pal_nan.cc",
519 "platform/linux/pal_sensor.cc",
520 "platform/linux/pal_wifi.cc",
521 "platform/linux/platform_debug_dump_manager.cc",
522 "platform/linux/platform_log.cc",
523 "platform/linux/platform_nanoapp.cc",
524 "platform/linux/platform_pal.cc",
525 "platform/linux/platform_sensor_type_helpers.cc",
526 "platform/linux/platform_sensor.cc",
527 "platform/linux/power_control_manager.cc",
528 "platform/linux/system_time.cc",
529 "platform/linux/system_timer.cc",
Victor Berchete5779a12022-03-15 13:49:52 -0700530 "platform/linux/testing/platform_audio.cc",
Victor Berchet3a9a33c2022-03-15 11:55:47 -0700531 "platform/shared/chre_api_audio.cc",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800532 "platform/shared/chre_api_ble.cc",
533 "platform/shared/chre_api_core.cc",
534 "platform/shared/chre_api_gnss.cc",
535 "platform/shared/chre_api_re.cc",
536 "platform/shared/chre_api_sensor.cc",
537 "platform/shared/chre_api_user_settings.cc",
538 "platform/shared/chre_api_wifi.cc",
Arthur Ishiguro19c04802021-07-23 10:01:35 -0700539 "platform/shared/log_buffer.cc",
540 "platform/shared/memory_manager.cc",
541 "platform/shared/pal_system_api.cc",
Anna Herrera0a6d83f2021-12-22 19:00:44 +0000542 "platform/shared/platform_ble.cc",
Arthur Ishiguroec296722021-07-28 17:03:39 -0700543 "platform/shared/platform_gnss.cc",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800544 "platform/shared/platform_sensor_manager.cc",
karthik bharadwaj0a37c942022-01-26 15:50:04 -0800545 "platform/shared/platform_wifi.cc",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800546 "platform/shared/system_time.cc",
547 "platform/shared/version.cc",
Arthur Ishiguro19c04802021-07-23 10:01:35 -0700548 "util/**/*.cc",
549 ],
Anthony Stange5ee729a2022-02-04 20:02:33 +0000550 // TODO(b/217952682) Exclude pigweed because it can't be built via
551 // Android.bp
552 exclude_srcs: [
553 "util/pigweed/*.cc",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800554 "util/tests/**/*",
Anthony Stange5ee729a2022-02-04 20:02:33 +0000555 ],
Arthur Ishiguro19c04802021-07-23 10:01:35 -0700556 export_include_dirs: [
557 "chre_api/include",
558 "chre_api/include/chre_api",
559 "core/include",
560 "pal/include",
561 "pal/util/include",
562 "platform/linux/include",
Victor Berchete5779a12022-03-15 13:49:52 -0700563 "platform/linux/testing/include",
Arthur Ishiguro19c04802021-07-23 10:01:35 -0700564 "platform/shared/include",
565 "platform/include",
566 "util/include",
567 ],
568 header_libs: [
569 "chre_api",
570 ],
Arthur Ishiguro92ccef92021-12-22 23:03:34 +0000571 defaults: [
572 "chre_linux_cflags",
Arthur Ishiguro19c04802021-07-23 10:01:35 -0700573 ],
574 static_libs: [
575 "libgtest",
576 "libgmock",
577 ],
578 host_supported: true,
579}
580
Arthur Ishiguro92ccef92021-12-22 23:03:34 +0000581cc_defaults {
582 name: "chre_linux_cflags",
583 cflags: [
Brian Duddie3d0e53b2017-03-10 14:18:24 -0800584 "-DCHRE_MESSAGE_TO_HOST_MAX_SIZE=4096",
585 "-DCHRE_MINIMUM_LOG_LEVEL=CHRE_LOG_LEVEL_DEBUG",
586 "-DCHRE_ASSERTIONS_ENABLED=true",
587 "-DCHRE_FILENAME=__FILE__",
588 "-DGTEST",
589 "-DCHRE_FIRST_SUPPORTED_API_VERSION=CHRE_API_VERSION_1_1",
Victor Berchete5779a12022-03-15 13:49:52 -0700590 "-DCHRE_AUDIO_SUPPORT_ENABLED",
Anna Herrera0a6d83f2021-12-22 19:00:44 +0000591 "-DCHRE_BLE_SUPPORT_ENABLED",
Arthur Ishiguroec296722021-07-28 17:03:39 -0700592 "-DCHRE_GNSS_SUPPORT_ENABLED",
Victor Berchete61ac4b2022-02-25 14:24:16 -0800593 "-DCHRE_SENSORS_SUPPORT_ENABLED",
karthik bharadwaj0a37c942022-01-26 15:50:04 -0800594 "-DCHRE_WIFI_SUPPORT_ENABLED",
595 "-DCHRE_WIFI_NAN_SUPPORT_ENABLED",
Brian Duddie3d0e53b2017-03-10 14:18:24 -0800596 ],
Brian Duddie3d0e53b2017-03-10 14:18:24 -0800597}
598
Brian Duddie3d0e53b2017-03-10 14:18:24 -0800599subdirs = [
600 "apps/wifi_offload",
601]