blob: c13efde4e4ee6ccc12a838923585a87bca9780c8 [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 Badourb224b362021-02-12 20:13:01 -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 Cha1674c132021-01-26 22:34:55 +090044 "carwatchdog_aidl_interface-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"],
Tri Vofc871402017-07-10 17:13:23 -070081 srcs: [
Dean Hardingbea881c2018-06-15 13:33:47 -070082 "impl/vhal_v2_0/CommConn.cpp",
Hao Chenfba3ac82019-11-07 11:55:25 -080083 "impl/vhal_v2_0/EmulatedVehicleConnector.cpp",
Tri Vofc871402017-07-10 17:13:23 -070084 "impl/vhal_v2_0/EmulatedVehicleHal.cpp",
Hao Chena6d6fa32020-02-14 11:51:26 -080085 "impl/vhal_v2_0/VehicleHalClient.cpp",
86 "impl/vhal_v2_0/VehicleHalServer.cpp",
Tri Vofc871402017-07-10 17:13:23 -070087 "impl/vhal_v2_0/VehicleEmulator.cpp",
88 "impl/vhal_v2_0/PipeComm.cpp",
Hao Chen1c1fdca2019-11-15 14:20:34 -080089 "impl/vhal_v2_0/ProtoMessageConverter.cpp",
Tri Vofc871402017-07-10 17:13:23 -070090 "impl/vhal_v2_0/SocketComm.cpp",
Chao Yanf63c2ca2018-04-17 11:32:39 -070091 "impl/vhal_v2_0/LinearFakeValueGenerator.cpp",
92 "impl/vhal_v2_0/JsonFakeValueGenerator.cpp",
Chao Yan0f85dd12018-06-04 14:03:02 -070093 "impl/vhal_v2_0/GeneratorHub.cpp",
Roman Kiryanov4e370a42021-04-08 12:10:07 -070094 "impl/vhal_v2_0/qemu_pipe.cpp",
Tri Vofc871402017-07-10 17:13:23 -070095 ],
96 local_include_dirs: ["common/include/vhal_v2_0"],
97 export_include_dirs: ["impl"],
felipeal9c998c02020-04-17 14:32:53 -070098 whole_static_libs: [
99 "android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib",
100 "android.hardware.automotive.vehicle@2.0-manager-lib",
101 ],
Tri Vofc871402017-07-10 17:13:23 -0700102 shared_libs: [
103 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +0900104 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -0700105 "libprotobuf-cpp-lite",
106 ],
107 static_libs: [
Tri Vofc871402017-07-10 17:13:23 -0700108 "android.hardware.automotive.vehicle@2.0-libproto-native",
109 ],
110}
111
felipeal9c998c02020-04-17 14:32:53 -0700112// Library used to emulate User HAL behavior through lshal debug requests.
113cc_library_static {
114 name: "android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib",
115 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700116 defaults: ["vhal_v2_0_target_defaults"],
felipeal9c998c02020-04-17 14:32:53 -0700117 srcs: [
118 "impl/vhal_v2_0/EmulatedUserHal.cpp",
119 ],
Lakshman Annadorai8eb03222020-08-06 14:25:03 -0700120 whole_static_libs: [
121 "android.hardware.automotive.vehicle@2.0-user-hal-helper-lib",
122 ],
felipeal9c998c02020-04-17 14:32:53 -0700123}
124
Hao Chenc324db92020-06-03 18:29:31 -0700125// Vehicle HAL Server reference impl lib
126cc_library_static {
127 name: "android.hardware.automotive.vehicle@2.0-server-common-lib",
128 vendor: true,
129 host_supported: true,
130 defaults: ["vhal_v2_0_defaults"],
131 local_include_dirs: ["common/include/vhal_v2_0"],
132 export_include_dirs: ["common/include"],
133 srcs: [
134 "common/src/Obd2SensorStore.cpp",
135 "common/src/VehicleObjectPool.cpp",
136 "common/src/VehicleUtils.cpp",
137 ],
138}
139
140// Vehicle HAL Server default implementation
141cc_library_static {
142 name: "android.hardware.automotive.vehicle@2.0-server-impl-lib",
143 vendor: true,
144 host_supported: true,
145 defaults: ["vhal_v2_0_defaults"],
146 local_include_dirs: ["common/include/vhal_v2_0"],
147 export_include_dirs: ["impl"],
148 srcs: [
Hao Chenc324db92020-06-03 18:29:31 -0700149 "impl/vhal_v2_0/GeneratorHub.cpp",
150 "impl/vhal_v2_0/JsonFakeValueGenerator.cpp",
151 "impl/vhal_v2_0/LinearFakeValueGenerator.cpp",
152 "impl/vhal_v2_0/ProtoMessageConverter.cpp",
153 "impl/vhal_v2_0/VehicleHalServer.cpp",
154 ],
155 whole_static_libs: [
156 "android.hardware.automotive.vehicle@2.0-server-common-lib",
Lakshman Annadorai8eb03222020-08-06 14:25:03 -0700157 "android.hardware.automotive.vehicle@2.0-user-hal-helper-lib",
Hao Chenc324db92020-06-03 18:29:31 -0700158 ],
159 static_libs: [
160 "android.hardware.automotive.vehicle@2.0-libproto-native",
161 ],
162 shared_libs: [
163 "libbase",
164 "libjsoncpp",
165 ],
166}
167
Tri Vofc871402017-07-10 17:13:23 -0700168cc_test {
169 name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
Tri Vo22b2d682017-07-11 12:53:12 -0700170 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700171 defaults: ["vhal_v2_0_target_defaults"],
Tri Vofc871402017-07-10 17:13:23 -0700172 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
173 srcs: [
174 "tests/RecurrentTimer_test.cpp",
175 "tests/SubscriptionManager_test.cpp",
176 "tests/VehicleHalManager_test.cpp",
177 "tests/VehicleObjectPool_test.cpp",
178 "tests/VehiclePropConfigIndex_test.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -0800179 "tests/VmsUtils_test.cpp",
Tri Vofc871402017-07-10 17:13:23 -0700180 ],
Felipe Leme75a27f82020-01-31 15:25:55 -0800181 shared_libs: [
182 "libbase",
183 ],
Tri Vofc871402017-07-10 17:13:23 -0700184 header_libs: ["libbase_headers"],
Keun Soo YIMff84c372018-11-27 14:04:42 -0800185 test_suites: ["general-tests"],
Tri Vofc871402017-07-10 17:13:23 -0700186}
187
Hao Chen1c1fdca2019-11-15 14:20:34 -0800188cc_test {
189 name: "android.hardware.automotive.vehicle@2.0-default-impl-unit-tests",
190 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700191 defaults: ["vhal_v2_0_target_defaults"],
Hao Chen1c1fdca2019-11-15 14:20:34 -0800192 srcs: [
193 "impl/vhal_v2_0/tests/ProtoMessageConverter_test.cpp",
194 ],
195 static_libs: [
196 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
197 "android.hardware.automotive.vehicle@2.0-libproto-native",
198 "libprotobuf-cpp-lite",
199 ],
200 test_suites: ["general-tests"],
201}
202
Tri Vofc871402017-07-10 17:13:23 -0700203cc_binary {
204 name: "android.hardware.automotive.vehicle@2.0-service",
Hao Chenc324db92020-06-03 18:29:31 -0700205 defaults: ["vhal_v2_0_target_defaults"],
Calvin Huanga6536162020-04-20 12:41:20 -0700206 vintf_fragments: [
207 "android.hardware.automotive.vehicle@2.0-service.xml",
208 ],
Tri Vofc871402017-07-10 17:13:23 -0700209 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
Tri Vo22b2d682017-07-11 12:53:12 -0700210 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700211 relative_install_path: "hw",
212 srcs: ["VehicleService.cpp"],
213 shared_libs: [
214 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +0900215 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -0700216 "libprotobuf-cpp-lite",
217 ],
218 static_libs: [
219 "android.hardware.automotive.vehicle@2.0-manager-lib",
220 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
221 "android.hardware.automotive.vehicle@2.0-libproto-native",
Tri Vofc871402017-07-10 17:13:23 -0700222 ],
223}
Ayushi Khopkarb3057b02020-08-31 10:59:52 +0530224
225cc_fuzz {
226 name: "vehicleManager_fuzzer",
227 vendor: true,
228 defaults: ["vhal_v2_0_target_defaults"],
229 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
230 srcs: [
231 "tests/fuzzer/VehicleManager_fuzzer.cpp",
232 ],
233 shared_libs: [
234 "libbase",
235 "libcutils",
236 "libbinder_ndk",
237 ],
238 header_libs: ["libbase_headers"],
239 local_include_dirs: [
240 "common/include",
241 "tests",
242 ],
243 fuzz_config: {
244 cc: [
245 "android-media-fuzzing-reports@google.com",
246 ],
247 componentid: 533764,
248 },
249}