blob: c66c9cca1119e7ba0bb1d1c2af7b93af4da1fd91 [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",
Jeongik Cha38533912021-01-28 00:49:49 +090035 "android.automotive.watchdog-V2-ndk_platform",
Hao Chenc324db92020-06-03 18:29:31 -070036 ],
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",
Roman Kiryanovecb6fb62020-12-07 14:15:42 -080091 "libqemu_pipe",
felipeal9c998c02020-04-17 14:32:53 -070092 ],
Tri Vofc871402017-07-10 17:13:23 -070093 shared_libs: [
94 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +090095 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -070096 "libprotobuf-cpp-lite",
97 ],
98 static_libs: [
Tri Vofc871402017-07-10 17:13:23 -070099 "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: [
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",
143 "impl/vhal_v2_0/ProtoMessageConverter.cpp",
144 "impl/vhal_v2_0/VehicleHalServer.cpp",
145 ],
146 whole_static_libs: [
147 "android.hardware.automotive.vehicle@2.0-server-common-lib",
Lakshman Annadoraibfdb1ac2020-08-06 14:25:03 -0700148 "android.hardware.automotive.vehicle@2.0-user-hal-helper-lib",
Hao Chenc324db92020-06-03 18:29:31 -0700149 ],
150 static_libs: [
151 "android.hardware.automotive.vehicle@2.0-libproto-native",
152 ],
153 shared_libs: [
154 "libbase",
155 "libjsoncpp",
156 ],
157}
158
Tri Vofc871402017-07-10 17:13:23 -0700159cc_test {
160 name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
Tri Vo22b2d682017-07-11 12:53:12 -0700161 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700162 defaults: ["vhal_v2_0_target_defaults"],
Tri Vofc871402017-07-10 17:13:23 -0700163 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
164 srcs: [
165 "tests/RecurrentTimer_test.cpp",
166 "tests/SubscriptionManager_test.cpp",
167 "tests/VehicleHalManager_test.cpp",
168 "tests/VehicleObjectPool_test.cpp",
169 "tests/VehiclePropConfigIndex_test.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -0800170 "tests/VmsUtils_test.cpp",
Tri Vofc871402017-07-10 17:13:23 -0700171 ],
Felipe Leme75a27f82020-01-31 15:25:55 -0800172 shared_libs: [
173 "libbase",
174 ],
Tri Vofc871402017-07-10 17:13:23 -0700175 header_libs: ["libbase_headers"],
Keun Soo YIMff84c372018-11-27 14:04:42 -0800176 test_suites: ["general-tests"],
Tri Vofc871402017-07-10 17:13:23 -0700177}
178
Hao Chen1c1fdca2019-11-15 14:20:34 -0800179cc_test {
180 name: "android.hardware.automotive.vehicle@2.0-default-impl-unit-tests",
181 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700182 defaults: ["vhal_v2_0_target_defaults"],
Hao Chen1c1fdca2019-11-15 14:20:34 -0800183 srcs: [
184 "impl/vhal_v2_0/tests/ProtoMessageConverter_test.cpp",
185 ],
186 static_libs: [
187 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
188 "android.hardware.automotive.vehicle@2.0-libproto-native",
189 "libprotobuf-cpp-lite",
190 ],
191 test_suites: ["general-tests"],
192}
193
Tri Vofc871402017-07-10 17:13:23 -0700194cc_binary {
195 name: "android.hardware.automotive.vehicle@2.0-service",
Hao Chenc324db92020-06-03 18:29:31 -0700196 defaults: ["vhal_v2_0_target_defaults"],
Calvin Huanga6536162020-04-20 12:41:20 -0700197 vintf_fragments: [
198 "android.hardware.automotive.vehicle@2.0-service.xml",
199 ],
Tri Vofc871402017-07-10 17:13:23 -0700200 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
Tri Vo22b2d682017-07-11 12:53:12 -0700201 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700202 relative_install_path: "hw",
203 srcs: ["VehicleService.cpp"],
204 shared_libs: [
205 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +0900206 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -0700207 "libprotobuf-cpp-lite",
208 ],
209 static_libs: [
210 "android.hardware.automotive.vehicle@2.0-manager-lib",
211 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
212 "android.hardware.automotive.vehicle@2.0-libproto-native",
Tri Vofc871402017-07-10 17:13:23 -0700213 ],
214}