blob: a94a37e0f16674afe24d231f8617a15d22008db4 [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
30cc_library_headers {
31 name: "vhal_v2_0_common_headers",
Tri Vo22b2d682017-07-11 12:53:12 -070032 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070033 export_include_dirs: ["common/include/vhal_v2_0"],
34}
35
36// Vehicle reference implementation lib
Anthony Maha9d8c0d2017-10-03 16:22:22 -070037cc_library {
Tri Vofc871402017-07-10 17:13:23 -070038 name: "android.hardware.automotive.vehicle@2.0-manager-lib",
Tri Vo22b2d682017-07-11 12:53:12 -070039 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070040 defaults: ["vhal_v2_0_defaults"],
41 srcs: [
Pavel Maltsev250139c2017-08-24 15:09:41 -070042 "common/src/Obd2SensorStore.cpp",
Tri Vofc871402017-07-10 17:13:23 -070043 "common/src/SubscriptionManager.cpp",
44 "common/src/VehicleHalManager.cpp",
45 "common/src/VehicleObjectPool.cpp",
46 "common/src/VehiclePropertyStore.cpp",
47 "common/src/VehicleUtils.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -080048 "common/src/VmsUtils.cpp",
Tri Vofc871402017-07-10 17:13:23 -070049 ],
50 local_include_dirs: ["common/include/vhal_v2_0"],
51 export_include_dirs: ["common/include"],
52}
53
Tri Vofc871402017-07-10 17:13:23 -070054// Vehicle default VehicleHAL implementation
55cc_library_static {
56 name: "android.hardware.automotive.vehicle@2.0-default-impl-lib",
Tri Vo22b2d682017-07-11 12:53:12 -070057 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070058 defaults: ["vhal_v2_0_defaults"],
59 srcs: [
Dean Hardingbea881c2018-06-15 13:33:47 -070060 "impl/vhal_v2_0/CommConn.cpp",
Hao Chenfba3ac82019-11-07 11:55:25 -080061 "impl/vhal_v2_0/EmulatedVehicleConnector.cpp",
Tri Vofc871402017-07-10 17:13:23 -070062 "impl/vhal_v2_0/EmulatedVehicleHal.cpp",
63 "impl/vhal_v2_0/VehicleEmulator.cpp",
64 "impl/vhal_v2_0/PipeComm.cpp",
Hao Chen1c1fdca2019-11-15 14:20:34 -080065 "impl/vhal_v2_0/ProtoMessageConverter.cpp",
Tri Vofc871402017-07-10 17:13:23 -070066 "impl/vhal_v2_0/SocketComm.cpp",
Chao Yanf63c2ca2018-04-17 11:32:39 -070067 "impl/vhal_v2_0/LinearFakeValueGenerator.cpp",
68 "impl/vhal_v2_0/JsonFakeValueGenerator.cpp",
Chao Yan0f85dd12018-06-04 14:03:02 -070069 "impl/vhal_v2_0/GeneratorHub.cpp",
Tri Vofc871402017-07-10 17:13:23 -070070 ],
71 local_include_dirs: ["common/include/vhal_v2_0"],
72 export_include_dirs: ["impl"],
73 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
74 shared_libs: [
75 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +090076 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -070077 "libprotobuf-cpp-lite",
78 ],
79 static_libs: [
80 "libqemu_pipe",
81 "android.hardware.automotive.vehicle@2.0-libproto-native",
82 ],
83}
84
Hao Chen5a97c382019-12-05 15:53:05 -080085// VHal virtualization utils
86cc_library_static {
87 name: "android.hardware.automotive.vehicle@2.0-virtualization-utils",
88 vendor: true,
89 defaults: ["vhal_v2_0_defaults"],
90 srcs: [
91 "impl/vhal_v2_0/virtualization/Utils.cpp",
92 ],
93 export_include_dirs: ["impl"],
94 shared_libs: [
95 "libbase",
96 ],
97}
98
Tri Vofc871402017-07-10 17:13:23 -070099cc_test {
100 name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
Tri Vo22b2d682017-07-11 12:53:12 -0700101 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700102 defaults: ["vhal_v2_0_defaults"],
103 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
104 srcs: [
105 "tests/RecurrentTimer_test.cpp",
106 "tests/SubscriptionManager_test.cpp",
107 "tests/VehicleHalManager_test.cpp",
108 "tests/VehicleObjectPool_test.cpp",
109 "tests/VehiclePropConfigIndex_test.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -0800110 "tests/VmsUtils_test.cpp",
Tri Vofc871402017-07-10 17:13:23 -0700111 ],
112 header_libs: ["libbase_headers"],
Keun Soo YIMff84c372018-11-27 14:04:42 -0800113 test_suites: ["general-tests"],
Tri Vofc871402017-07-10 17:13:23 -0700114}
115
Hao Chen1c1fdca2019-11-15 14:20:34 -0800116cc_test {
117 name: "android.hardware.automotive.vehicle@2.0-default-impl-unit-tests",
118 vendor: true,
119 defaults: ["vhal_v2_0_defaults"],
120 srcs: [
121 "impl/vhal_v2_0/tests/ProtoMessageConverter_test.cpp",
122 ],
123 static_libs: [
124 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
125 "android.hardware.automotive.vehicle@2.0-libproto-native",
126 "libprotobuf-cpp-lite",
127 ],
128 test_suites: ["general-tests"],
129}
130
Tri Vofc871402017-07-10 17:13:23 -0700131cc_binary {
132 name: "android.hardware.automotive.vehicle@2.0-service",
133 defaults: ["vhal_v2_0_defaults"],
134 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
Tri Vo22b2d682017-07-11 12:53:12 -0700135 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700136 relative_install_path: "hw",
137 srcs: ["VehicleService.cpp"],
138 shared_libs: [
139 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +0900140 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -0700141 "libprotobuf-cpp-lite",
142 ],
143 static_libs: [
144 "android.hardware.automotive.vehicle@2.0-manager-lib",
145 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
146 "android.hardware.automotive.vehicle@2.0-libproto-native",
Tri Vofc871402017-07-10 17:13:23 -0700147 "libqemu_pipe",
148 ],
149}
Hao Chen5a97c382019-12-05 15:53:05 -0800150
151cc_binary {
152 name: "android.hardware.automotive.vehicle@2.0-virtualization-service",
153 defaults: ["vhal_v2_0_defaults"],
154 init_rc: ["android.hardware.automotive.vehicle@2.0-virtualization-service.rc"],
155 vendor: true,
156 relative_install_path: "hw",
157 srcs: [
158 "impl/vhal_v2_0/virtualization/GrpcVehicleClient.cpp",
159 "VirtualizedVehicleService.cpp",
160 ],
161 shared_libs: [
162 "libbase",
163 "libcutils",
164 "libjsoncpp",
165 "libprotobuf-cpp-full",
166 "libgrpc++",
167 ],
168 static_libs: [
169 "android.hardware.automotive.vehicle@2.0-manager-lib",
170 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
171 "android.hardware.automotive.vehicle@2.0-grpc",
172 "android.hardware.automotive.vehicle@2.0-virtualization-utils",
173 "libqemu_pipe",
174 ],
175 cflags: [
176 "-Wno-unused-parameter"
177 ],
178}
179
180cc_binary {
181 name: "android.hardware.automotive.vehicle@2.0-virtualization-grpc-server",
182 init_rc: ["android.hardware.automotive.vehicle@2.0-virtualization-grpc-server.rc"],
183 defaults: ["vhal_v2_0_defaults"],
184 vendor: true,
185 relative_install_path: "hw",
186 srcs: [
187 "impl/vhal_v2_0/virtualization/GrpcVehicleServer.cpp",
188 "VirtualizationGrpcServer.cpp",
189 ],
190 shared_libs: [
191 "libbase",
192 "libjsoncpp",
193 "libprotobuf-cpp-full",
194 "libgrpc++",
195 ],
196 static_libs: [
197 "android.hardware.automotive.vehicle@2.0-manager-lib",
198 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
199 "android.hardware.automotive.vehicle@2.0-grpc",
200 "android.hardware.automotive.vehicle@2.0-virtualization-utils",
201 ],
202 cflags: [
203 "-Wno-unused-parameter"
204 ],
205}