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