blob: 7efca208339ee79d38ccfdba53b385f9e4d8e964 [file] [log] [blame]
// Copyright (C) 2023 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"],
}
genrule {
name: "VehicleServerProtoStub_h@V1-grpc-trout",
tools: [
"aprotoc",
"protoc-gen-grpc-cpp-plugin",
],
cmd: "$(location aprotoc) -I$$(dirname $(in)) -Ihardware/interfaces/automotive/vehicle/aidl/impl/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",
],
visibility: ["//visibility:private"],
}
genrule {
name: "VehicleServerProtoStub_cc@V1-grpc-trout",
tools: [
"aprotoc",
"protoc-gen-grpc-cpp-plugin",
],
cmd: "$(location aprotoc) -I$$(dirname $(in)) -Ihardware/interfaces/automotive/vehicle/aidl/impl/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",
],
visibility: ["//visibility:private"],
}
cc_library_static {
name: "android.hardware.automotive.vehicle@V1-grpc-trout-libgrpc",
vendor: true,
host_supported: true,
include_dirs: [
"external/protobuf/src",
],
generated_headers: [
"VehicleServerProtoStub_h@V1-grpc-trout",
],
export_generated_headers: [
"VehicleServerProtoStub_h@V1-grpc-trout",
],
generated_sources: [
"VehicleServerProtoStub_cc@V1-grpc-trout",
],
whole_static_libs: [
"VehicleHalProtos",
],
shared_libs: [
"libgrpc++",
],
cflags: [
"-Wno-unused-parameter",
],
}
cc_library_static {
name: "android.hardware.automotive.vehicle@V1-grpc-trout-hardware",
defaults: ["VehicleHalDefaults"],
vendor: true,
srcs: [
"GRPCVehicleHardware.cpp",
],
whole_static_libs: [
"android.hardware.automotive.vehicle@V1-grpc-trout-libgrpc",
],
header_libs: [
"IVehicleHardware",
],
shared_libs: [
"libgrpc++",
"libprotobuf-cpp-full",
],
export_include_dirs: ["."],
cflags: [
"-Wno-unused-parameter",
],
}
cc_binary {
name: "android.hardware.automotive.vehicle@V1-trout-service",
defaults: ["VehicleHalDefaults"],
init_rc: ["android.hardware.automotive.vehicle@V1-trout-service.rc"],
vendor: true,
relative_install_path: "hw",
srcs: [
"VirtualizedVehicleService.cpp",
],
header_libs: [
"IVehicleHardware",
],
static_libs: [
"android.hardware.automotive.utils.vsockinfo",
"android.hardware.automotive.vehicle@V1-grpc-trout-hardware",
"DefaultVehicleHal",
"VehicleHalUtils",
],
shared_libs: [
"libbase",
"libcutils",
"libgrpc++",
"liblog",
"libprotobuf-cpp-full",
],
cflags: [
"-Wno-unused-parameter",
],
vintf_fragments: ["manifest_android.hardware.automotive.vehicle@V1-trout-service.xml"],
}