blob: d9ac239f6274224402a938632773b4a9ae987feb [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 ],
111}
112
Hao Chenc324db92020-06-03 18:29:31 -0700113// Vehicle HAL Server reference impl lib
114cc_library_static {
115 name: "android.hardware.automotive.vehicle@2.0-server-common-lib",
116 vendor: true,
117 host_supported: true,
118 defaults: ["vhal_v2_0_defaults"],
119 local_include_dirs: ["common/include/vhal_v2_0"],
120 export_include_dirs: ["common/include"],
121 srcs: [
122 "common/src/Obd2SensorStore.cpp",
123 "common/src/VehicleObjectPool.cpp",
124 "common/src/VehicleUtils.cpp",
125 ],
126}
127
128// Vehicle HAL Server default implementation
129cc_library_static {
130 name: "android.hardware.automotive.vehicle@2.0-server-impl-lib",
131 vendor: true,
132 host_supported: true,
133 defaults: ["vhal_v2_0_defaults"],
134 local_include_dirs: ["common/include/vhal_v2_0"],
135 export_include_dirs: ["impl"],
136 srcs: [
137 "impl/vhal_v2_0/EmulatedUserHal.cpp",
138 "impl/vhal_v2_0/GeneratorHub.cpp",
139 "impl/vhal_v2_0/JsonFakeValueGenerator.cpp",
140 "impl/vhal_v2_0/LinearFakeValueGenerator.cpp",
141 "impl/vhal_v2_0/ProtoMessageConverter.cpp",
142 "impl/vhal_v2_0/VehicleHalServer.cpp",
143 ],
144 whole_static_libs: [
145 "android.hardware.automotive.vehicle@2.0-server-common-lib",
146 ],
147 static_libs: [
148 "android.hardware.automotive.vehicle@2.0-libproto-native",
149 ],
150 shared_libs: [
151 "libbase",
152 "libjsoncpp",
153 ],
154}
155
Tri Vofc871402017-07-10 17:13:23 -0700156cc_test {
157 name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
Tri Vo22b2d682017-07-11 12:53:12 -0700158 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700159 defaults: ["vhal_v2_0_target_defaults"],
Tri Vofc871402017-07-10 17:13:23 -0700160 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
161 srcs: [
162 "tests/RecurrentTimer_test.cpp",
163 "tests/SubscriptionManager_test.cpp",
164 "tests/VehicleHalManager_test.cpp",
165 "tests/VehicleObjectPool_test.cpp",
166 "tests/VehiclePropConfigIndex_test.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -0800167 "tests/VmsUtils_test.cpp",
Tri Vofc871402017-07-10 17:13:23 -0700168 ],
Felipe Leme75a27f82020-01-31 15:25:55 -0800169 shared_libs: [
170 "libbase",
171 ],
Tri Vofc871402017-07-10 17:13:23 -0700172 header_libs: ["libbase_headers"],
Keun Soo YIMff84c372018-11-27 14:04:42 -0800173 test_suites: ["general-tests"],
Tri Vofc871402017-07-10 17:13:23 -0700174}
175
Hao Chen1c1fdca2019-11-15 14:20:34 -0800176cc_test {
177 name: "android.hardware.automotive.vehicle@2.0-default-impl-unit-tests",
178 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -0700179 defaults: ["vhal_v2_0_target_defaults"],
Hao Chen1c1fdca2019-11-15 14:20:34 -0800180 srcs: [
181 "impl/vhal_v2_0/tests/ProtoMessageConverter_test.cpp",
182 ],
183 static_libs: [
184 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
185 "android.hardware.automotive.vehicle@2.0-libproto-native",
186 "libprotobuf-cpp-lite",
187 ],
188 test_suites: ["general-tests"],
189}
190
Tri Vofc871402017-07-10 17:13:23 -0700191cc_binary {
192 name: "android.hardware.automotive.vehicle@2.0-service",
Hao Chenc324db92020-06-03 18:29:31 -0700193 defaults: ["vhal_v2_0_target_defaults"],
Calvin Huanga6536162020-04-20 12:41:20 -0700194 vintf_fragments: [
195 "android.hardware.automotive.vehicle@2.0-service.xml",
196 ],
Tri Vofc871402017-07-10 17:13:23 -0700197 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
Tri Vo22b2d682017-07-11 12:53:12 -0700198 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700199 relative_install_path: "hw",
200 srcs: ["VehicleService.cpp"],
201 shared_libs: [
202 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +0900203 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -0700204 "libprotobuf-cpp-lite",
205 ],
206 static_libs: [
207 "android.hardware.automotive.vehicle@2.0-manager-lib",
208 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
209 "android.hardware.automotive.vehicle@2.0-libproto-native",
Tri Vofc871402017-07-10 17:13:23 -0700210 "libqemu_pipe",
211 ],
212}