1// Copyright (C) 2020 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_library_static { 16 name: "android.hardware.automotive.vehicle@2.0-virtualization-utils", 17 vendor: true, 18 host_supported: true, 19 defaults: ["vhal_v2_0_defaults"], 20 srcs: [ 21 "Utils.cpp", 22 ], 23 static_libs: [ 24 "android.hardware.automotive.utils.vsockinfo", 25 ], 26 shared_libs: [ 27 "libbase", 28 ], 29} 30 31cc_library_static { 32 name: "android.hardware.automotive.vehicle@2.0-grpc-trout", 33 vendor: true, 34 host_supported: true, 35 include_dirs: [ 36 "external/protobuf/src", 37 ], 38 generated_headers: [ 39 "DefaultVehicleHalProtoStub_h", 40 "VehicleServerProtoStub_h", 41 ], 42 export_generated_headers: [ 43 "DefaultVehicleHalProtoStub_h", 44 "VehicleServerProtoStub_h", 45 ], 46 generated_sources: [ 47 "DefaultVehicleHalProtoStub_cc", 48 "VehicleServerProtoStub_cc", 49 ], 50 shared_libs: [ 51 "libgrpc++_unsecure", 52 ], 53 cflags: [ 54 "-Wno-unused-parameter", 55 ], 56} 57 58genrule { 59 name: "VehicleServerProtoStub_h", 60 tools: [ 61 "aprotoc", 62 "protoc-gen-grpc-cpp-plugin", 63 ], 64 cmd: "$(location aprotoc) -I$$(dirname $(in)) -Ihardware/interfaces/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)", 65 srcs: [ 66 "proto/VehicleServer.proto", 67 ], 68 out: [ 69 "VehicleServer.pb.h", 70 "VehicleServer.grpc.pb.h", 71 ], 72} 73 74genrule { 75 name: "VehicleServerProtoStub_cc", 76 tools: [ 77 "aprotoc", 78 "protoc-gen-grpc-cpp-plugin", 79 ], 80 cmd: "$(location aprotoc) -I$$(dirname $(in)) -Ihardware/interfaces/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)", 81 srcs: [ 82 "proto/VehicleServer.proto", 83 ], 84 out: [ 85 "VehicleServer.pb.cc", 86 "VehicleServer.grpc.pb.cc", 87 ], 88} 89 90cc_library_static { 91 name: "android.hardware.automotive.vehicle@2.0-virtualization-client-lib", 92 defaults: ["vhal_v2_0_target_defaults"], 93 vendor: true, 94 srcs: [ 95 "GrpcVehicleClient.cpp", 96 ], 97 whole_static_libs: [ 98 "android.hardware.automotive.utils.vsockinfo", 99 "android.hardware.automotive.vehicle@2.0-manager-lib", 100 "android.hardware.automotive.vehicle@2.0-default-impl-lib", 101 "android.hardware.automotive.vehicle@2.0-grpc-trout", 102 "android.hardware.automotive.vehicle@2.0-virtualization-utils", 103 ], 104 shared_libs: [ 105 "libgrpc++", 106 "libprotobuf-cpp-full", 107 ], 108 export_include_dirs: ["."], 109 cflags: [ 110 "-Wno-unused-parameter", 111 ], 112} 113 114cc_library_static { 115 name: "android.hardware.automotive.vehicle@2.0-virtualization-grpc-server-lib", 116 defaults: ["vhal_v2_0_defaults"], 117 host_supported: true, 118 vendor: true, 119 srcs: [ 120 "GarageModeServerSideHandler.cpp", 121 "GrpcVehicleServer.cpp", 122 "PowerStateListener.cpp", 123 ], 124 whole_static_libs: [ 125 "android.hardware.automotive.utils.vsockinfo", 126 "android.hardware.automotive.vehicle@2.0-grpc-trout", 127 "android.hardware.automotive.vehicle@2.0-server-impl-lib", 128 "android.hardware.automotive.vehicle@2.0-virtualization-utils", 129 ], 130 shared_libs: [ 131 "libgrpc++", 132 "libprotobuf-cpp-full", 133 ], 134 export_include_dirs: ["."], 135 cflags: [ 136 "-Wno-unused-parameter", 137 ], 138} 139 140cc_binary { 141 name: "android.hardware.automotive.vehicle@2.0-virtualization-service", 142 defaults: ["vhal_v2_0_target_defaults"], 143 init_rc: ["android.hardware.automotive.vehicle@2.0-virtualization-service.rc"], 144 vendor: true, 145 relative_install_path: "hw", 146 srcs: [ 147 "VirtualizedVehicleService.cpp", 148 "WatchdogClient.cpp", 149 ], 150 shared_libs: [ 151 "android.hardware.automotive.utils.watchdog", 152 "libbase", 153 "libcutils", 154 "libjsoncpp", 155 "libprotobuf-cpp-full", 156 "libgrpc++", 157 ], 158 static_libs: [ 159 "android.hardware.automotive.vehicle@2.0-virtualization-client-lib", 160 "libqemu_pipe", 161 ], 162 cflags: [ 163 "-Wno-unused-parameter", 164 ], 165 vintf_fragments: ["manifest_android.hardware.automotive.vehicle@2.0-virtualization-service.xml"], 166} 167 168cc_binary { 169 name: "android.hardware.automotive.vehicle@2.0-virtualization-grpc-server", 170 init_rc: ["android.hardware.automotive.vehicle@2.0-virtualization-grpc-server.rc"], 171 defaults: ["vhal_v2_0_defaults"], 172 host_supported: true, 173 vendor: true, 174 srcs: [ 175 "VirtualizationGrpcServer.cpp", 176 ], 177 shared_libs: [ 178 "libbase", 179 "libjsoncpp", 180 "libprotobuf-cpp-full", 181 "libgrpc++", 182 ], 183 static_libs: [ 184 "android.hardware.automotive.vehicle@2.0-virtualization-grpc-server-lib", 185 ], 186} 187