Yu Shan | cb6afed | 2022-08-04 16:58:28 -0700 | [diff] [blame^] | 1 | // Copyright (C) 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 | |
| 15 | genrule { |
| 16 | name: "wakeup_client_pb_h", |
| 17 | tools: [ |
| 18 | "aprotoc", |
| 19 | "protoc-gen-grpc-cpp-plugin", |
| 20 | ], |
| 21 | cmd: "$(location aprotoc) -I$$(dirname $(in)) -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)", |
| 22 | srcs: [ |
| 23 | "wakeup_client.proto", |
| 24 | ], |
| 25 | out: [ |
| 26 | "wakeup_client.pb.h", |
| 27 | ], |
| 28 | } |
| 29 | |
| 30 | genrule { |
| 31 | name: "wakeup_client_pb_cc", |
| 32 | tools: [ |
| 33 | "aprotoc", |
| 34 | "protoc-gen-grpc-cpp-plugin", |
| 35 | ], |
| 36 | cmd: "$(location aprotoc) -I$$(dirname $(in)) -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)", |
| 37 | srcs: [ |
| 38 | "wakeup_client.proto", |
| 39 | ], |
| 40 | out: [ |
| 41 | "wakeup_client.pb.cc", |
| 42 | ], |
| 43 | } |
| 44 | |
| 45 | cc_library_static { |
| 46 | name: "wakeup_client_protos", |
| 47 | vendor: true, |
| 48 | host_supported: true, |
| 49 | include_dirs: [ |
| 50 | "external/protobuf/src", |
| 51 | ], |
| 52 | generated_headers: [ |
| 53 | "wakeup_client_pb_h", |
| 54 | ], |
| 55 | export_generated_headers: [ |
| 56 | "wakeup_client_pb_h", |
| 57 | ], |
| 58 | generated_sources: [ |
| 59 | "wakeup_client_pb_cc", |
| 60 | ], |
| 61 | shared_libs: [ |
| 62 | "libgrpc++", |
| 63 | "libprotobuf-cpp-full", |
| 64 | ], |
| 65 | cflags: [ |
| 66 | "-Wno-unused-parameter", |
| 67 | ], |
| 68 | } |