blob: 65e9133b0ac16f876a988f543f789be8ffead02e [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",
19 "libhidltransport",
20 "liblog",
21 "libutils",
22 "android.hardware.automotive.vehicle@2.0",
23 ],
24 cflags: [
25 "-Wall",
26 "-Wextra",
27 "-Werror",
28 ],
29}
30
31cc_library_headers {
32 name: "vhal_v2_0_common_headers",
Tri Vo22b2d682017-07-11 12:53:12 -070033 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070034 export_include_dirs: ["common/include/vhal_v2_0"],
35}
36
37// Vehicle reference implementation lib
Anthony Maha9d8c0d2017-10-03 16:22:22 -070038cc_library {
Tri Vofc871402017-07-10 17:13:23 -070039 name: "android.hardware.automotive.vehicle@2.0-manager-lib",
Tri Vo22b2d682017-07-11 12:53:12 -070040 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070041 defaults: ["vhal_v2_0_defaults"],
42 srcs: [
Pavel Maltsev250139c2017-08-24 15:09:41 -070043 "common/src/Obd2SensorStore.cpp",
Tri Vofc871402017-07-10 17:13:23 -070044 "common/src/SubscriptionManager.cpp",
45 "common/src/VehicleHalManager.cpp",
46 "common/src/VehicleObjectPool.cpp",
47 "common/src/VehiclePropertyStore.cpp",
48 "common/src/VehicleUtils.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -080049 "common/src/VmsUtils.cpp",
Tri Vofc871402017-07-10 17:13:23 -070050 ],
51 local_include_dirs: ["common/include/vhal_v2_0"],
52 export_include_dirs: ["common/include"],
53}
54
Tri Vofc871402017-07-10 17:13:23 -070055// Vehicle default VehicleHAL implementation
56cc_library_static {
57 name: "android.hardware.automotive.vehicle@2.0-default-impl-lib",
Tri Vo22b2d682017-07-11 12:53:12 -070058 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070059 defaults: ["vhal_v2_0_defaults"],
60 srcs: [
61 "impl/vhal_v2_0/EmulatedVehicleHal.cpp",
62 "impl/vhal_v2_0/VehicleEmulator.cpp",
63 "impl/vhal_v2_0/PipeComm.cpp",
64 "impl/vhal_v2_0/SocketComm.cpp",
Chao Yanf63c2ca2018-04-17 11:32:39 -070065 "impl/vhal_v2_0/LinearFakeValueGenerator.cpp",
66 "impl/vhal_v2_0/JsonFakeValueGenerator.cpp",
Chao Yan0f85dd12018-06-04 14:03:02 -070067 "impl/vhal_v2_0/GeneratorHub.cpp",
Tri Vofc871402017-07-10 17:13:23 -070068 ],
69 local_include_dirs: ["common/include/vhal_v2_0"],
70 export_include_dirs: ["impl"],
71 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
72 shared_libs: [
73 "libbase",
74 "libprotobuf-cpp-lite",
75 ],
76 static_libs: [
Chao Yanf63c2ca2018-04-17 11:32:39 -070077 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -070078 "libqemu_pipe",
79 "android.hardware.automotive.vehicle@2.0-libproto-native",
80 ],
81}
82
83cc_test {
84 name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
Tri Vo22b2d682017-07-11 12:53:12 -070085 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070086 defaults: ["vhal_v2_0_defaults"],
87 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
88 srcs: [
89 "tests/RecurrentTimer_test.cpp",
90 "tests/SubscriptionManager_test.cpp",
91 "tests/VehicleHalManager_test.cpp",
92 "tests/VehicleObjectPool_test.cpp",
93 "tests/VehiclePropConfigIndex_test.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -080094 "tests/VmsUtils_test.cpp",
Tri Vofc871402017-07-10 17:13:23 -070095 ],
96 header_libs: ["libbase_headers"],
97}
98
99cc_binary {
100 name: "android.hardware.automotive.vehicle@2.0-service",
101 defaults: ["vhal_v2_0_defaults"],
102 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
Tri Vo22b2d682017-07-11 12:53:12 -0700103 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700104 relative_install_path: "hw",
105 srcs: ["VehicleService.cpp"],
106 shared_libs: [
107 "libbase",
108 "libprotobuf-cpp-lite",
109 ],
110 static_libs: [
111 "android.hardware.automotive.vehicle@2.0-manager-lib",
112 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
113 "android.hardware.automotive.vehicle@2.0-libproto-native",
Chao Yanf63c2ca2018-04-17 11:32:39 -0700114 "libjsoncpp",
Tri Vofc871402017-07-10 17:13:23 -0700115 "libqemu_pipe",
116 ],
117}