blob: 6d3e902ffa7c553003f40f952444bbe5bab06736 [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",
33 export_include_dirs: ["common/include/vhal_v2_0"],
34}
35
36// Vehicle reference implementation lib
37cc_library_static {
38 name: "android.hardware.automotive.vehicle@2.0-manager-lib",
39 defaults: ["vhal_v2_0_defaults"],
40 srcs: [
41 "common/src/SubscriptionManager.cpp",
42 "common/src/VehicleHalManager.cpp",
43 "common/src/VehicleObjectPool.cpp",
44 "common/src/VehiclePropertyStore.cpp",
45 "common/src/VehicleUtils.cpp",
46 ],
47 local_include_dirs: ["common/include/vhal_v2_0"],
48 export_include_dirs: ["common/include"],
49}
50
51cc_library_shared {
52 name: "android.hardware.automotive.vehicle@2.0-manager-lib-shared",
53 static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
54 export_static_lib_headers: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
55}
56
57// Vehicle default VehicleHAL implementation
58cc_library_static {
59 name: "android.hardware.automotive.vehicle@2.0-default-impl-lib",
60 defaults: ["vhal_v2_0_defaults"],
61 srcs: [
62 "impl/vhal_v2_0/EmulatedVehicleHal.cpp",
63 "impl/vhal_v2_0/VehicleEmulator.cpp",
64 "impl/vhal_v2_0/PipeComm.cpp",
65 "impl/vhal_v2_0/SocketComm.cpp",
66 ],
67 local_include_dirs: ["common/include/vhal_v2_0"],
68 export_include_dirs: ["impl"],
69 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
70 shared_libs: [
71 "libbase",
72 "libprotobuf-cpp-lite",
73 ],
74 static_libs: [
75 "libqemu_pipe",
76 "android.hardware.automotive.vehicle@2.0-libproto-native",
77 ],
78}
79
80cc_test {
81 name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
82 defaults: ["vhal_v2_0_defaults"],
83 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
84 srcs: [
85 "tests/RecurrentTimer_test.cpp",
86 "tests/SubscriptionManager_test.cpp",
87 "tests/VehicleHalManager_test.cpp",
88 "tests/VehicleObjectPool_test.cpp",
89 "tests/VehiclePropConfigIndex_test.cpp",
90 ],
91 header_libs: ["libbase_headers"],
92}
93
94cc_binary {
95 name: "android.hardware.automotive.vehicle@2.0-service",
96 defaults: ["vhal_v2_0_defaults"],
97 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
98 proprietary: true,
99 relative_install_path: "hw",
100 srcs: ["VehicleService.cpp"],
101 shared_libs: [
102 "libbase",
103 "libprotobuf-cpp-lite",
104 ],
105 static_libs: [
106 "android.hardware.automotive.vehicle@2.0-manager-lib",
107 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
108 "android.hardware.automotive.vehicle@2.0-libproto-native",
109 "libqemu_pipe",
110 ],
111}