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 | ], |
| 50 | local_include_dirs: ["common/include/vhal_v2_0"], |
| 51 | export_include_dirs: ["common/include"], |
| 52 | } |
| 53 | |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 54 | // Vehicle default VehicleHAL implementation |
| 55 | cc_library_static { |
| 56 | name: "android.hardware.automotive.vehicle@2.0-default-impl-lib", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 57 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 58 | defaults: ["vhal_v2_0_defaults"], |
| 59 | srcs: [ |
Dean Harding | bea881c | 2018-06-15 13:33:47 -0700 | [diff] [blame] | 60 | "impl/vhal_v2_0/CommConn.cpp", |
Hao Chen | fba3ac8 | 2019-11-07 11:55:25 -0800 | [diff] [blame] | 61 | "impl/vhal_v2_0/EmulatedVehicleConnector.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 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", |
Chao Yan | f63c2ca | 2018-04-17 11:32:39 -0700 | [diff] [blame] | 66 | "impl/vhal_v2_0/LinearFakeValueGenerator.cpp", |
| 67 | "impl/vhal_v2_0/JsonFakeValueGenerator.cpp", |
Chao Yan | 0f85dd1 | 2018-06-04 14:03:02 -0700 | [diff] [blame] | 68 | "impl/vhal_v2_0/GeneratorHub.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 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", |
Inseob Kim | 31ab19f | 2019-09-10 14:56:19 +0900 | [diff] [blame] | 75 | "libjsoncpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 76 | "libprotobuf-cpp-lite", |
| 77 | ], |
| 78 | static_libs: [ |
| 79 | "libqemu_pipe", |
| 80 | "android.hardware.automotive.vehicle@2.0-libproto-native", |
| 81 | ], |
| 82 | } |
| 83 | |
| 84 | cc_test { |
| 85 | name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 86 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 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", |
Aditi Nagaraj | 8dcab8e | 2018-01-10 17:10:01 -0800 | [diff] [blame] | 95 | "tests/VmsUtils_test.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 96 | ], |
| 97 | header_libs: ["libbase_headers"], |
Keun Soo YIM | ff84c37 | 2018-11-27 14:04:42 -0800 | [diff] [blame] | 98 | test_suites: ["general-tests"], |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 99 | } |
| 100 | |
| 101 | cc_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"], |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 105 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 106 | relative_install_path: "hw", |
| 107 | srcs: ["VehicleService.cpp"], |
| 108 | shared_libs: [ |
| 109 | "libbase", |
Inseob Kim | 31ab19f | 2019-09-10 14:56:19 +0900 | [diff] [blame] | 110 | "libjsoncpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 111 | "libprotobuf-cpp-lite", |
| 112 | ], |
| 113 | static_libs: [ |
| 114 | "android.hardware.automotive.vehicle@2.0-manager-lib", |
| 115 | "android.hardware.automotive.vehicle@2.0-default-impl-lib", |
| 116 | "android.hardware.automotive.vehicle@2.0-libproto-native", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 117 | "libqemu_pipe", |
| 118 | ], |
| 119 | } |