blob: 9a0d89d209b96a05cb614420ccb3f8405b3e5cd6 [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
15cc_defaults {
16 name: "vhal_v2_0_defaults",
17 shared_libs: [
18 "libhidlbase",
Tri Vofc871402017-07-10 17:13:23 -070019 "liblog",
20 "libutils",
21 "android.hardware.automotive.vehicle@2.0",
22 ],
23 cflags: [
24 "-Wall",
25 "-Wextra",
26 "-Werror",
27 ],
28}
29
Hao Chenc324db92020-06-03 18:29:31 -070030cc_defaults {
31 name: "vhal_v2_0_target_defaults",
32 defaults: ["vhal_v2_0_defaults"],
33 shared_libs: [
34 "libbinder_ndk",
35 "carwatchdog_aidl_interface-ndk_platform",
36 ],
37}
38
Tri Vofc871402017-07-10 17:13:23 -070039cc_library_headers {
40 name: "vhal_v2_0_common_headers",
Tri Vo22b2d682017-07-11 12:53:12 -070041 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070042 export_include_dirs: ["common/include/vhal_v2_0"],
43}
44
45// Vehicle reference implementation lib
Anthony Maha9d8c0d2017-10-03 16:22:22 -070046cc_library {
Tri Vofc871402017-07-10 17:13:23 -070047 name: "android.hardware.automotive.vehicle@2.0-manager-lib",
Tri Vo22b2d682017-07-11 12:53:12 -070048 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -070049 defaults: ["vhal_v2_0_target_defaults"],
Tri Vofc871402017-07-10 17:13:23 -070050 srcs: [
Pavel Maltsev250139c2017-08-24 15:09:41 -070051 "common/src/Obd2SensorStore.cpp",
Tri Vofc871402017-07-10 17:13:23 -070052 "common/src/SubscriptionManager.cpp",
53 "common/src/VehicleHalManager.cpp",
54 "common/src/VehicleObjectPool.cpp",
55 "common/src/VehiclePropertyStore.cpp",
56 "common/src/VehicleUtils.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -080057 "common/src/VmsUtils.cpp",
Eric Jeong908101a2020-04-23 09:43:55 -070058 "common/src/WatchdogClient.cpp",
Tri Vofc871402017-07-10 17:13:23 -070059 ],
Felipe Leme75a27f82020-01-31 15:25:55 -080060 shared_libs: [
61 "libbase",
62 ],
Tri Vofc871402017-07-10 17:13:23 -070063 local_include_dirs: ["common/include/vhal_v2_0"],
64 export_include_dirs: ["common/include"],
65}
66
Tri Vofc871402017-07-10 17:13:23 -070067// Vehicle default VehicleHAL implementation
68cc_library_static {
69 name: "android.hardware.automotive.vehicle@2.0-default-impl-lib",
Tri Vo22b2d682017-07-11 12:53:12 -070070 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -070071 defaults: ["vhal_v2_0_target_defaults"],
Tri Vofc871402017-07-10 17:13:23 -070072 srcs: [
Dean Hardingbea881c2018-06-15 13:33:47 -070073 "impl/vhal_v2_0/CommConn.cpp",
Hao Chenfba3ac82019-11-07 11:55:25 -080074 "impl/vhal_v2_0/EmulatedVehicleConnector.cpp",
Tri Vofc871402017-07-10 17:13:23 -070075 "impl/vhal_v2_0/EmulatedVehicleHal.cpp",
Hao Chena6d6fa32020-02-14 11:51:26 -080076 "impl/vhal_v2_0/VehicleHalClient.cpp",
77 "impl/vhal_v2_0/VehicleHalServer.cpp",
Tri Vofc871402017-07-10 17:13:23 -070078 "impl/vhal_v2_0/VehicleEmulator.cpp",
79 "impl/vhal_v2_0/PipeComm.cpp",
Hao Chen1c1fdca2019-11-15 14:20:34 -080080 "impl/vhal_v2_0/ProtoMessageConverter.cpp",
Tri Vofc871402017-07-10 17:13:23 -070081 "impl/vhal_v2_0/SocketComm.cpp",
Chao Yanf63c2ca2018-04-17 11:32:39 -070082 "impl/vhal_v2_0/LinearFakeValueGenerator.cpp",
83 "impl/vhal_v2_0/JsonFakeValueGenerator.cpp",
Chao Yan0f85dd12018-06-04 14:03:02 -070084 "impl/vhal_v2_0/GeneratorHub.cpp",
Tri Vofc871402017-07-10 17:13:23 -070085 ],
86 local_include_dirs: ["common/include/vhal_v2_0"],
87 export_include_dirs: ["impl"],
felipeal9c998c02020-04-17 14:32:53 -070088 whole_static_libs: [
89 "android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib",
90 "android.hardware.automotive.vehicle@2.0-manager-lib",
91 ],
Tri Vofc871402017-07-10 17:13:23 -070092 shared_libs: [
93 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +090094 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -070095 "libprotobuf-cpp-lite",
96 ],
97 static_libs: [
98 "libqemu_pipe",
99 "android.hardware.automotive.vehicle@2.0-libproto-native",
100 ],
101}
102
felipeal9c998c02020-04-17 14:32:53 -0700103// Library used to emulate User HAL behavior through lshal debug requests.
104cc_library_static {
105 name: "android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib",
106 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700107 defaults: ["vhal_v2_0_target_defaults"],
felipeal9c998c02020-04-17 14:32:53 -0700108 srcs: [
109 "impl/vhal_v2_0/EmulatedUserHal.cpp",
110 ],
Lakshman Annadoraibfdb1ac2020-08-06 14:25:03 -0700111 whole_static_libs: [
112 "android.hardware.automotive.vehicle@2.0-user-hal-helper-lib",
113 ],
felipeal9c998c02020-04-17 14:32:53 -0700114}
115
Hao Chenc324db92020-06-03 18:29:31 -0700116// Vehicle HAL Server reference impl lib
117cc_library_static {
118 name: "android.hardware.automotive.vehicle@2.0-server-common-lib",
119 vendor: true,
120 host_supported: true,
121 defaults: ["vhal_v2_0_defaults"],
122 local_include_dirs: ["common/include/vhal_v2_0"],
123 export_include_dirs: ["common/include"],
124 srcs: [
125 "common/src/Obd2SensorStore.cpp",
126 "common/src/VehicleObjectPool.cpp",
127 "common/src/VehicleUtils.cpp",
128 ],
129}
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: [
140 "impl/vhal_v2_0/EmulatedUserHal.cpp",
141 "impl/vhal_v2_0/GeneratorHub.cpp",
142 "impl/vhal_v2_0/JsonFakeValueGenerator.cpp",
143 "impl/vhal_v2_0/LinearFakeValueGenerator.cpp",
144 "impl/vhal_v2_0/ProtoMessageConverter.cpp",
145 "impl/vhal_v2_0/VehicleHalServer.cpp",
146 ],
147 whole_static_libs: [
148 "android.hardware.automotive.vehicle@2.0-server-common-lib",
Lakshman Annadoraibfdb1ac2020-08-06 14:25:03 -0700149 "android.hardware.automotive.vehicle@2.0-user-hal-helper-lib",
Hao Chenc324db92020-06-03 18:29:31 -0700150 ],
151 static_libs: [
152 "android.hardware.automotive.vehicle@2.0-libproto-native",
153 ],
154 shared_libs: [
155 "libbase",
156 "libjsoncpp",
157 ],
158}
159
Tri Vofc871402017-07-10 17:13:23 -0700160cc_test {
161 name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
Tri Vo22b2d682017-07-11 12:53:12 -0700162 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700163 defaults: ["vhal_v2_0_target_defaults"],
Tri Vofc871402017-07-10 17:13:23 -0700164 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
165 srcs: [
166 "tests/RecurrentTimer_test.cpp",
167 "tests/SubscriptionManager_test.cpp",
168 "tests/VehicleHalManager_test.cpp",
169 "tests/VehicleObjectPool_test.cpp",
170 "tests/VehiclePropConfigIndex_test.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -0800171 "tests/VmsUtils_test.cpp",
Tri Vofc871402017-07-10 17:13:23 -0700172 ],
Felipe Leme75a27f82020-01-31 15:25:55 -0800173 shared_libs: [
174 "libbase",
175 ],
Tri Vofc871402017-07-10 17:13:23 -0700176 header_libs: ["libbase_headers"],
Keun Soo YIMff84c372018-11-27 14:04:42 -0800177 test_suites: ["general-tests"],
Tri Vofc871402017-07-10 17:13:23 -0700178}
179
Hao Chen1c1fdca2019-11-15 14:20:34 -0800180cc_test {
181 name: "android.hardware.automotive.vehicle@2.0-default-impl-unit-tests",
182 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700183 defaults: ["vhal_v2_0_target_defaults"],
Hao Chen1c1fdca2019-11-15 14:20:34 -0800184 srcs: [
185 "impl/vhal_v2_0/tests/ProtoMessageConverter_test.cpp",
186 ],
187 static_libs: [
188 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
189 "android.hardware.automotive.vehicle@2.0-libproto-native",
190 "libprotobuf-cpp-lite",
191 ],
192 test_suites: ["general-tests"],
193}
194
Tri Vofc871402017-07-10 17:13:23 -0700195cc_binary {
196 name: "android.hardware.automotive.vehicle@2.0-service",
Hao Chenc324db92020-06-03 18:29:31 -0700197 defaults: ["vhal_v2_0_target_defaults"],
Calvin Huanga6536162020-04-20 12:41:20 -0700198 vintf_fragments: [
199 "android.hardware.automotive.vehicle@2.0-service.xml",
200 ],
Tri Vofc871402017-07-10 17:13:23 -0700201 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
Tri Vo22b2d682017-07-11 12:53:12 -0700202 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700203 relative_install_path: "hw",
204 srcs: ["VehicleService.cpp"],
205 shared_libs: [
206 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +0900207 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -0700208 "libprotobuf-cpp-lite",
209 ],
210 static_libs: [
211 "android.hardware.automotive.vehicle@2.0-manager-lib",
212 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
213 "android.hardware.automotive.vehicle@2.0-libproto-native",
Tri Vofc871402017-07-10 17:13:23 -0700214 "libqemu_pipe",
215 ],
216}