Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 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 | |
| 15 | cc_defaults { |
| 16 | name: "vhal_v2_0_defaults", |
| 17 | shared_libs: [ |
| 18 | "libhidlbase", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 19 | "liblog", |
| 20 | "libutils", |
| 21 | "android.hardware.automotive.vehicle@2.0", |
| 22 | ], |
| 23 | cflags: [ |
| 24 | "-Wall", |
| 25 | "-Wextra", |
| 26 | "-Werror", |
| 27 | ], |
| 28 | } |
| 29 | |
| 30 | cc_library_headers { |
| 31 | name: "vhal_v2_0_common_headers", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 32 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 33 | export_include_dirs: ["common/include/vhal_v2_0"], |
| 34 | } |
| 35 | |
| 36 | // Vehicle reference implementation lib |
Anthony Mah | a9d8c0d | 2017-10-03 16:22:22 -0700 | [diff] [blame] | 37 | cc_library { |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 38 | name: "android.hardware.automotive.vehicle@2.0-manager-lib", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 39 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 40 | defaults: ["vhal_v2_0_defaults"], |
| 41 | srcs: [ |
Pavel Maltsev | 250139c | 2017-08-24 15:09:41 -0700 | [diff] [blame] | 42 | "common/src/Obd2SensorStore.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 43 | "common/src/SubscriptionManager.cpp", |
| 44 | "common/src/VehicleHalManager.cpp", |
| 45 | "common/src/VehicleObjectPool.cpp", |
| 46 | "common/src/VehiclePropertyStore.cpp", |
| 47 | "common/src/VehicleUtils.cpp", |
Aditi Nagaraj | 8dcab8e | 2018-01-10 17:10:01 -0800 | [diff] [blame] | 48 | "common/src/VmsUtils.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 49 | ], |
Felipe Leme | 75a27f8 | 2020-01-31 15:25:55 -0800 | [diff] [blame^] | 50 | shared_libs: [ |
| 51 | "libbase", |
| 52 | ], |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 53 | local_include_dirs: ["common/include/vhal_v2_0"], |
| 54 | export_include_dirs: ["common/include"], |
| 55 | } |
| 56 | |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 57 | // Vehicle default VehicleHAL implementation |
| 58 | cc_library_static { |
| 59 | name: "android.hardware.automotive.vehicle@2.0-default-impl-lib", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 60 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 61 | defaults: ["vhal_v2_0_defaults"], |
| 62 | srcs: [ |
Dean Harding | bea881c | 2018-06-15 13:33:47 -0700 | [diff] [blame] | 63 | "impl/vhal_v2_0/CommConn.cpp", |
Hao Chen | fba3ac8 | 2019-11-07 11:55:25 -0800 | [diff] [blame] | 64 | "impl/vhal_v2_0/EmulatedVehicleConnector.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 65 | "impl/vhal_v2_0/EmulatedVehicleHal.cpp", |
| 66 | "impl/vhal_v2_0/VehicleEmulator.cpp", |
| 67 | "impl/vhal_v2_0/PipeComm.cpp", |
Hao Chen | 1c1fdca | 2019-11-15 14:20:34 -0800 | [diff] [blame] | 68 | "impl/vhal_v2_0/ProtoMessageConverter.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 69 | "impl/vhal_v2_0/SocketComm.cpp", |
Chao Yan | f63c2ca | 2018-04-17 11:32:39 -0700 | [diff] [blame] | 70 | "impl/vhal_v2_0/LinearFakeValueGenerator.cpp", |
| 71 | "impl/vhal_v2_0/JsonFakeValueGenerator.cpp", |
Chao Yan | 0f85dd1 | 2018-06-04 14:03:02 -0700 | [diff] [blame] | 72 | "impl/vhal_v2_0/GeneratorHub.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 73 | ], |
| 74 | local_include_dirs: ["common/include/vhal_v2_0"], |
| 75 | export_include_dirs: ["impl"], |
| 76 | whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"], |
| 77 | shared_libs: [ |
| 78 | "libbase", |
Inseob Kim | 31ab19f | 2019-09-10 14:56:19 +0900 | [diff] [blame] | 79 | "libjsoncpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 80 | "libprotobuf-cpp-lite", |
| 81 | ], |
| 82 | static_libs: [ |
| 83 | "libqemu_pipe", |
| 84 | "android.hardware.automotive.vehicle@2.0-libproto-native", |
| 85 | ], |
| 86 | } |
| 87 | |
Hao Chen | 5a97c38 | 2019-12-05 15:53:05 -0800 | [diff] [blame] | 88 | // VHal virtualization utils |
| 89 | cc_library_static { |
| 90 | name: "android.hardware.automotive.vehicle@2.0-virtualization-utils", |
| 91 | vendor: true, |
| 92 | defaults: ["vhal_v2_0_defaults"], |
| 93 | srcs: [ |
| 94 | "impl/vhal_v2_0/virtualization/Utils.cpp", |
| 95 | ], |
| 96 | export_include_dirs: ["impl"], |
| 97 | shared_libs: [ |
| 98 | "libbase", |
| 99 | ], |
| 100 | } |
| 101 | |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 102 | cc_test { |
| 103 | name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 104 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 105 | defaults: ["vhal_v2_0_defaults"], |
| 106 | whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"], |
| 107 | srcs: [ |
| 108 | "tests/RecurrentTimer_test.cpp", |
| 109 | "tests/SubscriptionManager_test.cpp", |
| 110 | "tests/VehicleHalManager_test.cpp", |
| 111 | "tests/VehicleObjectPool_test.cpp", |
| 112 | "tests/VehiclePropConfigIndex_test.cpp", |
Aditi Nagaraj | 8dcab8e | 2018-01-10 17:10:01 -0800 | [diff] [blame] | 113 | "tests/VmsUtils_test.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 114 | ], |
Felipe Leme | 75a27f8 | 2020-01-31 15:25:55 -0800 | [diff] [blame^] | 115 | shared_libs: [ |
| 116 | "libbase", |
| 117 | ], |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 118 | header_libs: ["libbase_headers"], |
Keun Soo YIM | ff84c37 | 2018-11-27 14:04:42 -0800 | [diff] [blame] | 119 | test_suites: ["general-tests"], |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 120 | } |
| 121 | |
Hao Chen | 1c1fdca | 2019-11-15 14:20:34 -0800 | [diff] [blame] | 122 | cc_test { |
| 123 | name: "android.hardware.automotive.vehicle@2.0-default-impl-unit-tests", |
| 124 | vendor: true, |
| 125 | defaults: ["vhal_v2_0_defaults"], |
| 126 | srcs: [ |
| 127 | "impl/vhal_v2_0/tests/ProtoMessageConverter_test.cpp", |
| 128 | ], |
| 129 | static_libs: [ |
| 130 | "android.hardware.automotive.vehicle@2.0-default-impl-lib", |
| 131 | "android.hardware.automotive.vehicle@2.0-libproto-native", |
| 132 | "libprotobuf-cpp-lite", |
| 133 | ], |
| 134 | test_suites: ["general-tests"], |
| 135 | } |
| 136 | |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 137 | cc_binary { |
| 138 | name: "android.hardware.automotive.vehicle@2.0-service", |
| 139 | defaults: ["vhal_v2_0_defaults"], |
| 140 | init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"], |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 141 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 142 | relative_install_path: "hw", |
| 143 | srcs: ["VehicleService.cpp"], |
| 144 | shared_libs: [ |
| 145 | "libbase", |
Inseob Kim | 31ab19f | 2019-09-10 14:56:19 +0900 | [diff] [blame] | 146 | "libjsoncpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 147 | "libprotobuf-cpp-lite", |
| 148 | ], |
| 149 | static_libs: [ |
| 150 | "android.hardware.automotive.vehicle@2.0-manager-lib", |
| 151 | "android.hardware.automotive.vehicle@2.0-default-impl-lib", |
| 152 | "android.hardware.automotive.vehicle@2.0-libproto-native", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 153 | "libqemu_pipe", |
| 154 | ], |
| 155 | } |
Hao Chen | 5a97c38 | 2019-12-05 15:53:05 -0800 | [diff] [blame] | 156 | |
| 157 | cc_binary { |
| 158 | name: "android.hardware.automotive.vehicle@2.0-virtualization-service", |
| 159 | defaults: ["vhal_v2_0_defaults"], |
| 160 | init_rc: ["android.hardware.automotive.vehicle@2.0-virtualization-service.rc"], |
| 161 | vendor: true, |
| 162 | relative_install_path: "hw", |
| 163 | srcs: [ |
| 164 | "impl/vhal_v2_0/virtualization/GrpcVehicleClient.cpp", |
| 165 | "VirtualizedVehicleService.cpp", |
| 166 | ], |
| 167 | shared_libs: [ |
| 168 | "libbase", |
| 169 | "libcutils", |
| 170 | "libjsoncpp", |
| 171 | "libprotobuf-cpp-full", |
| 172 | "libgrpc++", |
| 173 | ], |
| 174 | static_libs: [ |
| 175 | "android.hardware.automotive.vehicle@2.0-manager-lib", |
| 176 | "android.hardware.automotive.vehicle@2.0-default-impl-lib", |
| 177 | "android.hardware.automotive.vehicle@2.0-grpc", |
| 178 | "android.hardware.automotive.vehicle@2.0-virtualization-utils", |
| 179 | "libqemu_pipe", |
| 180 | ], |
| 181 | cflags: [ |
Felipe Leme | 75a27f8 | 2020-01-31 15:25:55 -0800 | [diff] [blame^] | 182 | "-Wno-unused-parameter", |
Hao Chen | 5a97c38 | 2019-12-05 15:53:05 -0800 | [diff] [blame] | 183 | ], |
| 184 | } |
| 185 | |
| 186 | cc_binary { |
| 187 | name: "android.hardware.automotive.vehicle@2.0-virtualization-grpc-server", |
| 188 | init_rc: ["android.hardware.automotive.vehicle@2.0-virtualization-grpc-server.rc"], |
| 189 | defaults: ["vhal_v2_0_defaults"], |
| 190 | vendor: true, |
| 191 | relative_install_path: "hw", |
| 192 | srcs: [ |
| 193 | "impl/vhal_v2_0/virtualization/GrpcVehicleServer.cpp", |
| 194 | "VirtualizationGrpcServer.cpp", |
| 195 | ], |
| 196 | shared_libs: [ |
| 197 | "libbase", |
| 198 | "libjsoncpp", |
| 199 | "libprotobuf-cpp-full", |
| 200 | "libgrpc++", |
| 201 | ], |
| 202 | static_libs: [ |
| 203 | "android.hardware.automotive.vehicle@2.0-manager-lib", |
| 204 | "android.hardware.automotive.vehicle@2.0-default-impl-lib", |
| 205 | "android.hardware.automotive.vehicle@2.0-grpc", |
| 206 | "android.hardware.automotive.vehicle@2.0-virtualization-utils", |
| 207 | ], |
| 208 | cflags: [ |
Felipe Leme | 75a27f8 | 2020-01-31 15:25:55 -0800 | [diff] [blame^] | 209 | "-Wno-unused-parameter", |
Hao Chen | 5a97c38 | 2019-12-05 15:53:05 -0800 | [diff] [blame] | 210 | ], |
| 211 | } |