blob: ea42c3eaa6575bd00211940a0bd42a05e8bfcf15 [file] [log] [blame]
Tri Vofc871402017-07-10 17:13:23 -07001// Copyright (C) 2017 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badourc22b35b2021-02-23 14:26:20 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "hardware_interfaces_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["hardware_interfaces_license"],
22}
23
Tri Vofc871402017-07-10 17:13:23 -070024cc_defaults {
25 name: "vhal_v2_0_defaults",
26 shared_libs: [
27 "libhidlbase",
Tri Vofc871402017-07-10 17:13:23 -070028 "liblog",
29 "libutils",
30 "android.hardware.automotive.vehicle@2.0",
31 ],
32 cflags: [
33 "-Wall",
34 "-Wextra",
35 "-Werror",
36 ],
37}
38
Hao Chenc324db92020-06-03 18:29:31 -070039cc_defaults {
40 name: "vhal_v2_0_target_defaults",
41 defaults: ["vhal_v2_0_defaults"],
42 shared_libs: [
43 "libbinder_ndk",
Jeongik Cha38533912021-01-28 00:49:49 +090044 "android.automotive.watchdog-V2-ndk_platform",
Hao Chenc324db92020-06-03 18:29:31 -070045 ],
46}
47
Tri Vofc871402017-07-10 17:13:23 -070048cc_library_headers {
49 name: "vhal_v2_0_common_headers",
Tri Vo22b2d682017-07-11 12:53:12 -070050 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070051 export_include_dirs: ["common/include/vhal_v2_0"],
52}
53
54// Vehicle reference implementation lib
Anthony Maha9d8c0d2017-10-03 16:22:22 -070055cc_library {
Tri Vofc871402017-07-10 17:13:23 -070056 name: "android.hardware.automotive.vehicle@2.0-manager-lib",
Tri Vo22b2d682017-07-11 12:53:12 -070057 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -070058 defaults: ["vhal_v2_0_target_defaults"],
Tri Vofc871402017-07-10 17:13:23 -070059 srcs: [
Pavel Maltsev250139c2017-08-24 15:09:41 -070060 "common/src/Obd2SensorStore.cpp",
Tri Vofc871402017-07-10 17:13:23 -070061 "common/src/SubscriptionManager.cpp",
62 "common/src/VehicleHalManager.cpp",
63 "common/src/VehicleObjectPool.cpp",
64 "common/src/VehiclePropertyStore.cpp",
65 "common/src/VehicleUtils.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -080066 "common/src/VmsUtils.cpp",
Eric Jeong908101a2020-04-23 09:43:55 -070067 "common/src/WatchdogClient.cpp",
Tri Vofc871402017-07-10 17:13:23 -070068 ],
Felipe Leme75a27f82020-01-31 15:25:55 -080069 shared_libs: [
70 "libbase",
71 ],
Tri Vofc871402017-07-10 17:13:23 -070072 local_include_dirs: ["common/include/vhal_v2_0"],
73 export_include_dirs: ["common/include"],
74}
75
Tri Vofc871402017-07-10 17:13:23 -070076// Vehicle default VehicleHAL implementation
77cc_library_static {
78 name: "android.hardware.automotive.vehicle@2.0-default-impl-lib",
Tri Vo22b2d682017-07-11 12:53:12 -070079 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -070080 defaults: ["vhal_v2_0_target_defaults"],
Yuncheol Heo38ec2402021-04-15 15:25:39 -070081 cflags: ["-DENABLE_VENDOR_CLUSTER_PROPERTY_FOR_TESTING"],
Tri Vofc871402017-07-10 17:13:23 -070082 srcs: [
Dean Hardingbea881c2018-06-15 13:33:47 -070083 "impl/vhal_v2_0/CommConn.cpp",
Hao Chenfba3ac82019-11-07 11:55:25 -080084 "impl/vhal_v2_0/EmulatedVehicleConnector.cpp",
Tri Vofc871402017-07-10 17:13:23 -070085 "impl/vhal_v2_0/EmulatedVehicleHal.cpp",
Hao Chena6d6fa32020-02-14 11:51:26 -080086 "impl/vhal_v2_0/VehicleHalClient.cpp",
87 "impl/vhal_v2_0/VehicleHalServer.cpp",
Tri Vofc871402017-07-10 17:13:23 -070088 "impl/vhal_v2_0/VehicleEmulator.cpp",
89 "impl/vhal_v2_0/PipeComm.cpp",
Hao Chen1c1fdca2019-11-15 14:20:34 -080090 "impl/vhal_v2_0/ProtoMessageConverter.cpp",
Tri Vofc871402017-07-10 17:13:23 -070091 "impl/vhal_v2_0/SocketComm.cpp",
Chao Yanf63c2ca2018-04-17 11:32:39 -070092 "impl/vhal_v2_0/LinearFakeValueGenerator.cpp",
93 "impl/vhal_v2_0/JsonFakeValueGenerator.cpp",
Chao Yan0f85dd12018-06-04 14:03:02 -070094 "impl/vhal_v2_0/GeneratorHub.cpp",
Roman Kiryanov4e370a42021-04-08 12:10:07 -070095 "impl/vhal_v2_0/qemu_pipe.cpp",
Tri Vofc871402017-07-10 17:13:23 -070096 ],
97 local_include_dirs: ["common/include/vhal_v2_0"],
98 export_include_dirs: ["impl"],
felipeal9c998c02020-04-17 14:32:53 -070099 whole_static_libs: [
100 "android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib",
101 "android.hardware.automotive.vehicle@2.0-manager-lib",
102 ],
Tri Vofc871402017-07-10 17:13:23 -0700103 shared_libs: [
104 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +0900105 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -0700106 "libprotobuf-cpp-lite",
107 ],
108 static_libs: [
Tri Vofc871402017-07-10 17:13:23 -0700109 "android.hardware.automotive.vehicle@2.0-libproto-native",
110 ],
111}
112
felipeal9c998c02020-04-17 14:32:53 -0700113// Library used to emulate User HAL behavior through lshal debug requests.
114cc_library_static {
115 name: "android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib",
116 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700117 defaults: ["vhal_v2_0_target_defaults"],
felipeal9c998c02020-04-17 14:32:53 -0700118 srcs: [
119 "impl/vhal_v2_0/EmulatedUserHal.cpp",
120 ],
Lakshman Annadoraibfdb1ac2020-08-06 14:25:03 -0700121 whole_static_libs: [
122 "android.hardware.automotive.vehicle@2.0-user-hal-helper-lib",
123 ],
felipeal9c998c02020-04-17 14:32:53 -0700124}
125
Hao Chenc324db92020-06-03 18:29:31 -0700126// Vehicle HAL Server reference impl lib
127cc_library_static {
128 name: "android.hardware.automotive.vehicle@2.0-server-common-lib",
129 vendor: true,
130 host_supported: true,
131 defaults: ["vhal_v2_0_defaults"],
132 local_include_dirs: ["common/include/vhal_v2_0"],
133 export_include_dirs: ["common/include"],
134 srcs: [
135 "common/src/Obd2SensorStore.cpp",
136 "common/src/VehicleObjectPool.cpp",
Hao Chen0b7c2872021-05-12 12:21:33 -0700137 "common/src/VehiclePropertyStore.cpp",
Hao Chenc324db92020-06-03 18:29:31 -0700138 "common/src/VehicleUtils.cpp",
139 ],
140}
141
142// Vehicle HAL Server default implementation
143cc_library_static {
144 name: "android.hardware.automotive.vehicle@2.0-server-impl-lib",
145 vendor: true,
146 host_supported: true,
147 defaults: ["vhal_v2_0_defaults"],
148 local_include_dirs: ["common/include/vhal_v2_0"],
149 export_include_dirs: ["impl"],
150 srcs: [
Hao Chenc324db92020-06-03 18:29:31 -0700151 "impl/vhal_v2_0/GeneratorHub.cpp",
152 "impl/vhal_v2_0/JsonFakeValueGenerator.cpp",
153 "impl/vhal_v2_0/LinearFakeValueGenerator.cpp",
154 "impl/vhal_v2_0/ProtoMessageConverter.cpp",
155 "impl/vhal_v2_0/VehicleHalServer.cpp",
156 ],
157 whole_static_libs: [
158 "android.hardware.automotive.vehicle@2.0-server-common-lib",
Lakshman Annadoraibfdb1ac2020-08-06 14:25:03 -0700159 "android.hardware.automotive.vehicle@2.0-user-hal-helper-lib",
Hao Chenc324db92020-06-03 18:29:31 -0700160 ],
161 static_libs: [
162 "android.hardware.automotive.vehicle@2.0-libproto-native",
163 ],
164 shared_libs: [
165 "libbase",
166 "libjsoncpp",
167 ],
168}
169
Tri Vofc871402017-07-10 17:13:23 -0700170cc_test {
171 name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
Tri Vo22b2d682017-07-11 12:53:12 -0700172 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700173 defaults: ["vhal_v2_0_target_defaults"],
Tri Vofc871402017-07-10 17:13:23 -0700174 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
175 srcs: [
176 "tests/RecurrentTimer_test.cpp",
177 "tests/SubscriptionManager_test.cpp",
178 "tests/VehicleHalManager_test.cpp",
179 "tests/VehicleObjectPool_test.cpp",
180 "tests/VehiclePropConfigIndex_test.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -0800181 "tests/VmsUtils_test.cpp",
Tri Vofc871402017-07-10 17:13:23 -0700182 ],
Felipe Leme75a27f82020-01-31 15:25:55 -0800183 shared_libs: [
184 "libbase",
Yu Shan8ae3ea92021-06-01 15:44:43 -0700185 "libcutils",
Felipe Leme75a27f82020-01-31 15:25:55 -0800186 ],
Yu Shan045138d2021-06-02 16:15:29 -0700187 exclude_shared_libs: [
188 "android.automotive.watchdog-V2-ndk_platform",
189 "android.hardware.automotive.vehicle@2.0",
190 ],
191 static_libs: [
192 "android.automotive.watchdog-V2-ndk_platform",
193 "android.hardware.automotive.vehicle@2.0",
194 ],
Tri Vofc871402017-07-10 17:13:23 -0700195 header_libs: ["libbase_headers"],
Keun Soo YIMff84c372018-11-27 14:04:42 -0800196 test_suites: ["general-tests"],
Tri Vofc871402017-07-10 17:13:23 -0700197}
198
Hao Chen1c1fdca2019-11-15 14:20:34 -0800199cc_test {
200 name: "android.hardware.automotive.vehicle@2.0-default-impl-unit-tests",
201 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700202 defaults: ["vhal_v2_0_target_defaults"],
Hao Chen1c1fdca2019-11-15 14:20:34 -0800203 srcs: [
204 "impl/vhal_v2_0/tests/ProtoMessageConverter_test.cpp",
205 ],
206 static_libs: [
Yu Shan045138d2021-06-02 16:15:29 -0700207 "android.automotive.watchdog-V2-ndk_platform",
208 "android.hardware.automotive.vehicle@2.0",
Hao Chen1c1fdca2019-11-15 14:20:34 -0800209 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
210 "android.hardware.automotive.vehicle@2.0-libproto-native",
211 "libprotobuf-cpp-lite",
212 ],
Yu Shan045138d2021-06-02 16:15:29 -0700213 exclude_shared_libs: [
214 "android.automotive.watchdog-V2-ndk_platform",
215 "android.hardware.automotive.vehicle@2.0",
216 ],
Hao Chen1c1fdca2019-11-15 14:20:34 -0800217 test_suites: ["general-tests"],
218}
219
Tri Vofc871402017-07-10 17:13:23 -0700220cc_binary {
221 name: "android.hardware.automotive.vehicle@2.0-service",
Hao Chenc324db92020-06-03 18:29:31 -0700222 defaults: ["vhal_v2_0_target_defaults"],
Calvin Huanga6536162020-04-20 12:41:20 -0700223 vintf_fragments: [
224 "android.hardware.automotive.vehicle@2.0-service.xml",
225 ],
Tri Vofc871402017-07-10 17:13:23 -0700226 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
Tri Vo22b2d682017-07-11 12:53:12 -0700227 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700228 relative_install_path: "hw",
229 srcs: ["VehicleService.cpp"],
230 shared_libs: [
231 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +0900232 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -0700233 "libprotobuf-cpp-lite",
234 ],
235 static_libs: [
236 "android.hardware.automotive.vehicle@2.0-manager-lib",
237 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
238 "android.hardware.automotive.vehicle@2.0-libproto-native",
Tri Vofc871402017-07-10 17:13:23 -0700239 ],
240}
Ayushi Khopkarb3057b02020-08-31 10:59:52 +0530241
242cc_fuzz {
243 name: "vehicleManager_fuzzer",
244 vendor: true,
245 defaults: ["vhal_v2_0_target_defaults"],
246 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
247 srcs: [
248 "tests/fuzzer/VehicleManager_fuzzer.cpp",
249 ],
250 shared_libs: [
251 "libbase",
252 "libcutils",
253 "libbinder_ndk",
254 ],
255 header_libs: ["libbase_headers"],
256 local_include_dirs: [
257 "common/include",
258 "tests",
259 ],
260 fuzz_config: {
261 cc: [
262 "android-media-fuzzing-reports@google.com",
263 ],
264 componentid: 533764,
265 },
266}