blob: 4c51c62c24dd72435fdfc0890e18398d9e7c36ca [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",
Yu Shan6029a372021-06-22 19:11:05 -070050 visibility: ["//visibility:public"],
Tri Vo22b2d682017-07-11 12:53:12 -070051 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070052 export_include_dirs: ["common/include/vhal_v2_0"],
53}
54
55// Vehicle reference implementation lib
Anthony Maha9d8c0d2017-10-03 16:22:22 -070056cc_library {
Tri Vofc871402017-07-10 17:13:23 -070057 name: "android.hardware.automotive.vehicle@2.0-manager-lib",
Tri Vo22b2d682017-07-11 12:53:12 -070058 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -070059 defaults: ["vhal_v2_0_target_defaults"],
Tri Vofc871402017-07-10 17:13:23 -070060 srcs: [
Pavel Maltsev250139c2017-08-24 15:09:41 -070061 "common/src/Obd2SensorStore.cpp",
Yu Shan6029a372021-06-22 19:11:05 -070062 "common/src/ProtoMessageConverter.cpp",
Tri Vofc871402017-07-10 17:13:23 -070063 "common/src/SubscriptionManager.cpp",
64 "common/src/VehicleHalManager.cpp",
65 "common/src/VehicleObjectPool.cpp",
66 "common/src/VehiclePropertyStore.cpp",
67 "common/src/VehicleUtils.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -080068 "common/src/VmsUtils.cpp",
Eric Jeong908101a2020-04-23 09:43:55 -070069 "common/src/WatchdogClient.cpp",
Tri Vofc871402017-07-10 17:13:23 -070070 ],
Felipe Leme75a27f82020-01-31 15:25:55 -080071 shared_libs: [
72 "libbase",
Yu Shan6029a372021-06-22 19:11:05 -070073 "libprotobuf-cpp-lite",
Felipe Leme75a27f82020-01-31 15:25:55 -080074 ],
Tri Vofc871402017-07-10 17:13:23 -070075 local_include_dirs: ["common/include/vhal_v2_0"],
76 export_include_dirs: ["common/include"],
Yu Shan6029a372021-06-22 19:11:05 -070077 static_libs: [
78 "android.hardware.automotive.vehicle@2.0-libproto-native",
79 ],
Tri Vofc871402017-07-10 17:13:23 -070080}
81
Tri Vofc871402017-07-10 17:13:23 -070082// Vehicle default VehicleHAL implementation
83cc_library_static {
84 name: "android.hardware.automotive.vehicle@2.0-default-impl-lib",
Tri Vo22b2d682017-07-11 12:53:12 -070085 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -070086 defaults: ["vhal_v2_0_target_defaults"],
Yuncheol Heo38ec2402021-04-15 15:25:39 -070087 cflags: ["-DENABLE_VENDOR_CLUSTER_PROPERTY_FOR_TESTING"],
Tri Vofc871402017-07-10 17:13:23 -070088 srcs: [
Yu Shan6029a372021-06-22 19:11:05 -070089 "impl/vhal_v2_0/DefaultVehicleHal.cpp",
Hao Chena6d6fa32020-02-14 11:51:26 -080090 "impl/vhal_v2_0/VehicleHalClient.cpp",
Yu Shan6029a372021-06-22 19:11:05 -070091 "impl/vhal_v2_0/DefaultVehicleHalServer.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",
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: [
felipeal9c998c02020-04-17 14:32:53 -070099 "android.hardware.automotive.vehicle@2.0-manager-lib",
100 ],
Tri Vofc871402017-07-10 17:13:23 -0700101 shared_libs: [
102 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +0900103 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -0700104 "libprotobuf-cpp-lite",
105 ],
106 static_libs: [
Tri Vofc871402017-07-10 17:13:23 -0700107 "android.hardware.automotive.vehicle@2.0-libproto-native",
108 ],
109}
110
Hao Chenc324db92020-06-03 18:29:31 -0700111// Vehicle HAL Server reference impl lib
112cc_library_static {
113 name: "android.hardware.automotive.vehicle@2.0-server-common-lib",
114 vendor: true,
115 host_supported: true,
116 defaults: ["vhal_v2_0_defaults"],
117 local_include_dirs: ["common/include/vhal_v2_0"],
118 export_include_dirs: ["common/include"],
119 srcs: [
120 "common/src/Obd2SensorStore.cpp",
Yu Shan6029a372021-06-22 19:11:05 -0700121 "common/src/ProtoMessageConverter.cpp",
Hao Chenc324db92020-06-03 18:29:31 -0700122 "common/src/VehicleObjectPool.cpp",
Hao Chen0b7c2872021-05-12 12:21:33 -0700123 "common/src/VehiclePropertyStore.cpp",
Hao Chenc324db92020-06-03 18:29:31 -0700124 "common/src/VehicleUtils.cpp",
125 ],
Yu Shan6029a372021-06-22 19:11:05 -0700126 static_libs: [
127 "android.hardware.automotive.vehicle@2.0-libproto-native",
128 ],
Hao Chenc324db92020-06-03 18:29:31 -0700129}
130
131// Vehicle HAL Server default implementation
132cc_library_static {
133 name: "android.hardware.automotive.vehicle@2.0-server-impl-lib",
134 vendor: true,
135 host_supported: true,
136 defaults: ["vhal_v2_0_defaults"],
137 local_include_dirs: ["common/include/vhal_v2_0"],
138 export_include_dirs: ["impl"],
139 srcs: [
Hao Chenc324db92020-06-03 18:29:31 -0700140 "impl/vhal_v2_0/GeneratorHub.cpp",
141 "impl/vhal_v2_0/JsonFakeValueGenerator.cpp",
142 "impl/vhal_v2_0/LinearFakeValueGenerator.cpp",
Yu Shan6029a372021-06-22 19:11:05 -0700143 "impl/vhal_v2_0/DefaultVehicleHalServer.cpp",
Hao Chenc324db92020-06-03 18:29:31 -0700144 ],
145 whole_static_libs: [
146 "android.hardware.automotive.vehicle@2.0-server-common-lib",
Lakshman Annadoraibfdb1ac2020-08-06 14:25:03 -0700147 "android.hardware.automotive.vehicle@2.0-user-hal-helper-lib",
Hao Chenc324db92020-06-03 18:29:31 -0700148 ],
149 static_libs: [
150 "android.hardware.automotive.vehicle@2.0-libproto-native",
151 ],
152 shared_libs: [
153 "libbase",
154 "libjsoncpp",
155 ],
156}
157
Tri Vofc871402017-07-10 17:13:23 -0700158cc_test {
159 name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
Tri Vo22b2d682017-07-11 12:53:12 -0700160 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700161 defaults: ["vhal_v2_0_target_defaults"],
Tri Vofc871402017-07-10 17:13:23 -0700162 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
163 srcs: [
164 "tests/RecurrentTimer_test.cpp",
165 "tests/SubscriptionManager_test.cpp",
166 "tests/VehicleHalManager_test.cpp",
167 "tests/VehicleObjectPool_test.cpp",
168 "tests/VehiclePropConfigIndex_test.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -0800169 "tests/VmsUtils_test.cpp",
Tri Vofc871402017-07-10 17:13:23 -0700170 ],
Felipe Leme75a27f82020-01-31 15:25:55 -0800171 shared_libs: [
172 "libbase",
Yu Shan8ae3ea92021-06-01 15:44:43 -0700173 "libcutils",
Felipe Leme75a27f82020-01-31 15:25:55 -0800174 ],
Yu Shan045138d2021-06-02 16:15:29 -0700175 exclude_shared_libs: [
176 "android.automotive.watchdog-V2-ndk_platform",
177 "android.hardware.automotive.vehicle@2.0",
178 ],
179 static_libs: [
180 "android.automotive.watchdog-V2-ndk_platform",
181 "android.hardware.automotive.vehicle@2.0",
182 ],
Tri Vofc871402017-07-10 17:13:23 -0700183 header_libs: ["libbase_headers"],
Keun Soo YIMff84c372018-11-27 14:04:42 -0800184 test_suites: ["general-tests"],
Tri Vofc871402017-07-10 17:13:23 -0700185}
186
Hao Chen1c1fdca2019-11-15 14:20:34 -0800187cc_test {
188 name: "android.hardware.automotive.vehicle@2.0-default-impl-unit-tests",
189 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700190 defaults: ["vhal_v2_0_target_defaults"],
Hao Chen1c1fdca2019-11-15 14:20:34 -0800191 srcs: [
192 "impl/vhal_v2_0/tests/ProtoMessageConverter_test.cpp",
193 ],
194 static_libs: [
Yu Shan045138d2021-06-02 16:15:29 -0700195 "android.automotive.watchdog-V2-ndk_platform",
196 "android.hardware.automotive.vehicle@2.0",
Hao Chen1c1fdca2019-11-15 14:20:34 -0800197 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
198 "android.hardware.automotive.vehicle@2.0-libproto-native",
199 "libprotobuf-cpp-lite",
200 ],
Yu Shan045138d2021-06-02 16:15:29 -0700201 exclude_shared_libs: [
202 "android.automotive.watchdog-V2-ndk_platform",
203 "android.hardware.automotive.vehicle@2.0",
204 ],
Hao Chen1c1fdca2019-11-15 14:20:34 -0800205 test_suites: ["general-tests"],
206}
207
Tri Vofc871402017-07-10 17:13:23 -0700208cc_binary {
209 name: "android.hardware.automotive.vehicle@2.0-service",
Hao Chenc324db92020-06-03 18:29:31 -0700210 defaults: ["vhal_v2_0_target_defaults"],
Calvin Huanga6536162020-04-20 12:41:20 -0700211 vintf_fragments: [
212 "android.hardware.automotive.vehicle@2.0-service.xml",
213 ],
Tri Vofc871402017-07-10 17:13:23 -0700214 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
Tri Vo22b2d682017-07-11 12:53:12 -0700215 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700216 relative_install_path: "hw",
217 srcs: ["VehicleService.cpp"],
218 shared_libs: [
219 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +0900220 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -0700221 "libprotobuf-cpp-lite",
222 ],
223 static_libs: [
224 "android.hardware.automotive.vehicle@2.0-manager-lib",
Tri Vofc871402017-07-10 17:13:23 -0700225 "android.hardware.automotive.vehicle@2.0-libproto-native",
Yu Shan6029a372021-06-22 19:11:05 -0700226 "//device/generic/car/emulator/vhal_v2_0:android.hardware.automotive.vehicle@2.0-emulator-impl-lib",
Tri Vofc871402017-07-10 17:13:23 -0700227 ],
228}
Ayushi Khopkarb3057b02020-08-31 10:59:52 +0530229
230cc_fuzz {
231 name: "vehicleManager_fuzzer",
232 vendor: true,
233 defaults: ["vhal_v2_0_target_defaults"],
234 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
235 srcs: [
236 "tests/fuzzer/VehicleManager_fuzzer.cpp",
237 ],
238 shared_libs: [
239 "libbase",
240 "libcutils",
241 "libbinder_ndk",
242 ],
243 header_libs: ["libbase_headers"],
244 local_include_dirs: [
245 "common/include",
246 "tests",
247 ],
248 fuzz_config: {
249 cc: [
250 "android-media-fuzzing-reports@google.com",
251 ],
252 componentid: 533764,
253 },
254}