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 15cc_defaults { 16 name: "vhal_v2_0_defaults", 17 shared_libs: [ 18 "libhidlbase", 19 "liblog", 20 "libutils", 21 "android.hardware.automotive.vehicle@2.0", 22 ], 23 cflags: [ 24 "-Wall", 25 "-Wextra", 26 "-Werror", 27 ], 28} 29 30cc_library_headers { 31 name: "vhal_v2_0_common_headers", 32 vendor: true, 33 export_include_dirs: ["common/include/vhal_v2_0"], 34} 35 36// Vehicle reference implementation lib 37cc_library { 38 name: "android.hardware.automotive.vehicle@2.0-manager-lib", 39 vendor: true, 40 defaults: ["vhal_v2_0_defaults"], 41 srcs: [ 42 "common/src/Obd2SensorStore.cpp", 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 "common/src/VmsUtils.cpp", 49 ], 50 local_include_dirs: ["common/include/vhal_v2_0"], 51 export_include_dirs: ["common/include"], 52} 53 54// Vehicle default VehicleHAL implementation 55cc_library_static { 56 name: "android.hardware.automotive.vehicle@2.0-default-impl-lib", 57 vendor: true, 58 defaults: ["vhal_v2_0_defaults"], 59 srcs: [ 60 "impl/vhal_v2_0/CommConn.cpp", 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", 65 "impl/vhal_v2_0/LinearFakeValueGenerator.cpp", 66 "impl/vhal_v2_0/JsonFakeValueGenerator.cpp", 67 "impl/vhal_v2_0/GeneratorHub.cpp", 68 ], 69 local_include_dirs: ["common/include/vhal_v2_0"], 70 export_include_dirs: ["impl"], 71 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"], 72 shared_libs: [ 73 "libbase", 74 "libjsoncpp", 75 "libprotobuf-cpp-lite", 76 ], 77 static_libs: [ 78 "libqemu_pipe", 79 "android.hardware.automotive.vehicle@2.0-libproto-native", 80 ], 81} 82 83cc_test { 84 name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests", 85 vendor: true, 86 defaults: ["vhal_v2_0_defaults"], 87 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"], 88 srcs: [ 89 "tests/RecurrentTimer_test.cpp", 90 "tests/SubscriptionManager_test.cpp", 91 "tests/VehicleHalManager_test.cpp", 92 "tests/VehicleObjectPool_test.cpp", 93 "tests/VehiclePropConfigIndex_test.cpp", 94 "tests/VmsUtils_test.cpp", 95 ], 96 header_libs: ["libbase_headers"], 97 test_suites: ["general-tests"], 98} 99 100cc_binary { 101 name: "android.hardware.automotive.vehicle@2.0-service", 102 defaults: ["vhal_v2_0_defaults"], 103 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"], 104 vendor: true, 105 relative_install_path: "hw", 106 srcs: ["VehicleService.cpp"], 107 shared_libs: [ 108 "libbase", 109 "libjsoncpp", 110 "libprotobuf-cpp-lite", 111 ], 112 static_libs: [ 113 "android.hardware.automotive.vehicle@2.0-manager-lib", 114 "android.hardware.automotive.vehicle@2.0-default-impl-lib", 115 "android.hardware.automotive.vehicle@2.0-libproto-native", 116 "libqemu_pipe", 117 ], 118} 119