blob: 869c0c9124ae2e4de6ee418a0d242efaa9054759 [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",
Jiyong Parkd55d28a2021-08-09 09:47:37 +090044 "android.automotive.watchdog-V2-ndk",
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 Chen945c4302021-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",
185 ],
Tri Vofc871402017-07-10 17:13:23 -0700186 header_libs: ["libbase_headers"],
Keun Soo YIMff84c372018-11-27 14:04:42 -0800187 test_suites: ["general-tests"],
Tri Vofc871402017-07-10 17:13:23 -0700188}
189
Hao Chen1c1fdca2019-11-15 14:20:34 -0800190cc_test {
191 name: "android.hardware.automotive.vehicle@2.0-default-impl-unit-tests",
192 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700193 defaults: ["vhal_v2_0_target_defaults"],
Hao Chen1c1fdca2019-11-15 14:20:34 -0800194 srcs: [
195 "impl/vhal_v2_0/tests/ProtoMessageConverter_test.cpp",
196 ],
197 static_libs: [
198 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
199 "android.hardware.automotive.vehicle@2.0-libproto-native",
200 "libprotobuf-cpp-lite",
201 ],
202 test_suites: ["general-tests"],
203}
204
Tri Vofc871402017-07-10 17:13:23 -0700205cc_binary {
206 name: "android.hardware.automotive.vehicle@2.0-service",
Hao Chenc324db92020-06-03 18:29:31 -0700207 defaults: ["vhal_v2_0_target_defaults"],
Calvin Huanga6536162020-04-20 12:41:20 -0700208 vintf_fragments: [
209 "android.hardware.automotive.vehicle@2.0-service.xml",
210 ],
Tri Vofc871402017-07-10 17:13:23 -0700211 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
Tri Vo22b2d682017-07-11 12:53:12 -0700212 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700213 relative_install_path: "hw",
214 srcs: ["VehicleService.cpp"],
215 shared_libs: [
216 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +0900217 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -0700218 "libprotobuf-cpp-lite",
219 ],
220 static_libs: [
221 "android.hardware.automotive.vehicle@2.0-manager-lib",
222 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
223 "android.hardware.automotive.vehicle@2.0-libproto-native",
Tri Vofc871402017-07-10 17:13:23 -0700224 ],
225}
Ayushi Khopkarb3057b02020-08-31 10:59:52 +0530226
227cc_fuzz {
228 name: "vehicleManager_fuzzer",
229 vendor: true,
230 defaults: ["vhal_v2_0_target_defaults"],
231 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
232 srcs: [
233 "tests/fuzzer/VehicleManager_fuzzer.cpp",
234 ],
235 shared_libs: [
236 "libbase",
237 "libcutils",
238 "libbinder_ndk",
239 ],
240 header_libs: ["libbase_headers"],
241 local_include_dirs: [
242 "common/include",
243 "tests",
244 ],
245 fuzz_config: {
246 cc: [
247 "android-media-fuzzing-reports@google.com",
248 ],
249 componentid: 533764,
250 },
251}