blob: a4fd6415edbe33b5e6b7a4f5dab26f413057cb92 [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: [
Eric Jeong908101a2020-04-23 09:43:55 -070018 "libbinder_ndk",
Tri Vofc871402017-07-10 17:13:23 -070019 "libhidlbase",
Tri Vofc871402017-07-10 17:13:23 -070020 "liblog",
21 "libutils",
22 "android.hardware.automotive.vehicle@2.0",
Eric Jeong908101a2020-04-23 09:43:55 -070023 "carwatchdog_aidl_interface-ndk_platform",
Tri Vofc871402017-07-10 17:13:23 -070024 ],
25 cflags: [
26 "-Wall",
27 "-Wextra",
28 "-Werror",
29 ],
30}
31
32cc_library_headers {
33 name: "vhal_v2_0_common_headers",
Tri Vo22b2d682017-07-11 12:53:12 -070034 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070035 export_include_dirs: ["common/include/vhal_v2_0"],
36}
37
38// Vehicle reference implementation lib
Anthony Maha9d8c0d2017-10-03 16:22:22 -070039cc_library {
Tri Vofc871402017-07-10 17:13:23 -070040 name: "android.hardware.automotive.vehicle@2.0-manager-lib",
Tri Vo22b2d682017-07-11 12:53:12 -070041 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070042 defaults: ["vhal_v2_0_defaults"],
43 srcs: [
Pavel Maltsev250139c2017-08-24 15:09:41 -070044 "common/src/Obd2SensorStore.cpp",
Tri Vofc871402017-07-10 17:13:23 -070045 "common/src/SubscriptionManager.cpp",
46 "common/src/VehicleHalManager.cpp",
47 "common/src/VehicleObjectPool.cpp",
48 "common/src/VehiclePropertyStore.cpp",
49 "common/src/VehicleUtils.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -080050 "common/src/VmsUtils.cpp",
Eric Jeong908101a2020-04-23 09:43:55 -070051 "common/src/WatchdogClient.cpp",
Tri Vofc871402017-07-10 17:13:23 -070052 ],
Felipe Leme75a27f82020-01-31 15:25:55 -080053 shared_libs: [
54 "libbase",
55 ],
Tri Vofc871402017-07-10 17:13:23 -070056 local_include_dirs: ["common/include/vhal_v2_0"],
57 export_include_dirs: ["common/include"],
58}
59
Tri Vofc871402017-07-10 17:13:23 -070060// Vehicle default VehicleHAL implementation
61cc_library_static {
62 name: "android.hardware.automotive.vehicle@2.0-default-impl-lib",
Tri Vo22b2d682017-07-11 12:53:12 -070063 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070064 defaults: ["vhal_v2_0_defaults"],
65 srcs: [
Dean Hardingbea881c2018-06-15 13:33:47 -070066 "impl/vhal_v2_0/CommConn.cpp",
Hao Chenfba3ac82019-11-07 11:55:25 -080067 "impl/vhal_v2_0/EmulatedVehicleConnector.cpp",
Tri Vofc871402017-07-10 17:13:23 -070068 "impl/vhal_v2_0/EmulatedVehicleHal.cpp",
Hao Chena6d6fa32020-02-14 11:51:26 -080069 "impl/vhal_v2_0/VehicleHalClient.cpp",
70 "impl/vhal_v2_0/VehicleHalServer.cpp",
Tri Vofc871402017-07-10 17:13:23 -070071 "impl/vhal_v2_0/VehicleEmulator.cpp",
72 "impl/vhal_v2_0/PipeComm.cpp",
Hao Chen1c1fdca2019-11-15 14:20:34 -080073 "impl/vhal_v2_0/ProtoMessageConverter.cpp",
Tri Vofc871402017-07-10 17:13:23 -070074 "impl/vhal_v2_0/SocketComm.cpp",
Chao Yanf63c2ca2018-04-17 11:32:39 -070075 "impl/vhal_v2_0/LinearFakeValueGenerator.cpp",
76 "impl/vhal_v2_0/JsonFakeValueGenerator.cpp",
Chao Yan0f85dd12018-06-04 14:03:02 -070077 "impl/vhal_v2_0/GeneratorHub.cpp",
Tri Vofc871402017-07-10 17:13:23 -070078 ],
79 local_include_dirs: ["common/include/vhal_v2_0"],
80 export_include_dirs: ["impl"],
felipeal9c998c02020-04-17 14:32:53 -070081 whole_static_libs: [
82 "android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib",
83 "android.hardware.automotive.vehicle@2.0-manager-lib",
84 ],
Tri Vofc871402017-07-10 17:13:23 -070085 shared_libs: [
86 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +090087 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -070088 "libprotobuf-cpp-lite",
89 ],
90 static_libs: [
91 "libqemu_pipe",
92 "android.hardware.automotive.vehicle@2.0-libproto-native",
93 ],
94}
95
felipeal9c998c02020-04-17 14:32:53 -070096// Library used to emulate User HAL behavior through lshal debug requests.
97cc_library_static {
98 name: "android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib",
99 vendor: true,
100 defaults: ["vhal_v2_0_defaults"],
101 srcs: [
102 "impl/vhal_v2_0/EmulatedUserHal.cpp",
103 ],
104}
105
Tri Vofc871402017-07-10 17:13:23 -0700106cc_test {
107 name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
Tri Vo22b2d682017-07-11 12:53:12 -0700108 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700109 defaults: ["vhal_v2_0_defaults"],
110 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
111 srcs: [
112 "tests/RecurrentTimer_test.cpp",
113 "tests/SubscriptionManager_test.cpp",
114 "tests/VehicleHalManager_test.cpp",
115 "tests/VehicleObjectPool_test.cpp",
116 "tests/VehiclePropConfigIndex_test.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -0800117 "tests/VmsUtils_test.cpp",
Tri Vofc871402017-07-10 17:13:23 -0700118 ],
Felipe Leme75a27f82020-01-31 15:25:55 -0800119 shared_libs: [
120 "libbase",
121 ],
Tri Vofc871402017-07-10 17:13:23 -0700122 header_libs: ["libbase_headers"],
Keun Soo YIMff84c372018-11-27 14:04:42 -0800123 test_suites: ["general-tests"],
Tri Vofc871402017-07-10 17:13:23 -0700124}
125
Hao Chen1c1fdca2019-11-15 14:20:34 -0800126cc_test {
127 name: "android.hardware.automotive.vehicle@2.0-default-impl-unit-tests",
128 vendor: true,
129 defaults: ["vhal_v2_0_defaults"],
130 srcs: [
131 "impl/vhal_v2_0/tests/ProtoMessageConverter_test.cpp",
132 ],
133 static_libs: [
134 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
135 "android.hardware.automotive.vehicle@2.0-libproto-native",
136 "libprotobuf-cpp-lite",
137 ],
138 test_suites: ["general-tests"],
139}
140
Tri Vofc871402017-07-10 17:13:23 -0700141cc_binary {
142 name: "android.hardware.automotive.vehicle@2.0-service",
143 defaults: ["vhal_v2_0_defaults"],
Calvin Huanga6536162020-04-20 12:41:20 -0700144 vintf_fragments: [
145 "android.hardware.automotive.vehicle@2.0-service.xml",
146 ],
Tri Vofc871402017-07-10 17:13:23 -0700147 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
Tri Vo22b2d682017-07-11 12:53:12 -0700148 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700149 relative_install_path: "hw",
150 srcs: ["VehicleService.cpp"],
151 shared_libs: [
152 "libbase",
Inseob Kim31ab19f2019-09-10 14:56:19 +0900153 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -0700154 "libprotobuf-cpp-lite",
155 ],
156 static_libs: [
157 "android.hardware.automotive.vehicle@2.0-manager-lib",
158 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
159 "android.hardware.automotive.vehicle@2.0-libproto-native",
Tri Vofc871402017-07-10 17:13:23 -0700160 "libqemu_pipe",
161 ],
162}