1// Copyright 2022 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 15package { 16 // See: http://go/android-license-faq 17 // A large-scale-change added 'default_applicable_licenses' to import 18 // all of the 'license_kinds' from "tools_netsim_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: ["tools_netsim_license"], 22} 23 24cc_library { 25 name: "lib-netsim-frontend-proto", 26 host_supported: true, 27 proto: { 28 export_proto_headers: true, 29 type: "full", 30 canonical_path_from_root: false, 31 include_dirs: ["external/protobuf/src"], 32 }, 33 srcs: [ 34 "common.proto", 35 "frontend.proto", 36 "model.proto", 37 "startup.proto", 38 "hci_packet.proto", 39 ], 40} 41 42genrule { 43 name: "FrontendStub_h", 44 tools: [ 45 "aprotoc", 46 "protoc-gen-grpc-cpp-plugin", 47 ], 48 cmd: "$(location aprotoc) -Itools/netsim/src/proto -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)", 49 srcs: [ 50 "frontend.proto", 51 ], 52 out: [ 53 "frontend.grpc.pb.h", 54 "frontend.pb.h", 55 ], 56} 57 58genrule { 59 name: "FrontendStub_cc", 60 tools: [ 61 "aprotoc", 62 "protoc-gen-grpc-cpp-plugin", 63 ], 64 cmd: "$(location aprotoc) -Itools/netsim/src/proto -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)", 65 srcs: [ 66 "frontend.proto", 67 ], 68 out: [ 69 "frontend.grpc.pb.cc", 70 "frontend.pb.cc", 71 ], 72} 73