• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// 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    vendor: true,
34    export_include_dirs: ["common/include/vhal_v2_0"],
35}
36
37// Vehicle reference implementation lib
38cc_library {
39    name: "android.hardware.automotive.vehicle@2.0-manager-lib",
40    vendor: true,
41    defaults: ["vhal_v2_0_defaults"],
42    srcs: [
43        "common/src/Obd2SensorStore.cpp",
44        "common/src/SubscriptionManager.cpp",
45        "common/src/VehicleHalManager.cpp",
46        "common/src/VehicleObjectPool.cpp",
47        "common/src/VehiclePropertyStore.cpp",
48        "common/src/VehicleUtils.cpp",
49        "common/src/VmsUtils.cpp",
50    ],
51    local_include_dirs: ["common/include/vhal_v2_0"],
52    export_include_dirs: ["common/include"],
53}
54
55// Vehicle default VehicleHAL implementation
56cc_library_static {
57    name: "android.hardware.automotive.vehicle@2.0-default-impl-lib",
58    vendor: true,
59    defaults: ["vhal_v2_0_defaults"],
60    srcs: [
61        "impl/vhal_v2_0/CommConn.cpp",
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        "impl/vhal_v2_0/LinearFakeValueGenerator.cpp",
67        "impl/vhal_v2_0/JsonFakeValueGenerator.cpp",
68        "impl/vhal_v2_0/GeneratorHub.cpp",
69    ],
70    local_include_dirs: ["common/include/vhal_v2_0"],
71    export_include_dirs: ["impl"],
72    whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
73    shared_libs: [
74        "libbase",
75        "libprotobuf-cpp-lite",
76    ],
77    static_libs: [
78        "libjsoncpp",
79        "libqemu_pipe",
80        "android.hardware.automotive.vehicle@2.0-libproto-native",
81    ],
82}
83
84cc_test {
85    name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
86    vendor: true,
87    defaults: ["vhal_v2_0_defaults"],
88    whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
89    srcs: [
90        "tests/RecurrentTimer_test.cpp",
91        "tests/SubscriptionManager_test.cpp",
92        "tests/VehicleHalManager_test.cpp",
93        "tests/VehicleObjectPool_test.cpp",
94        "tests/VehiclePropConfigIndex_test.cpp",
95        "tests/VmsUtils_test.cpp",
96    ],
97    header_libs: ["libbase_headers"],
98    test_suites: ["general-tests"],
99}
100
101cc_binary {
102    name: "android.hardware.automotive.vehicle@2.0-service",
103    defaults: ["vhal_v2_0_defaults"],
104    init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
105    vendor: true,
106    relative_install_path: "hw",
107    srcs: ["VehicleService.cpp"],
108    shared_libs: [
109        "libbase",
110        "libprotobuf-cpp-lite",
111    ],
112    static_libs: [
113        "android.hardware.automotive.vehicle@2.0-manager-lib",
114        "android.hardware.automotive.vehicle@2.0-default-impl-lib",
115        "android.hardware.automotive.vehicle@2.0-libproto-native",
116        "libjsoncpp",
117        "libqemu_pipe",
118    ],
119}
120