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", |
Yu Shan | e297456 | 2022-08-10 18:37:03 -0700 | [diff] [blame^] | 27 | "wakeup_client.grpc.pb.h", |
Yu Shan | cb6afed | 2022-08-04 16:58:28 -0700 | [diff] [blame] | 28 | ], |
Yu Shan | e297456 | 2022-08-10 18:37:03 -0700 | [diff] [blame^] | 29 | vendor: true, |
Yu Shan | cb6afed | 2022-08-04 16:58:28 -0700 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | genrule { |
| 33 | name: "wakeup_client_pb_cc", |
| 34 | tools: [ |
| 35 | "aprotoc", |
| 36 | "protoc-gen-grpc-cpp-plugin", |
| 37 | ], |
| 38 | 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)", |
| 39 | srcs: [ |
| 40 | "wakeup_client.proto", |
| 41 | ], |
| 42 | out: [ |
| 43 | "wakeup_client.pb.cc", |
Yu Shan | e297456 | 2022-08-10 18:37:03 -0700 | [diff] [blame^] | 44 | "wakeup_client.grpc.pb.cc", |
Yu Shan | cb6afed | 2022-08-04 16:58:28 -0700 | [diff] [blame] | 45 | ], |
Yu Shan | e297456 | 2022-08-10 18:37:03 -0700 | [diff] [blame^] | 46 | vendor: true, |
Yu Shan | cb6afed | 2022-08-04 16:58:28 -0700 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | cc_library_static { |
| 50 | name: "wakeup_client_protos", |
| 51 | vendor: true, |
| 52 | host_supported: true, |
| 53 | include_dirs: [ |
| 54 | "external/protobuf/src", |
| 55 | ], |
| 56 | generated_headers: [ |
| 57 | "wakeup_client_pb_h", |
| 58 | ], |
| 59 | export_generated_headers: [ |
| 60 | "wakeup_client_pb_h", |
| 61 | ], |
| 62 | generated_sources: [ |
| 63 | "wakeup_client_pb_cc", |
| 64 | ], |
| 65 | shared_libs: [ |
| 66 | "libgrpc++", |
| 67 | "libprotobuf-cpp-full", |
| 68 | ], |
| 69 | cflags: [ |
| 70 | "-Wno-unused-parameter", |
| 71 | ], |
| 72 | } |