Brian Duddie | 72833b2 | 2017-03-16 13:00:21 -0700 | [diff] [blame] | 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 | |
Bob Badour | 5233aa9 | 2021-02-12 17:32:02 -0800 | [diff] [blame] | 17 | package { |
| 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 |
| 35 | license { |
| 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 Duddie | 7621b32 | 2017-03-18 19:35:18 -0700 | [diff] [blame] | 47 | cc_library_static { |
| 48 | name: "chre_client", |
Steven Moreland | 9e280e7 | 2017-04-11 13:01:17 -0700 | [diff] [blame] | 49 | vendor: true, |
Brian Duddie | 7621b32 | 2017-03-18 19:35:18 -0700 | [diff] [blame] | 50 | export_include_dirs: [ |
Brian Duddie | 7621b32 | 2017-03-18 19:35:18 -0700 | [diff] [blame] | 51 | "host/common/include", |
| 52 | "platform/shared/include", |
Brian Duddie | 56944d8 | 2017-03-29 16:51:47 -0700 | [diff] [blame] | 53 | "util/include", |
Brian Duddie | 72833b2 | 2017-03-16 13:00:21 -0700 | [diff] [blame] | 54 | ], |
Brian Duddie | 72833b2 | 2017-03-16 13:00:21 -0700 | [diff] [blame] | 55 | srcs: [ |
Arthur Ishiguro | abe6dd6 | 2018-03-08 15:37:07 -0800 | [diff] [blame] | 56 | "host/common/fragmented_load_transaction.cc", |
Brian Duddie | 7621b32 | 2017-03-18 19:35:18 -0700 | [diff] [blame] | 57 | "host/common/host_protocol_host.cc", |
Arthur Ishiguro | abe6dd6 | 2018-03-08 15:37:07 -0800 | [diff] [blame] | 58 | "host/common/socket_client.cc", |
Brian Duddie | 7621b32 | 2017-03-18 19:35:18 -0700 | [diff] [blame] | 59 | "platform/shared/host_protocol_common.cc", |
Brian Duddie | 72833b2 | 2017-03-16 13:00:21 -0700 | [diff] [blame] | 60 | ], |
Brian Duddie | 24ca58c | 2017-08-16 16:27:00 -0700 | [diff] [blame] | 61 | header_libs: ["chre_flatbuffers"], |
| 62 | export_header_lib_headers: ["chre_flatbuffers"], |
Brian Duddie | 72833b2 | 2017-03-16 13:00:21 -0700 | [diff] [blame] | 63 | shared_libs: [ |
| 64 | "libcutils", |
| 65 | "liblog", |
| 66 | "libutils", |
| 67 | ], |
Chih-Hung Hsieh | 872df74 | 2017-10-02 15:34:31 -0700 | [diff] [blame] | 68 | cflags: ["-Wall", "-Werror"], |
Brian Duddie | 7621b32 | 2017-03-18 19:35:18 -0700 | [diff] [blame] | 69 | } |
| 70 | |
Harpreet "Eli" Sangha | 5309a1a | 2019-05-01 17:55:25 +0900 | [diff] [blame] | 71 | cc_binary { |
Brian Duddie | 7621b32 | 2017-03-18 19:35:18 -0700 | [diff] [blame] | 72 | name: "chre_test_client", |
Steven Moreland | 9e280e7 | 2017-04-11 13:01:17 -0700 | [diff] [blame] | 73 | vendor: true, |
Brian Duddie | 9d5b500 | 2017-03-22 16:13:24 -0700 | [diff] [blame] | 74 | local_include_dirs: [ |
| 75 | "chre_api/include/chre_api", |
| 76 | "util/include", |
| 77 | ], |
Brian Duddie | 7621b32 | 2017-03-18 19:35:18 -0700 | [diff] [blame] | 78 | srcs: [ |
| 79 | "host/common/test/chre_test_client.cc", |
| 80 | ], |
Chih-Hung Hsieh | 872df74 | 2017-10-02 15:34:31 -0700 | [diff] [blame] | 81 | cflags: ["-Wall", "-Werror"], |
Brian Duddie | 7621b32 | 2017-03-18 19:35:18 -0700 | [diff] [blame] | 82 | shared_libs: [ |
| 83 | "libcutils", |
| 84 | "liblog", |
| 85 | "libutils", |
| 86 | ], |
| 87 | static_libs: ["chre_client"], |
Brian Duddie | 72833b2 | 2017-03-16 13:00:21 -0700 | [diff] [blame] | 88 | } |
Brian Duddie | 3d891e3 | 2017-03-19 10:14:53 -0700 | [diff] [blame] | 89 | |
chaoyangf | dcebfb0 | 2019-07-17 16:35:00 -0700 | [diff] [blame] | 90 | cc_binary { |
| 91 | name: "chre_power_test_client", |
| 92 | vendor: true, |
| 93 | local_include_dirs: [ |
| 94 | "chre_api/include/chre_api", |
| 95 | "util/include", |
chaoyangf | 518632d | 2019-08-09 18:15:41 -0700 | [diff] [blame] | 96 | "apps/power_test/common/include", |
chaoyangf | dcebfb0 | 2019-07-17 16:35:00 -0700 | [diff] [blame] | 97 | ], |
| 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 Rossignol | 0d57e45 | 2018-07-24 11:40:30 -0700 | [diff] [blame] | 110 | cc_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 Stange | 1b95c2f | 2020-02-13 13:55:41 -0500 | [diff] [blame] | 130 | cc_library_headers { |
| 131 | name: "android.hardware.contexthub@1.X-shared-impl", |
Steven Moreland | 9e280e7 | 2017-04-11 13:01:17 -0700 | [diff] [blame] | 132 | vendor: true, |
Anthony Stange | 1b95c2f | 2020-02-13 13:55:41 -0500 | [diff] [blame] | 133 | export_include_dirs: ["host/hal_generic/common/"], |
Chih-Hung Hsieh | 872df74 | 2017-10-02 15:34:31 -0700 | [diff] [blame] | 134 | cflags: ["-Wall", "-Werror"], |
Brian Duddie | 3d891e3 | 2017-03-19 10:14:53 -0700 | [diff] [blame] | 135 | shared_libs: [ |
| 136 | "libcutils", |
| 137 | "liblog", |
| 138 | "libhidlbase", |
Brian Duddie | 3d891e3 | 2017-03-19 10:14:53 -0700 | [diff] [blame] | 139 | "libutils", |
| 140 | "android.hardware.contexthub@1.0", |
Brian Duddie | 3d891e3 | 2017-03-19 10:14:53 -0700 | [diff] [blame] | 141 | ], |
| 142 | static_libs: ["chre_client"], |
Brian Duddie | 3d891e3 | 2017-03-19 10:14:53 -0700 | [diff] [blame] | 143 | } |
Brian Duddie | 24ca58c | 2017-08-16 16:27:00 -0700 | [diff] [blame] | 144 | |
Anthony Stange | 1b95c2f | 2020-02-13 13:55:41 -0500 | [diff] [blame] | 145 | cc_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 Ishiguro | d831129 | 2021-08-27 12:50:53 -0700 | [diff] [blame] | 151 | "host/hal_generic/common/hal_chre_socket_connection.cc", |
Anthony Stange | ffbd71f | 2021-02-15 22:15:48 +0000 | [diff] [blame] | 152 | "host/hal_generic/common/permissions_util.cc", |
Anthony Stange | 1b95c2f | 2020-02-13 13:55:41 -0500 | [diff] [blame] | 153 | ], |
| 154 | cflags: ["-Wall", "-Werror"], |
| 155 | header_libs: [ |
| 156 | "android.hardware.contexthub@1.X-shared-impl", |
Anthony Stange | ffbd71f | 2021-02-15 22:15:48 +0000 | [diff] [blame] | 157 | "android.hardware.contexthub@1.X-common-utils", |
Anthony Stange | 1b95c2f | 2020-02-13 13:55:41 -0500 | [diff] [blame] | 158 | ], |
| 159 | shared_libs: [ |
| 160 | "libcutils", |
| 161 | "liblog", |
| 162 | "libhidlbase", |
| 163 | "libutils", |
| 164 | "android.hardware.contexthub@1.0", |
Anthony Stange | ffbd71f | 2021-02-15 22:15:48 +0000 | [diff] [blame] | 165 | "android.hardware.contexthub@1.1", |
| 166 | "android.hardware.contexthub@1.2", |
Anthony Stange | 1b95c2f | 2020-02-13 13:55:41 -0500 | [diff] [blame] | 167 | ], |
| 168 | static_libs: ["chre_client"], |
| 169 | } |
| 170 | |
| 171 | cc_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 Ishiguro | 095954c | 2020-10-09 11:14:27 -0700 | [diff] [blame] | 179 | "host/hal_generic/common/context_hub_settings_util.cc", |
Arthur Ishiguro | d831129 | 2021-08-27 12:50:53 -0700 | [diff] [blame] | 180 | "host/hal_generic/common/hal_chre_socket_connection.cc", |
Anthony Stange | ffbd71f | 2021-02-15 22:15:48 +0000 | [diff] [blame] | 181 | "host/hal_generic/common/permissions_util.cc", |
Anthony Stange | 1b95c2f | 2020-02-13 13:55:41 -0500 | [diff] [blame] | 182 | ], |
| 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 Stange | ffbd71f | 2021-02-15 22:15:48 +0000 | [diff] [blame] | 187 | "android.hardware.contexthub@1.X-common-utils", |
Anthony Stange | 1b95c2f | 2020-02-13 13:55:41 -0500 | [diff] [blame] | 188 | ], |
| 189 | shared_libs: [ |
| 190 | "libcutils", |
| 191 | "liblog", |
| 192 | "libhidlbase", |
| 193 | "libutils", |
| 194 | "android.hardware.contexthub@1.0", |
| 195 | "android.hardware.contexthub@1.1", |
Arthur Ishiguro | 49acf50 | 2020-10-15 15:07:21 -0700 | [diff] [blame] | 196 | "android.hardware.contexthub@1.2", |
Anthony Stange | 1b95c2f | 2020-02-13 13:55:41 -0500 | [diff] [blame] | 197 | ], |
| 198 | static_libs: ["chre_client"], |
| 199 | vintf_fragments: ["host/hal_generic/V1_1/android.hardware.contexthub@1.1-generic.xml"], |
| 200 | } |
| 201 | |
Arthur Ishiguro | 367ddf7 | 2020-10-07 08:25:00 -0700 | [diff] [blame] | 202 | cc_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 Ishiguro | d831129 | 2021-08-27 12:50:53 -0700 | [diff] [blame] | 211 | "host/hal_generic/common/hal_chre_socket_connection.cc", |
Anthony Stange | ffbd71f | 2021-02-15 22:15:48 +0000 | [diff] [blame] | 212 | "host/hal_generic/common/permissions_util.cc", |
Arthur Ishiguro | 367ddf7 | 2020-10-07 08:25:00 -0700 | [diff] [blame] | 213 | ], |
| 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 Stange | ffbd71f | 2021-02-15 22:15:48 +0000 | [diff] [blame] | 218 | "android.hardware.contexthub@1.X-common-utils", |
Arthur Ishiguro | 367ddf7 | 2020-10-07 08:25:00 -0700 | [diff] [blame] | 219 | ], |
| 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 Berchet | 147f9ef | 2022-01-27 17:06:43 -0800 | [diff] [blame] | 233 | cc_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 | |
| 259 | cc_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 Ishiguro | 176c321 | 2021-08-10 12:48:13 -0700 | [diff] [blame] | 291 | cc_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 Berchet | b8391b3 | 2022-01-27 13:57:14 -0800 | [diff] [blame] | 302 | local_include_dirs: [ |
| 303 | "host/hal_generic/common/", |
| 304 | "util/include", |
| 305 | ], |
Arthur Ishiguro | 176c321 | 2021-08-10 12:48:13 -0700 | [diff] [blame] | 306 | init_rc: ["host/hal_generic/aidl/android.hardware.contexthub-service.generic.rc"], |
Arthur Ishiguro | 0eec13e | 2021-12-23 20:42:09 +0000 | [diff] [blame] | 307 | cflags: [ |
| 308 | "-Wall", |
| 309 | "-Werror", |
| 310 | "-DCHRE_MESSAGE_TO_HOST_MAX_SIZE=4000", // Needed to import CHRE APIs. |
Yixuan Wang | cae5ebf | 2022-01-08 00:30:04 +0000 | [diff] [blame] | 311 | "-DCHRE_HAL_SOCKET_METRICS_ENABLED", |
Victor Berchet | b8391b3 | 2022-01-27 13:57:14 -0800 | [diff] [blame] | 312 | "-DCHRE_IS_HOST_BUILD", |
Arthur Ishiguro | 0eec13e | 2021-12-23 20:42:09 +0000 | [diff] [blame] | 313 | ], |
Arthur Ishiguro | 176c321 | 2021-08-10 12:48:13 -0700 | [diff] [blame] | 314 | shared_libs: [ |
Yixuan Wang | cae5ebf | 2022-01-08 00:30:04 +0000 | [diff] [blame] | 315 | "android.frameworks.stats-V1-ndk", |
Arthur Ishiguro | 176c321 | 2021-08-10 12:48:13 -0700 | [diff] [blame] | 316 | "libcutils", |
| 317 | "liblog", |
Yixuan Wang | cae5ebf | 2022-01-08 00:30:04 +0000 | [diff] [blame] | 318 | "libprotobuf-cpp-lite", |
Arthur Ishiguro | 176c321 | 2021-08-10 12:48:13 -0700 | [diff] [blame] | 319 | "libutils", |
| 320 | "libbase", |
| 321 | "libbinder_ndk", |
| 322 | "android.hardware.contexthub-V1-ndk", |
Yixuan Wang | cae5ebf | 2022-01-08 00:30:04 +0000 | [diff] [blame] | 323 | "//hardware/google/pixel:pixelatoms-cpp", |
Arthur Ishiguro | 176c321 | 2021-08-10 12:48:13 -0700 | [diff] [blame] | 324 | ], |
Haamed Gheibi | 256572f | 2022-02-04 13:47:17 -0800 | [diff] [blame] | 325 | // TODO(b/217754528): Re-enable this module |
| 326 | enabled: false, |
Arthur Ishiguro | 0eec13e | 2021-12-23 20:42:09 +0000 | [diff] [blame] | 327 | header_libs: [ |
| 328 | "chre_api", |
| 329 | ], |
Yixuan Wang | cae5ebf | 2022-01-08 00:30:04 +0000 | [diff] [blame] | 330 | static_libs: [ |
Victor Berchet | 147f9ef | 2022-01-27 17:06:43 -0800 | [diff] [blame] | 331 | "chre_client", |
| 332 | "event_logger", |
Yixuan Wang | cae5ebf | 2022-01-08 00:30:04 +0000 | [diff] [blame] | 333 | ], |
Arthur Ishiguro | 176c321 | 2021-08-10 12:48:13 -0700 | [diff] [blame] | 334 | vintf_fragments: ["host/hal_generic/aidl/android.hardware.contexthub-service.generic.xml"], |
| 335 | } |
| 336 | |
Brian Duddie | 24ca58c | 2017-08-16 16:27:00 -0700 | [diff] [blame] | 337 | cc_library_headers { |
Brian Duddie | 7ab2df1 | 2017-08-16 16:40:14 -0700 | [diff] [blame] | 338 | name: "chre_api", |
Brian Duddie | 303fed0 | 2017-08-18 10:16:19 -0700 | [diff] [blame] | 339 | vendor: true, |
Brian Duddie | 7ab2df1 | 2017-08-16 16:40:14 -0700 | [diff] [blame] | 340 | export_include_dirs: [ |
| 341 | "chre_api/include/chre_api", |
Ahmad Rahmati | 5eb1339 | 2020-05-04 11:19:33 -0700 | [diff] [blame] | 342 | "chre_api/include", |
| 343 | ], |
| 344 | host_supported: true, |
Brian Duddie | 7ab2df1 | 2017-08-16 16:40:14 -0700 | [diff] [blame] | 345 | } |
| 346 | |
| 347 | cc_library_headers { |
Brian Duddie | 24ca58c | 2017-08-16 16:27:00 -0700 | [diff] [blame] | 348 | name: "chre_flatbuffers", |
| 349 | vendor: true, |
Victor Berchet | 147f9ef | 2022-01-27 17:06:43 -0800 | [diff] [blame] | 350 | host_supported: true, |
Brian Duddie | 24ca58c | 2017-08-16 16:27:00 -0700 | [diff] [blame] | 351 | export_include_dirs: [ |
| 352 | "external/flatbuffers/include", |
Mike Cailean | 2833f65 | 2018-03-12 13:33:43 -0700 | [diff] [blame] | 353 | "host/common/include", |
| 354 | "platform/shared/include", |
| 355 | "util/include", |
Brian Duddie | 24ca58c | 2017-08-16 16:27:00 -0700 | [diff] [blame] | 356 | ], |
| 357 | } |
Mehdi Alizadeh | d2c8b6d | 2017-08-15 16:06:36 -0700 | [diff] [blame] | 358 | |
Ahmad Rahmati | 5eb1339 | 2020-05-04 11:19:33 -0700 | [diff] [blame] | 359 | cc_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 Ishiguro | adc178a | 2021-03-02 13:10:32 -0800 | [diff] [blame] | 374 | cc_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 Ishiguro | 161bb2b | 2020-09-24 09:08:39 -0700 | [diff] [blame] | 383 | cc_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 bharadwaj | 0a37c94 | 2022-01-26 15:50:04 -0800 | [diff] [blame] | 392 | "platform/linux/pal_nan.cc", |
Arthur Ishiguro | 161bb2b | 2020-09-24 09:08:39 -0700 | [diff] [blame] | 393 | "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 Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 407 | static_libs: [ |
| 408 | "libgtest", |
| 409 | "libgmock", |
| 410 | ], |
| 411 | defaults: [ |
| 412 | "chre_linux_cflags", |
Arthur Ishiguro | 161bb2b | 2020-09-24 09:08:39 -0700 | [diff] [blame] | 413 | ], |
| 414 | host_supported: true, |
| 415 | } |
| 416 | |
Arthur Ishiguro | 87bfcb3 | 2020-09-26 10:25:48 -0700 | [diff] [blame] | 417 | cc_test_host { |
| 418 | name: "chre_unit_tests", |
| 419 | srcs: [ |
Arthur Ishiguro | 9cdbf91 | 2020-10-31 09:34:45 -0700 | [diff] [blame] | 420 | "core/tests/**/*.cc", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 421 | "pal/tests/**/*_test.cc", |
Arthur Ishiguro | 22d37e3 | 2020-11-09 14:24:59 -0800 | [diff] [blame] | 422 | "pal/util/tests/**/*.cc", |
Arthur Ishiguro | b602485 | 2021-01-28 11:08:46 -0800 | [diff] [blame] | 423 | "pal/util/wifi_pal_convert.c", |
Arthur Ishiguro | 22d37e3 | 2020-11-09 14:24:59 -0800 | [diff] [blame] | 424 | "pal/util/wifi_scan_cache.c", |
Stan Rokita | 4f6fc36 | 2020-10-28 10:56:22 -0700 | [diff] [blame] | 425 | "platform/tests/**/*.cc", |
Arthur Ishiguro | 87bfcb3 | 2020-09-26 10:25:48 -0700 | [diff] [blame] | 426 | "util/tests/**/*.cc", |
| 427 | ], |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 428 | exclude_srcs: [ |
| 429 | // Exclude slow PAL tests. |
| 430 | "pal/tests/src/gnss_pal_impl_test.cc", |
| 431 | ], |
Arthur Ishiguro | 87bfcb3 | 2020-09-26 10:25:48 -0700 | [diff] [blame] | 432 | local_include_dirs: [ |
Arthur Ishiguro | 9989a0b | 2020-10-27 11:46:56 -0700 | [diff] [blame] | 433 | "chre_api/include", |
Arthur Ishiguro | 87bfcb3 | 2020-09-26 10:25:48 -0700 | [diff] [blame] | 434 | "chre_api/include/chre_api", |
Arthur Ishiguro | b7a226d | 2020-10-27 17:26:33 -0700 | [diff] [blame] | 435 | "core/include", |
Arthur Ishiguro | 9989a0b | 2020-10-27 11:46:56 -0700 | [diff] [blame] | 436 | "pal/include", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 437 | "pal/tests/include", |
Arthur Ishiguro | 22d37e3 | 2020-11-09 14:24:59 -0800 | [diff] [blame] | 438 | "pal/util/include", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 439 | "platform/include", |
Arthur Ishiguro | 87bfcb3 | 2020-09-26 10:25:48 -0700 | [diff] [blame] | 440 | "platform/linux/include", |
| 441 | "platform/shared/include", |
Arthur Ishiguro | 87bfcb3 | 2020-09-26 10:25:48 -0700 | [diff] [blame] | 442 | "util/include", |
| 443 | ], |
Arthur Ishiguro | 87bfcb3 | 2020-09-26 10:25:48 -0700 | [diff] [blame] | 444 | cflags: [ |
Arthur Ishiguro | b7a226d | 2020-10-27 17:26:33 -0700 | [diff] [blame] | 445 | "-DCHRE_MESSAGE_TO_HOST_MAX_SIZE=4096", |
Arthur Ishiguro | 87bfcb3 | 2020-09-26 10:25:48 -0700 | [diff] [blame] | 446 | "-DCHRE_MINIMUM_LOG_LEVEL=CHRE_LOG_LEVEL_DEBUG", |
| 447 | "-DCHRE_ASSERTIONS_ENABLED=true", |
| 448 | "-DCHRE_FILENAME=__FILE__", |
| 449 | "-DGTEST", |
| 450 | ], |
| 451 | static_libs: [ |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 452 | "chre_linux", |
Arthur Ishiguro | 87bfcb3 | 2020-09-26 10:25:48 -0700 | [diff] [blame] | 453 | "libgmock", |
| 454 | ], |
Anthony Stange | 63d32d7 | 2021-09-20 18:40:48 +0000 | [diff] [blame] | 455 | sanitize: { |
| 456 | address: true, |
| 457 | }, |
Arthur Ishiguro | 87bfcb3 | 2020-09-26 10:25:48 -0700 | [diff] [blame] | 458 | } |
| 459 | |
Arthur Ishiguro | 19c0480 | 2021-07-23 10:01:35 -0700 | [diff] [blame] | 460 | cc_test_host { |
| 461 | name: "chre_simulation_tests", |
| 462 | srcs: [ |
| 463 | "test/simulation/*.cc", |
| 464 | ], |
| 465 | local_include_dirs: [ |
| 466 | "test/simulation/inc", |
Victor Berchet | ace1c0d | 2022-03-08 13:40:21 -0800 | [diff] [blame] | 467 | "platform/shared", |
Arthur Ishiguro | 19c0480 | 2021-07-23 10:01:35 -0700 | [diff] [blame] | 468 | ], |
| 469 | static_libs: [ |
| 470 | "chre_linux", |
karthik bharadwaj | 0a37c94 | 2022-01-26 15:50:04 -0800 | [diff] [blame] | 471 | "chre_pal_linux", |
Arthur Ishiguro | 19c0480 | 2021-07-23 10:01:35 -0700 | [diff] [blame] | 472 | ], |
Arthur Ishiguro | 92ccef9 | 2021-12-22 23:03:34 +0000 | [diff] [blame] | 473 | defaults: [ |
| 474 | "chre_linux_cflags", |
Arthur Ishiguro | 19c0480 | 2021-07-23 10:01:35 -0700 | [diff] [blame] | 475 | ], |
Arthur Ishiguro | b66bdbe | 2021-09-20 10:01:01 -0700 | [diff] [blame] | 476 | sanitize: { |
| 477 | address: true, |
| 478 | }, |
Arthur Ishiguro | 19c0480 | 2021-07-23 10:01:35 -0700 | [diff] [blame] | 479 | } |
| 480 | |
| 481 | cc_library_static { |
| 482 | name: "chre_linux", |
| 483 | vendor: true, |
| 484 | srcs: [ |
Victor Berchet | e5779a1 | 2022-03-15 13:49:52 -0700 | [diff] [blame] | 485 | "core/audio_request_manager.cc", |
Anna Herrera | 0a6d83f | 2021-12-22 19:00:44 +0000 | [diff] [blame] | 486 | "core/ble_request_manager.cc", |
Anthony | acaff77 | 2022-01-18 20:27:17 +0000 | [diff] [blame] | 487 | "core/ble_request_multiplexer.cc", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 488 | "core/ble_request.cc", |
| 489 | "core/debug_dump_manager.cc", |
Arthur Ishiguro | 19c0480 | 2021-07-23 10:01:35 -0700 | [diff] [blame] | 490 | "core/event_loop_manager.cc", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 491 | "core/event_loop.cc", |
Arthur Ishiguro | 19c0480 | 2021-07-23 10:01:35 -0700 | [diff] [blame] | 492 | "core/event_ref_queue.cc", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 493 | "core/event.cc", |
Arthur Ishiguro | ec29672 | 2021-07-28 17:03:39 -0700 | [diff] [blame] | 494 | "core/gnss_manager.cc", |
Arthur Ishiguro | 9bf94bc | 2021-12-03 04:23:17 +0000 | [diff] [blame] | 495 | "core/host_comms_manager.cc", |
Arthur Ishiguro | 9bf94bc | 2021-12-03 04:23:17 +0000 | [diff] [blame] | 496 | "core/host_notifications.cc", |
Anna Herrera | 4a97bb2 | 2022-01-26 01:36:48 +0000 | [diff] [blame] | 497 | "core/init.cc", |
| 498 | "core/nanoapp.cc", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 499 | "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 Herrera | 4a97bb2 | 2022-01-26 01:36:48 +0000 | [diff] [blame] | 505 | "core/settings.cc", |
| 506 | "core/timer_pool.cc", |
karthik bharadwaj | 0a37c94 | 2022-01-26 15:50:04 -0800 | [diff] [blame] | 507 | "core/wifi_request_manager.cc", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 508 | "core/wifi_scan_request.cc", |
Arthur Ishiguro | 19c0480 | 2021-07-23 10:01:35 -0700 | [diff] [blame] | 509 | "platform/linux/assert.cc", |
| 510 | "platform/linux/context.cc", |
| 511 | "platform/linux/fatal_error.cc", |
| 512 | "platform/linux/host_link.cc", |
Arthur Ishiguro | 19c0480 | 2021-07-23 10:01:35 -0700 | [diff] [blame] | 513 | "platform/linux/memory_manager.cc", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 514 | "platform/linux/memory.cc", |
Victor Berchet | 826868f | 2022-03-11 16:00:57 -0800 | [diff] [blame] | 515 | "platform/linux/pal_audio.cc", |
Anna Herrera | 0a6d83f | 2021-12-22 19:00:44 +0000 | [diff] [blame] | 516 | "platform/linux/pal_ble.cc", |
Arthur Ishiguro | ec29672 | 2021-07-28 17:03:39 -0700 | [diff] [blame] | 517 | "platform/linux/pal_gnss.cc", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 518 | "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 Berchet | e5779a1 | 2022-03-15 13:49:52 -0700 | [diff] [blame] | 530 | "platform/linux/testing/platform_audio.cc", |
Victor Berchet | 3a9a33c | 2022-03-15 11:55:47 -0700 | [diff] [blame] | 531 | "platform/shared/chre_api_audio.cc", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 532 | "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 Ishiguro | 19c0480 | 2021-07-23 10:01:35 -0700 | [diff] [blame] | 539 | "platform/shared/log_buffer.cc", |
| 540 | "platform/shared/memory_manager.cc", |
| 541 | "platform/shared/pal_system_api.cc", |
Anna Herrera | 0a6d83f | 2021-12-22 19:00:44 +0000 | [diff] [blame] | 542 | "platform/shared/platform_ble.cc", |
Arthur Ishiguro | ec29672 | 2021-07-28 17:03:39 -0700 | [diff] [blame] | 543 | "platform/shared/platform_gnss.cc", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 544 | "platform/shared/platform_sensor_manager.cc", |
karthik bharadwaj | 0a37c94 | 2022-01-26 15:50:04 -0800 | [diff] [blame] | 545 | "platform/shared/platform_wifi.cc", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 546 | "platform/shared/system_time.cc", |
| 547 | "platform/shared/version.cc", |
Arthur Ishiguro | 19c0480 | 2021-07-23 10:01:35 -0700 | [diff] [blame] | 548 | "util/**/*.cc", |
| 549 | ], |
Anthony Stange | 5ee729a | 2022-02-04 20:02:33 +0000 | [diff] [blame] | 550 | // TODO(b/217952682) Exclude pigweed because it can't be built via |
| 551 | // Android.bp |
| 552 | exclude_srcs: [ |
| 553 | "util/pigweed/*.cc", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 554 | "util/tests/**/*", |
Anthony Stange | 5ee729a | 2022-02-04 20:02:33 +0000 | [diff] [blame] | 555 | ], |
Arthur Ishiguro | 19c0480 | 2021-07-23 10:01:35 -0700 | [diff] [blame] | 556 | 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 Berchet | e5779a1 | 2022-03-15 13:49:52 -0700 | [diff] [blame] | 563 | "platform/linux/testing/include", |
Arthur Ishiguro | 19c0480 | 2021-07-23 10:01:35 -0700 | [diff] [blame] | 564 | "platform/shared/include", |
| 565 | "platform/include", |
| 566 | "util/include", |
| 567 | ], |
| 568 | header_libs: [ |
| 569 | "chre_api", |
| 570 | ], |
Arthur Ishiguro | 92ccef9 | 2021-12-22 23:03:34 +0000 | [diff] [blame] | 571 | defaults: [ |
| 572 | "chre_linux_cflags", |
Arthur Ishiguro | 19c0480 | 2021-07-23 10:01:35 -0700 | [diff] [blame] | 573 | ], |
| 574 | static_libs: [ |
| 575 | "libgtest", |
| 576 | "libgmock", |
| 577 | ], |
| 578 | host_supported: true, |
| 579 | } |
| 580 | |
Arthur Ishiguro | 92ccef9 | 2021-12-22 23:03:34 +0000 | [diff] [blame] | 581 | cc_defaults { |
| 582 | name: "chre_linux_cflags", |
| 583 | cflags: [ |
Brian Duddie | 3d0e53b | 2017-03-10 14:18:24 -0800 | [diff] [blame] | 584 | "-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 Berchet | e5779a1 | 2022-03-15 13:49:52 -0700 | [diff] [blame] | 590 | "-DCHRE_AUDIO_SUPPORT_ENABLED", |
Anna Herrera | 0a6d83f | 2021-12-22 19:00:44 +0000 | [diff] [blame] | 591 | "-DCHRE_BLE_SUPPORT_ENABLED", |
Arthur Ishiguro | ec29672 | 2021-07-28 17:03:39 -0700 | [diff] [blame] | 592 | "-DCHRE_GNSS_SUPPORT_ENABLED", |
Victor Berchet | e61ac4b | 2022-02-25 14:24:16 -0800 | [diff] [blame] | 593 | "-DCHRE_SENSORS_SUPPORT_ENABLED", |
karthik bharadwaj | 0a37c94 | 2022-01-26 15:50:04 -0800 | [diff] [blame] | 594 | "-DCHRE_WIFI_SUPPORT_ENABLED", |
| 595 | "-DCHRE_WIFI_NAN_SUPPORT_ENABLED", |
Brian Duddie | 3d0e53b | 2017-03-10 14:18:24 -0800 | [diff] [blame] | 596 | ], |
Brian Duddie | 3d0e53b | 2017-03-10 14:18:24 -0800 | [diff] [blame] | 597 | } |
| 598 | |
Brian Duddie | 3d0e53b | 2017-03-10 14:18:24 -0800 | [diff] [blame] | 599 | subdirs = [ |
| 600 | "apps/wifi_offload", |
| 601 | ] |