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 |
| 38 | cc_library_static { |
| 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: [ |
| 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", |
| 48 | ], |
| 49 | local_include_dirs: ["common/include/vhal_v2_0"], |
| 50 | export_include_dirs: ["common/include"], |
| 51 | } |
| 52 | |
| 53 | cc_library_shared { |
| 54 | name: "android.hardware.automotive.vehicle@2.0-manager-lib-shared", |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 55 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 56 | static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"], |
| 57 | export_static_lib_headers: ["android.hardware.automotive.vehicle@2.0-manager-lib"], |
| 58 | } |
| 59 | |
| 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: [ |
| 66 | "impl/vhal_v2_0/EmulatedVehicleHal.cpp", |
| 67 | "impl/vhal_v2_0/VehicleEmulator.cpp", |
| 68 | "impl/vhal_v2_0/PipeComm.cpp", |
| 69 | "impl/vhal_v2_0/SocketComm.cpp", |
| 70 | ], |
| 71 | local_include_dirs: ["common/include/vhal_v2_0"], |
| 72 | export_include_dirs: ["impl"], |
| 73 | whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"], |
| 74 | shared_libs: [ |
| 75 | "libbase", |
| 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", |
| 95 | ], |
| 96 | header_libs: ["libbase_headers"], |
| 97 | } |
| 98 | |
| 99 | cc_binary { |
| 100 | name: "android.hardware.automotive.vehicle@2.0-service", |
| 101 | defaults: ["vhal_v2_0_defaults"], |
| 102 | init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"], |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 103 | vendor: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 104 | relative_install_path: "hw", |
| 105 | srcs: ["VehicleService.cpp"], |
| 106 | shared_libs: [ |
| 107 | "libbase", |
| 108 | "libprotobuf-cpp-lite", |
| 109 | ], |
| 110 | static_libs: [ |
| 111 | "android.hardware.automotive.vehicle@2.0-manager-lib", |
| 112 | "android.hardware.automotive.vehicle@2.0-default-impl-lib", |
| 113 | "android.hardware.automotive.vehicle@2.0-libproto-native", |
| 114 | "libqemu_pipe", |
| 115 | ], |
| 116 | } |