blob: 31b9d0ebce70f8c36c7c2c2cb51d85efd08c975f [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
Bob Badour9fab4912022-09-29 11:59:23 -070015package {
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 "hardware_interfaces_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["hardware_interfaces_license"],
22}
23
Yu Shancb6afed2022-08-04 16:58:28 -070024genrule {
25 name: "wakeup_client_pb_h",
26 tools: [
27 "aprotoc",
28 "protoc-gen-grpc-cpp-plugin",
29 ],
30 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)",
31 srcs: [
32 "wakeup_client.proto",
33 ],
34 out: [
35 "wakeup_client.pb.h",
Yu Shane2974562022-08-10 18:37:03 -070036 "wakeup_client.grpc.pb.h",
Yu Shancb6afed2022-08-04 16:58:28 -070037 ],
Yu Shane2974562022-08-10 18:37:03 -070038 vendor: true,
Yu Shancb6afed2022-08-04 16:58:28 -070039}
40
41genrule {
42 name: "wakeup_client_pb_cc",
43 tools: [
44 "aprotoc",
45 "protoc-gen-grpc-cpp-plugin",
46 ],
47 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)",
48 srcs: [
49 "wakeup_client.proto",
50 ],
51 out: [
52 "wakeup_client.pb.cc",
Yu Shane2974562022-08-10 18:37:03 -070053 "wakeup_client.grpc.pb.cc",
Yu Shancb6afed2022-08-04 16:58:28 -070054 ],
Yu Shane2974562022-08-10 18:37:03 -070055 vendor: true,
Yu Shancb6afed2022-08-04 16:58:28 -070056}
57
58cc_library_static {
59 name: "wakeup_client_protos",
60 vendor: true,
61 host_supported: true,
62 include_dirs: [
63 "external/protobuf/src",
64 ],
65 generated_headers: [
66 "wakeup_client_pb_h",
67 ],
68 export_generated_headers: [
69 "wakeup_client_pb_h",
70 ],
71 generated_sources: [
72 "wakeup_client_pb_cc",
73 ],
74 shared_libs: [
75 "libgrpc++",
76 "libprotobuf-cpp-full",
77 ],
78 cflags: [
79 "-Wno-unused-parameter",
80 ],
81}