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