// Copyright (C) 2020 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package { default_applicable_licenses: ["Android-Apache-2.0"], } cc_library_static { name: "android.hardware.automotive.vehicle@2.0-virtualization-utils", vendor: true, host_supported: true, defaults: ["vhal_v2_0_defaults"], srcs: [ "Utils.cpp", ], static_libs: [ "android.hardware.automotive.utils.vsockinfo", ], shared_libs: [ "libbase", ], } cc_library_static { name: "android.hardware.automotive.vehicle@2.0-grpc-trout", vendor: true, host_supported: true, include_dirs: [ "external/protobuf/src", ], generated_headers: [ "DefaultVehicleHalProtoStub_h", "VehicleServerProtoStub_h", ], export_generated_headers: [ "DefaultVehicleHalProtoStub_h", "VehicleServerProtoStub_h", ], generated_sources: [ "DefaultVehicleHalProtoStub_cc", "VehicleServerProtoStub_cc", ], shared_libs: [ "libgrpc++_unsecure", ], cflags: [ "-Wno-unused-parameter", ], } genrule { name: "VehicleServerProtoStub_h", tools: [ "aprotoc", "protoc-gen-grpc-cpp-plugin", ], 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)", srcs: [ "proto/VehicleServer.proto", ], out: [ "VehicleServer.pb.h", "VehicleServer.grpc.pb.h", ], } genrule { name: "VehicleServerProtoStub_cc", tools: [ "aprotoc", "protoc-gen-grpc-cpp-plugin", ], 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)", srcs: [ "proto/VehicleServer.proto", ], out: [ "VehicleServer.pb.cc", "VehicleServer.grpc.pb.cc", ], } cc_library_static { name: "android.hardware.automotive.vehicle@2.0-virtualization-client-lib", defaults: ["vhal_v2_0_target_defaults"], vendor: true, srcs: [ "GrpcVehicleClient.cpp", ], whole_static_libs: [ "android.hardware.automotive.utils.vsockinfo", "android.hardware.automotive.vehicle@2.0-manager-lib", "android.hardware.automotive.vehicle@2.0-default-impl-lib", "android.hardware.automotive.vehicle@2.0-grpc-trout", "android.hardware.automotive.vehicle@2.0-virtualization-utils", ], shared_libs: [ "libgrpc++", "libprotobuf-cpp-full", ], export_include_dirs: ["."], cflags: [ "-Wno-unused-parameter", ], } cc_library_static { name: "android.hardware.automotive.vehicle@2.0-virtualization-grpc-server-lib", defaults: ["vhal_v2_0_defaults"], host_supported: true, vendor: true, srcs: [ "GarageModeServerSideHandler.cpp", "GrpcVehicleServer.cpp", "PowerStateListener.cpp", ], whole_static_libs: [ "android.hardware.automotive.utils.vsockinfo", "android.hardware.automotive.vehicle@2.0-grpc-trout", "android.hardware.automotive.vehicle@2.0-server-impl-lib", "android.hardware.automotive.vehicle@2.0-virtualization-utils", ], shared_libs: [ "libgrpc++", "libprotobuf-cpp-full", ], export_include_dirs: ["."], cflags: [ "-Wno-unused-parameter", ], } cc_binary { name: "android.hardware.automotive.vehicle@2.0-virtualization-service", defaults: ["vhal_v2_0_target_defaults"], init_rc: ["android.hardware.automotive.vehicle@2.0-virtualization-service.rc"], vendor: true, relative_install_path: "hw", srcs: [ "VirtualizedVehicleService.cpp", ], shared_libs: [ "libbase", "libcutils", "libjsoncpp", "libprotobuf-cpp-full", "libgrpc++", ], static_libs: [ "android.hardware.automotive.vehicle@2.0-virtualization-client-lib", ], cflags: [ "-Wno-unused-parameter", ], vintf_fragments: ["manifest_android.hardware.automotive.vehicle@2.0-virtualization-service.xml"], } cc_binary { name: "android.hardware.automotive.vehicle@2.0-virtualization-grpc-server", init_rc: ["android.hardware.automotive.vehicle@2.0-virtualization-grpc-server.rc"], defaults: ["vhal_v2_0_defaults"], host_supported: true, vendor: true, srcs: [ "VirtualizationGrpcServer.cpp", ], shared_libs: [ "libbase", "libjsoncpp", "libprotobuf-cpp-full", "libgrpc++", ], static_libs: [ "android.hardware.automotive.vehicle@2.0-virtualization-grpc-server-lib", ], }