blob: f4902388a28024b9cb6d6ba2b60f78420a165922 [file] [log] [blame]
// Copyright (C) 2018 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: "libcvd_gnss_grpc_proxy",
shared_libs: [
"libext2_blkid",
"libbase",
"libcuttlefish_fs",
"libcuttlefish_utils",
"libjsoncpp",
"libprotobuf-cpp-full",
"libgrpc++_unsecure",
],
static_libs: [
"libcuttlefish_host_config",
"libgflags",
],
cflags: [
"-Wno-unused-parameter",
"-D_XOPEN_SOURCE",
],
generated_headers: [
"GnssGrpcProxyStub_h",
],
generated_sources: [
"GnssGrpcProxyStub_cc",
],
export_generated_headers: [
"GnssGrpcProxyStub_h",
],
defaults: ["cuttlefish_host"],
include_dirs: [
"external/grpc-grpc/include",
"external/protobuf/src",
],
}
cc_binary {
name: "gnss_grpc_proxy",
shared_libs: [
"libext2_blkid",
"libbase",
"libcuttlefish_fs",
"libcuttlefish_utils",
"libjsoncpp",
"libprotobuf-cpp-full",
"libgrpc++_unsecure",
],
static_libs: [
"libcuttlefish_host_config",
"libgflags",
"libcvd_gnss_grpc_proxy",
],
srcs: [
"gnss_grpc_proxy.cpp",
],
cflags: [
"-Wno-unused-parameter",
"-D_XOPEN_SOURCE",
],
defaults: ["cuttlefish_host"],
}
filegroup {
name: "GnssGrpcProxyProto",
srcs: [
"gnss_grpc_proxy.proto",
],
}
genrule {
name: "GnssGrpcProxyStub_h",
tools: [
"aprotoc",
"protoc-gen-grpc-cpp-plugin",
],
cmd: "$(location aprotoc) -Idevice/google/cuttlefish/host/commands/gnss_grpc_proxy -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)",
srcs: [
":GnssGrpcProxyProto",
],
out: [
"gnss_grpc_proxy.grpc.pb.h",
"gnss_grpc_proxy.pb.h",
],
}
genrule {
name: "GnssGrpcProxyStub_cc",
tools: [
"aprotoc",
"protoc-gen-grpc-cpp-plugin",
],
cmd: "$(location aprotoc) -Idevice/google/cuttlefish/host/commands/gnss_grpc_proxy -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)",
srcs: [
":GnssGrpcProxyProto",
],
out: [
"gnss_grpc_proxy.grpc.pb.cc",
"gnss_grpc_proxy.pb.cc",
],
}