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", |
| 19 | "libhidltransport", |
| 20 | "liblog", |
| 21 | "libutils", |
| 22 | "android.hardware.automotive.vehicle@2.0", |
| 23 | ], |
| 24 | cflags: [ |
| 25 | "-Wall", |
| 26 | "-Wextra", |
| 27 | "-Werror", |
| 28 | ], |
| 29 | } |
| 30 | |
| 31 | cc_library_headers { |
| 32 | name: "vhal_v2_0_common_headers", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 33 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 34 | export_include_dirs: ["common/include/vhal_v2_0"], |
| 35 | } |
| 36 | |
| 37 | // Vehicle reference implementation lib |
Anthony Mah | a9d8c0d | 2017-10-03 16:22:22 -0700 | [diff] [blame] | 38 | cc_library { |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 39 | name: "android.hardware.automotive.vehicle@2.0-manager-lib", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 40 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 41 | defaults: ["vhal_v2_0_defaults"], |
| 42 | srcs: [ |
Pavel Maltsev | 250139c | 2017-08-24 15:09:41 -0700 | [diff] [blame] | 43 | "common/src/Obd2SensorStore.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 44 | "common/src/SubscriptionManager.cpp", |
| 45 | "common/src/VehicleHalManager.cpp", |
| 46 | "common/src/VehicleObjectPool.cpp", |
| 47 | "common/src/VehiclePropertyStore.cpp", |
| 48 | "common/src/VehicleUtils.cpp", |
Aditi Nagaraj | 8dcab8e | 2018-01-10 17:10:01 -0800 | [diff] [blame] | 49 | "common/src/VmsUtils.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 50 | ], |
| 51 | local_include_dirs: ["common/include/vhal_v2_0"], |
| 52 | export_include_dirs: ["common/include"], |
| 53 | } |
| 54 | |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 55 | // Vehicle default VehicleHAL implementation |
| 56 | cc_library_static { |
| 57 | name: "android.hardware.automotive.vehicle@2.0-default-impl-lib", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 58 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 59 | defaults: ["vhal_v2_0_defaults"], |
| 60 | srcs: [ |
| 61 | "impl/vhal_v2_0/EmulatedVehicleHal.cpp", |
| 62 | "impl/vhal_v2_0/VehicleEmulator.cpp", |
| 63 | "impl/vhal_v2_0/PipeComm.cpp", |
| 64 | "impl/vhal_v2_0/SocketComm.cpp", |
Chao Yan | f63c2ca | 2018-04-17 11:32:39 -0700 | [diff] [blame^] | 65 | "impl/vhal_v2_0/LinearFakeValueGenerator.cpp", |
| 66 | "impl/vhal_v2_0/JsonFakeValueGenerator.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 67 | ], |
| 68 | local_include_dirs: ["common/include/vhal_v2_0"], |
| 69 | export_include_dirs: ["impl"], |
| 70 | whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"], |
| 71 | shared_libs: [ |
| 72 | "libbase", |
| 73 | "libprotobuf-cpp-lite", |
| 74 | ], |
| 75 | static_libs: [ |
Chao Yan | f63c2ca | 2018-04-17 11:32:39 -0700 | [diff] [blame^] | 76 | "libjsoncpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 77 | "libqemu_pipe", |
| 78 | "android.hardware.automotive.vehicle@2.0-libproto-native", |
| 79 | ], |
| 80 | } |
| 81 | |
| 82 | cc_test { |
| 83 | name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 84 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 85 | defaults: ["vhal_v2_0_defaults"], |
| 86 | whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"], |
| 87 | srcs: [ |
| 88 | "tests/RecurrentTimer_test.cpp", |
| 89 | "tests/SubscriptionManager_test.cpp", |
| 90 | "tests/VehicleHalManager_test.cpp", |
| 91 | "tests/VehicleObjectPool_test.cpp", |
| 92 | "tests/VehiclePropConfigIndex_test.cpp", |
Aditi Nagaraj | 8dcab8e | 2018-01-10 17:10:01 -0800 | [diff] [blame] | 93 | "tests/VmsUtils_test.cpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 94 | ], |
| 95 | header_libs: ["libbase_headers"], |
| 96 | } |
| 97 | |
| 98 | cc_binary { |
| 99 | name: "android.hardware.automotive.vehicle@2.0-service", |
| 100 | defaults: ["vhal_v2_0_defaults"], |
| 101 | init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"], |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 102 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 103 | relative_install_path: "hw", |
| 104 | srcs: ["VehicleService.cpp"], |
| 105 | shared_libs: [ |
| 106 | "libbase", |
| 107 | "libprotobuf-cpp-lite", |
| 108 | ], |
| 109 | static_libs: [ |
| 110 | "android.hardware.automotive.vehicle@2.0-manager-lib", |
| 111 | "android.hardware.automotive.vehicle@2.0-default-impl-lib", |
| 112 | "android.hardware.automotive.vehicle@2.0-libproto-native", |
Chao Yan | f63c2ca | 2018-04-17 11:32:39 -0700 | [diff] [blame^] | 113 | "libjsoncpp", |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 114 | "libqemu_pipe", |
| 115 | ], |
| 116 | } |