blob: 86e59d0865e6e0abd3552eda8a62936c53fdcacf [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 ],
Felipe Leme75a27f82020-01-31 15:25:55 -080050 shared_libs: [
51 "libbase",
52 ],
Tri Vofc871402017-07-10 17:13:23 -070053 local_include_dirs: ["common/include/vhal_v2_0"],
54 export_include_dirs: ["common/include"],
55}
56
Tri Vofc871402017-07-10 17:13:23 -070057// Vehicle default VehicleHAL implementation
58cc_library_static {
59 name: "android.hardware.automotive.vehicle@2.0-default-impl-lib",
Tri Vo22b2d682017-07-11 12:53:12 -070060 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070061 defaults: ["vhal_v2_0_defaults"],
62 srcs: [
Dean Hardingbea881c2018-06-15 13:33:47 -070063 "impl/vhal_v2_0/CommConn.cpp",
Hao Chenfba3ac82019-11-07 11:55:25 -080064 "impl/vhal_v2_0/EmulatedVehicleConnector.cpp",
Tri Vofc871402017-07-10 17:13:23 -070065 "impl/vhal_v2_0/EmulatedVehicleHal.cpp",
Hao Chena6d6fa32020-02-14 11:51:26 -080066 "impl/vhal_v2_0/VehicleHalClient.cpp",
67 "impl/vhal_v2_0/VehicleHalServer.cpp",
Tri Vofc871402017-07-10 17:13:23 -070068 "impl/vhal_v2_0/VehicleEmulator.cpp",
69 "impl/vhal_v2_0/PipeComm.cpp",
Hao Chen1c1fdca2019-11-15 14:20:34 -080070 "impl/vhal_v2_0/ProtoMessageConverter.cpp",
Tri Vofc871402017-07-10 17:13:23 -070071 "impl/vhal_v2_0/SocketComm.cpp",
Chao Yanf63c2ca2018-04-17 11:32:39 -070072 "impl/vhal_v2_0/LinearFakeValueGenerator.cpp",
73 "impl/vhal_v2_0/JsonFakeValueGenerator.cpp",
Chao Yan0f85dd12018-06-04 14:03:02 -070074 "impl/vhal_v2_0/GeneratorHub.cpp",
Tri Vofc871402017-07-10 17:13:23 -070075 ],
76 local_include_dirs: ["common/include/vhal_v2_0"],
77 export_include_dirs: ["impl"],
felipeal9c998c02020-04-17 14:32:53 -070078 whole_static_libs: [
79 "android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib",
80 "android.hardware.automotive.vehicle@2.0-manager-lib",
81 ],
Tri Vofc871402017-07-10 17:13:23 -070082 shared_libs: [
83 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +090084 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -070085 "libprotobuf-cpp-lite",
86 ],
87 static_libs: [
88 "libqemu_pipe",
89 "android.hardware.automotive.vehicle@2.0-libproto-native",
90 ],
91}
92
felipeal9c998c02020-04-17 14:32:53 -070093// Library used to emulate User HAL behavior through lshal debug requests.
94cc_library_static {
95 name: "android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib",
96 vendor: true,
97 defaults: ["vhal_v2_0_defaults"],
98 srcs: [
99 "impl/vhal_v2_0/EmulatedUserHal.cpp",
100 ],
101}
102
Tri Vofc871402017-07-10 17:13:23 -0700103cc_test {
104 name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
Tri Vo22b2d682017-07-11 12:53:12 -0700105 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700106 defaults: ["vhal_v2_0_defaults"],
107 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
108 srcs: [
109 "tests/RecurrentTimer_test.cpp",
110 "tests/SubscriptionManager_test.cpp",
111 "tests/VehicleHalManager_test.cpp",
112 "tests/VehicleObjectPool_test.cpp",
113 "tests/VehiclePropConfigIndex_test.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -0800114 "tests/VmsUtils_test.cpp",
Tri Vofc871402017-07-10 17:13:23 -0700115 ],
Felipe Leme75a27f82020-01-31 15:25:55 -0800116 shared_libs: [
117 "libbase",
118 ],
Tri Vofc871402017-07-10 17:13:23 -0700119 header_libs: ["libbase_headers"],
Keun Soo YIMff84c372018-11-27 14:04:42 -0800120 test_suites: ["general-tests"],
Tri Vofc871402017-07-10 17:13:23 -0700121}
122
Hao Chen1c1fdca2019-11-15 14:20:34 -0800123cc_test {
124 name: "android.hardware.automotive.vehicle@2.0-default-impl-unit-tests",
125 vendor: true,
126 defaults: ["vhal_v2_0_defaults"],
127 srcs: [
128 "impl/vhal_v2_0/tests/ProtoMessageConverter_test.cpp",
129 ],
130 static_libs: [
131 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
132 "android.hardware.automotive.vehicle@2.0-libproto-native",
133 "libprotobuf-cpp-lite",
134 ],
135 test_suites: ["general-tests"],
136}
137
Tri Vofc871402017-07-10 17:13:23 -0700138cc_binary {
139 name: "android.hardware.automotive.vehicle@2.0-service",
140 defaults: ["vhal_v2_0_defaults"],
141 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
Tri Vo22b2d682017-07-11 12:53:12 -0700142 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700143 relative_install_path: "hw",
144 srcs: ["VehicleService.cpp"],
145 shared_libs: [
146 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +0900147 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -0700148 "libprotobuf-cpp-lite",
149 ],
150 static_libs: [
151 "android.hardware.automotive.vehicle@2.0-manager-lib",
152 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
153 "android.hardware.automotive.vehicle@2.0-libproto-native",
Tri Vofc871402017-07-10 17:13:23 -0700154 "libqemu_pipe",
155 ],
156}