blob: d3c75a65f2418527ee7832299236baa851b81006 [file] [log] [blame]
Yu Shancb6afed2022-08-04 16:58:28 -07001// 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
15genrule {
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 Shane2974562022-08-10 18:37:03 -070027 "wakeup_client.grpc.pb.h",
Yu Shancb6afed2022-08-04 16:58:28 -070028 ],
Yu Shane2974562022-08-10 18:37:03 -070029 vendor: true,
Yu Shancb6afed2022-08-04 16:58:28 -070030}
31
32genrule {
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 Shane2974562022-08-10 18:37:03 -070044 "wakeup_client.grpc.pb.cc",
Yu Shancb6afed2022-08-04 16:58:28 -070045 ],
Yu Shane2974562022-08-10 18:37:03 -070046 vendor: true,
Yu Shancb6afed2022-08-04 16:58:28 -070047}
48
49cc_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}