blob: 6a254a513ac41973e65477a4ff0d3352a8dc03d1 [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
38cc_library_static {
39 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
55cc_library_shared {
56 name: "android.hardware.automotive.vehicle@2.0-manager-lib-shared",
Tri Vo22b2d682017-07-11 12:53:12 -070057 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070058 static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
59 export_static_lib_headers: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
60}
61
62// Vehicle default VehicleHAL implementation
63cc_library_static {
64 name: "android.hardware.automotive.vehicle@2.0-default-impl-lib",
Tri Vo22b2d682017-07-11 12:53:12 -070065 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070066 defaults: ["vhal_v2_0_defaults"],
67 srcs: [
68 "impl/vhal_v2_0/EmulatedVehicleHal.cpp",
69 "impl/vhal_v2_0/VehicleEmulator.cpp",
70 "impl/vhal_v2_0/PipeComm.cpp",
71 "impl/vhal_v2_0/SocketComm.cpp",
72 ],
73 local_include_dirs: ["common/include/vhal_v2_0"],
74 export_include_dirs: ["impl"],
75 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
76 shared_libs: [
77 "libbase",
78 "libprotobuf-cpp-lite",
79 ],
80 static_libs: [
81 "libqemu_pipe",
82 "android.hardware.automotive.vehicle@2.0-libproto-native",
83 ],
84}
85
86cc_test {
87 name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
Tri Vo22b2d682017-07-11 12:53:12 -070088 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -070089 defaults: ["vhal_v2_0_defaults"],
90 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
91 srcs: [
92 "tests/RecurrentTimer_test.cpp",
93 "tests/SubscriptionManager_test.cpp",
94 "tests/VehicleHalManager_test.cpp",
95 "tests/VehicleObjectPool_test.cpp",
96 "tests/VehiclePropConfigIndex_test.cpp",
Aditi Nagaraj8dcab8e2018-01-10 17:10:01 -080097 "tests/VmsUtils_test.cpp",
Tri Vofc871402017-07-10 17:13:23 -070098 ],
99 header_libs: ["libbase_headers"],
100}
101
102cc_binary {
103 name: "android.hardware.automotive.vehicle@2.0-service",
104 defaults: ["vhal_v2_0_defaults"],
105 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
Tri Vo22b2d682017-07-11 12:53:12 -0700106 vendor: true,
Tri Vofc871402017-07-10 17:13:23 -0700107 relative_install_path: "hw",
108 srcs: ["VehicleService.cpp"],
109 shared_libs: [
110 "libbase",
111 "libprotobuf-cpp-lite",
112 ],
113 static_libs: [
114 "android.hardware.automotive.vehicle@2.0-manager-lib",
115 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
116 "android.hardware.automotive.vehicle@2.0-libproto-native",
117 "libqemu_pipe",
118 ],
119}