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 | |
Bob Badour | c22b35b | 2021-02-23 14:26:20 -0800 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "hardware_interfaces_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | default_applicable_licenses: ["hardware_interfaces_license"], |
| 22 | } |
| 23 | |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 24 | cc_defaults { |
| 25 | name: "vhal_v2_0_defaults", |
| 26 | shared_libs: [ |
| 27 | "libhidlbase", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 28 | "liblog", |
| 29 | "libutils", |
| 30 | "android.hardware.automotive.vehicle@2.0", |
| 31 | ], |
| 32 | cflags: [ |
| 33 | "-Wall", |
| 34 | "-Wextra", |
| 35 | "-Werror", |
| 36 | ], |
| 37 | } |
| 38 | |
Hao Chen | c324db9 | 2020-06-03 18:29:31 -0700 | [diff] [blame] | 39 | cc_defaults { |
| 40 | name: "vhal_v2_0_target_defaults", |
| 41 | defaults: ["vhal_v2_0_defaults"], |
| 42 | shared_libs: [ |
| 43 | "libbinder_ndk", |
Jiyong Park | d55d28a | 2021-08-09 09:47:37 +0900 | [diff] [blame^] | 44 | "android.automotive.watchdog-V2-ndk", |
Hao Chen | c324db9 | 2020-06-03 18:29:31 -0700 | [diff] [blame] | 45 | ], |
| 46 | } |
| 47 | |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 48 | cc_library_headers { |
| 49 | name: "vhal_v2_0_common_headers", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 50 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 51 | export_include_dirs: ["common/include/vhal_v2_0"], |
| 52 | } |
| 53 | |
| 54 | // Vehicle reference implementation lib |
Anthony Mah | a9d8c0d | 2017-10-03 16:22:22 -0700 | [diff] [blame] | 55 | cc_library { |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 56 | name: "android.hardware.automotive.vehicle@2.0-manager-lib", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 57 | vendor: true, |
Hao Chen | c324db9 | 2020-06-03 18:29:31 -0700 | [diff] [blame] | 58 | defaults: ["vhal_v2_0_target_defaults"], |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 59 | srcs: [ |
Pavel Maltsev | 250139c | 2017-08-24 15:09:41 -0700 | [diff] [blame] | 60 | "common/src/Obd2SensorStore.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 61 | "common/src/SubscriptionManager.cpp", |
| 62 | "common/src/VehicleHalManager.cpp", |
| 63 | "common/src/VehicleObjectPool.cpp", |
| 64 | "common/src/VehiclePropertyStore.cpp", |
| 65 | "common/src/VehicleUtils.cpp", |
Aditi Nagaraj | 8dcab8e | 2018-01-10 17:10:01 -0800 | [diff] [blame] | 66 | "common/src/VmsUtils.cpp", |
Eric Jeong | 908101a | 2020-04-23 09:43:55 -0700 | [diff] [blame] | 67 | "common/src/WatchdogClient.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 68 | ], |
Felipe Leme | 75a27f8 | 2020-01-31 15:25:55 -0800 | [diff] [blame] | 69 | shared_libs: [ |
| 70 | "libbase", |
| 71 | ], |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 72 | local_include_dirs: ["common/include/vhal_v2_0"], |
| 73 | export_include_dirs: ["common/include"], |
| 74 | } |
| 75 | |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 76 | // Vehicle default VehicleHAL implementation |
| 77 | cc_library_static { |
| 78 | name: "android.hardware.automotive.vehicle@2.0-default-impl-lib", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 79 | vendor: true, |
Hao Chen | c324db9 | 2020-06-03 18:29:31 -0700 | [diff] [blame] | 80 | defaults: ["vhal_v2_0_target_defaults"], |
Yuncheol Heo | 38ec240 | 2021-04-15 15:25:39 -0700 | [diff] [blame] | 81 | cflags: ["-DENABLE_VENDOR_CLUSTER_PROPERTY_FOR_TESTING"], |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 82 | srcs: [ |
Dean Harding | bea881c | 2018-06-15 13:33:47 -0700 | [diff] [blame] | 83 | "impl/vhal_v2_0/CommConn.cpp", |
Hao Chen | fba3ac8 | 2019-11-07 11:55:25 -0800 | [diff] [blame] | 84 | "impl/vhal_v2_0/EmulatedVehicleConnector.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 85 | "impl/vhal_v2_0/EmulatedVehicleHal.cpp", |
Hao Chen | a6d6fa3 | 2020-02-14 11:51:26 -0800 | [diff] [blame] | 86 | "impl/vhal_v2_0/VehicleHalClient.cpp", |
| 87 | "impl/vhal_v2_0/VehicleHalServer.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 88 | "impl/vhal_v2_0/VehicleEmulator.cpp", |
| 89 | "impl/vhal_v2_0/PipeComm.cpp", |
Hao Chen | 1c1fdca | 2019-11-15 14:20:34 -0800 | [diff] [blame] | 90 | "impl/vhal_v2_0/ProtoMessageConverter.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 91 | "impl/vhal_v2_0/SocketComm.cpp", |
Chao Yan | f63c2ca | 2018-04-17 11:32:39 -0700 | [diff] [blame] | 92 | "impl/vhal_v2_0/LinearFakeValueGenerator.cpp", |
| 93 | "impl/vhal_v2_0/JsonFakeValueGenerator.cpp", |
Chao Yan | 0f85dd1 | 2018-06-04 14:03:02 -0700 | [diff] [blame] | 94 | "impl/vhal_v2_0/GeneratorHub.cpp", |
Roman Kiryanov | 4e370a4 | 2021-04-08 12:10:07 -0700 | [diff] [blame] | 95 | "impl/vhal_v2_0/qemu_pipe.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 96 | ], |
| 97 | local_include_dirs: ["common/include/vhal_v2_0"], |
| 98 | export_include_dirs: ["impl"], |
felipeal | 9c998c0 | 2020-04-17 14:32:53 -0700 | [diff] [blame] | 99 | whole_static_libs: [ |
| 100 | "android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib", |
| 101 | "android.hardware.automotive.vehicle@2.0-manager-lib", |
| 102 | ], |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 103 | shared_libs: [ |
| 104 | "libbase", |
Inseob Kim | 31ab19f | 2019-09-10 14:56:19 +0900 | [diff] [blame] | 105 | "libjsoncpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 106 | "libprotobuf-cpp-lite", |
| 107 | ], |
| 108 | static_libs: [ |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 109 | "android.hardware.automotive.vehicle@2.0-libproto-native", |
| 110 | ], |
| 111 | } |
| 112 | |
felipeal | 9c998c0 | 2020-04-17 14:32:53 -0700 | [diff] [blame] | 113 | // Library used to emulate User HAL behavior through lshal debug requests. |
| 114 | cc_library_static { |
| 115 | name: "android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib", |
| 116 | vendor: true, |
Hao Chen | c324db9 | 2020-06-03 18:29:31 -0700 | [diff] [blame] | 117 | defaults: ["vhal_v2_0_target_defaults"], |
felipeal | 9c998c0 | 2020-04-17 14:32:53 -0700 | [diff] [blame] | 118 | srcs: [ |
| 119 | "impl/vhal_v2_0/EmulatedUserHal.cpp", |
| 120 | ], |
Lakshman Annadorai | bfdb1ac | 2020-08-06 14:25:03 -0700 | [diff] [blame] | 121 | whole_static_libs: [ |
| 122 | "android.hardware.automotive.vehicle@2.0-user-hal-helper-lib", |
| 123 | ], |
felipeal | 9c998c0 | 2020-04-17 14:32:53 -0700 | [diff] [blame] | 124 | } |
| 125 | |
Hao Chen | c324db9 | 2020-06-03 18:29:31 -0700 | [diff] [blame] | 126 | // Vehicle HAL Server reference impl lib |
| 127 | cc_library_static { |
| 128 | name: "android.hardware.automotive.vehicle@2.0-server-common-lib", |
| 129 | vendor: true, |
| 130 | host_supported: true, |
| 131 | defaults: ["vhal_v2_0_defaults"], |
| 132 | local_include_dirs: ["common/include/vhal_v2_0"], |
| 133 | export_include_dirs: ["common/include"], |
| 134 | srcs: [ |
| 135 | "common/src/Obd2SensorStore.cpp", |
| 136 | "common/src/VehicleObjectPool.cpp", |
Hao Chen | 945c430 | 2021-05-12 12:21:33 -0700 | [diff] [blame] | 137 | "common/src/VehiclePropertyStore.cpp", |
Hao Chen | c324db9 | 2020-06-03 18:29:31 -0700 | [diff] [blame] | 138 | "common/src/VehicleUtils.cpp", |
| 139 | ], |
| 140 | } |
| 141 | |
| 142 | // Vehicle HAL Server default implementation |
| 143 | cc_library_static { |
| 144 | name: "android.hardware.automotive.vehicle@2.0-server-impl-lib", |
| 145 | vendor: true, |
| 146 | host_supported: true, |
| 147 | defaults: ["vhal_v2_0_defaults"], |
| 148 | local_include_dirs: ["common/include/vhal_v2_0"], |
| 149 | export_include_dirs: ["impl"], |
| 150 | srcs: [ |
Hao Chen | c324db9 | 2020-06-03 18:29:31 -0700 | [diff] [blame] | 151 | "impl/vhal_v2_0/GeneratorHub.cpp", |
| 152 | "impl/vhal_v2_0/JsonFakeValueGenerator.cpp", |
| 153 | "impl/vhal_v2_0/LinearFakeValueGenerator.cpp", |
| 154 | "impl/vhal_v2_0/ProtoMessageConverter.cpp", |
| 155 | "impl/vhal_v2_0/VehicleHalServer.cpp", |
| 156 | ], |
| 157 | whole_static_libs: [ |
| 158 | "android.hardware.automotive.vehicle@2.0-server-common-lib", |
Lakshman Annadorai | bfdb1ac | 2020-08-06 14:25:03 -0700 | [diff] [blame] | 159 | "android.hardware.automotive.vehicle@2.0-user-hal-helper-lib", |
Hao Chen | c324db9 | 2020-06-03 18:29:31 -0700 | [diff] [blame] | 160 | ], |
| 161 | static_libs: [ |
| 162 | "android.hardware.automotive.vehicle@2.0-libproto-native", |
| 163 | ], |
| 164 | shared_libs: [ |
| 165 | "libbase", |
| 166 | "libjsoncpp", |
| 167 | ], |
| 168 | } |
| 169 | |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 170 | cc_test { |
| 171 | name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 172 | vendor: true, |
Hao Chen | c324db9 | 2020-06-03 18:29:31 -0700 | [diff] [blame] | 173 | defaults: ["vhal_v2_0_target_defaults"], |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 174 | whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"], |
| 175 | srcs: [ |
| 176 | "tests/RecurrentTimer_test.cpp", |
| 177 | "tests/SubscriptionManager_test.cpp", |
| 178 | "tests/VehicleHalManager_test.cpp", |
| 179 | "tests/VehicleObjectPool_test.cpp", |
| 180 | "tests/VehiclePropConfigIndex_test.cpp", |
Aditi Nagaraj | 8dcab8e | 2018-01-10 17:10:01 -0800 | [diff] [blame] | 181 | "tests/VmsUtils_test.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 182 | ], |
Felipe Leme | 75a27f8 | 2020-01-31 15:25:55 -0800 | [diff] [blame] | 183 | shared_libs: [ |
| 184 | "libbase", |
| 185 | ], |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 186 | header_libs: ["libbase_headers"], |
Keun Soo YIM | ff84c37 | 2018-11-27 14:04:42 -0800 | [diff] [blame] | 187 | test_suites: ["general-tests"], |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 188 | } |
| 189 | |
Hao Chen | 1c1fdca | 2019-11-15 14:20:34 -0800 | [diff] [blame] | 190 | cc_test { |
| 191 | name: "android.hardware.automotive.vehicle@2.0-default-impl-unit-tests", |
| 192 | vendor: true, |
Hao Chen | c324db9 | 2020-06-03 18:29:31 -0700 | [diff] [blame] | 193 | defaults: ["vhal_v2_0_target_defaults"], |
Hao Chen | 1c1fdca | 2019-11-15 14:20:34 -0800 | [diff] [blame] | 194 | srcs: [ |
| 195 | "impl/vhal_v2_0/tests/ProtoMessageConverter_test.cpp", |
| 196 | ], |
| 197 | static_libs: [ |
| 198 | "android.hardware.automotive.vehicle@2.0-default-impl-lib", |
| 199 | "android.hardware.automotive.vehicle@2.0-libproto-native", |
| 200 | "libprotobuf-cpp-lite", |
| 201 | ], |
| 202 | test_suites: ["general-tests"], |
| 203 | } |
| 204 | |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 205 | cc_binary { |
| 206 | name: "android.hardware.automotive.vehicle@2.0-service", |
Hao Chen | c324db9 | 2020-06-03 18:29:31 -0700 | [diff] [blame] | 207 | defaults: ["vhal_v2_0_target_defaults"], |
Calvin Huang | a653616 | 2020-04-20 12:41:20 -0700 | [diff] [blame] | 208 | vintf_fragments: [ |
| 209 | "android.hardware.automotive.vehicle@2.0-service.xml", |
| 210 | ], |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 211 | init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"], |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 212 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 213 | relative_install_path: "hw", |
| 214 | srcs: ["VehicleService.cpp"], |
| 215 | shared_libs: [ |
| 216 | "libbase", |
Inseob Kim | 31ab19f | 2019-09-10 14:56:19 +0900 | [diff] [blame] | 217 | "libjsoncpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 218 | "libprotobuf-cpp-lite", |
| 219 | ], |
| 220 | static_libs: [ |
| 221 | "android.hardware.automotive.vehicle@2.0-manager-lib", |
| 222 | "android.hardware.automotive.vehicle@2.0-default-impl-lib", |
| 223 | "android.hardware.automotive.vehicle@2.0-libproto-native", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 224 | ], |
| 225 | } |
Ayushi Khopkar | b3057b0 | 2020-08-31 10:59:52 +0530 | [diff] [blame] | 226 | |
| 227 | cc_fuzz { |
| 228 | name: "vehicleManager_fuzzer", |
| 229 | vendor: true, |
| 230 | defaults: ["vhal_v2_0_target_defaults"], |
| 231 | whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"], |
| 232 | srcs: [ |
| 233 | "tests/fuzzer/VehicleManager_fuzzer.cpp", |
| 234 | ], |
| 235 | shared_libs: [ |
| 236 | "libbase", |
| 237 | "libcutils", |
| 238 | "libbinder_ndk", |
| 239 | ], |
| 240 | header_libs: ["libbase_headers"], |
| 241 | local_include_dirs: [ |
| 242 | "common/include", |
| 243 | "tests", |
| 244 | ], |
| 245 | fuzz_config: { |
| 246 | cc: [ |
| 247 | "android-media-fuzzing-reports@google.com", |
| 248 | ], |
| 249 | componentid: 533764, |
| 250 | }, |
| 251 | } |