1// Copyright (C) 2018 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 15 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20cc_binary { 21 name: "gnss_grpc_proxy", 22 srcs: [ 23 "gnss_grpc_proxy.cpp", 24 ], 25 cflags: [ 26 "-Wno-unused-parameter", 27 "-D_XOPEN_SOURCE", 28 ], 29 generated_headers: [ 30 "GnssGrpcProxyStub_h", 31 ], 32 generated_sources: [ 33 "GnssGrpcProxyStub_cc", 34 ], 35 shared_libs: [ 36 "libbase", 37 "libcuttlefish_fs", 38 "libcuttlefish_utils", 39 "libjsoncpp", 40 "libprotobuf-cpp-full", 41 "libgrpc++_unsecure", 42 ], 43 static_libs: [ 44 "libcuttlefish_host_config", 45 "libgflags", 46 ], 47 defaults: ["cuttlefish_host"], 48 include_dirs: [ 49 "external/grpc-grpc/include", 50 "external/protobuf/src", 51 ], 52} 53 54filegroup { 55 name: "GnssGrpcProxyProto", 56 srcs: [ 57 "gnss_grpc_proxy.proto", 58 ], 59} 60 61genrule { 62 name: "GnssGrpcProxyStub_h", 63 tools: [ 64 "aprotoc", 65 "protoc-gen-grpc-cpp-plugin", 66 ], 67 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)", 68 srcs: [ 69 ":GnssGrpcProxyProto", 70 ], 71 out: [ 72 "gnss_grpc_proxy.grpc.pb.h", 73 "gnss_grpc_proxy.pb.h", 74 ], 75} 76 77genrule { 78 name: "GnssGrpcProxyStub_cc", 79 tools: [ 80 "aprotoc", 81 "protoc-gen-grpc-cpp-plugin", 82 ], 83 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)", 84 srcs: [ 85 ":GnssGrpcProxyProto", 86 ], 87 out: [ 88 "gnss_grpc_proxy.grpc.pb.cc", 89 "gnss_grpc_proxy.pb.cc", 90 ], 91} 92