xref: /aosp_15_r20/hardware/interfaces/automotive/remoteaccess/hal/default/proto/Android.bp (revision 4d7e907c777eeecc4c5bd7cf640a754fac206ff7)
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
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 "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
24genrule {
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",
36        "wakeup_client.grpc.pb.h",
37    ],
38}
39
40genrule {
41    name: "wakeup_client_pb_cc",
42    tools: [
43        "aprotoc",
44        "protoc-gen-grpc-cpp-plugin",
45    ],
46    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)",
47    srcs: [
48        "wakeup_client.proto",
49    ],
50    out: [
51        "wakeup_client.pb.cc",
52        "wakeup_client.grpc.pb.cc",
53    ],
54}
55
56cc_library_static {
57    name: "wakeup_client_protos",
58    vendor_available: true,
59    host_supported: true,
60    include_dirs: [
61        "external/protobuf/src",
62    ],
63    generated_headers: [
64        "wakeup_client_pb_h",
65    ],
66    export_generated_headers: [
67        "wakeup_client_pb_h",
68    ],
69    generated_sources: [
70        "wakeup_client_pb_cc",
71    ],
72    shared_libs: [
73        "libgrpc++",
74        "libprotobuf-cpp-full",
75    ],
76    cflags: [
77        "-Wno-unused-parameter",
78    ],
79}
80