blob: b2edf753b8f8984cc27ec5dd0e011820fe68943d [file] [log] [blame]
Yu Shana2bbcd22021-09-09 18:06:03 -07001/*
2 * Copyright (C) 2021 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Bob Badour47589e02021-10-07 16:13:14 -070017package {
18 // See: http://go/android-license-faq
19 // A large-scale-change added 'default_applicable_licenses' to import
20 // all of the 'license_kinds' from "hardware_interfaces_license"
21 // to get the below license kinds:
22 // SPDX-license-identifier-Apache-2.0
23 default_applicable_licenses: ["hardware_interfaces_license"],
24}
25
Yu Shana2bbcd22021-09-09 18:06:03 -070026filegroup {
27 name: "VehicleHalProtoFiles",
28 srcs: ["**/*.proto"],
29 visibility: ["//hardware/interfaces/automotive/vehicle:__subpackages__"],
30}
31
32genrule {
33 name: "VehicleProtoStub_h",
34 tools: [
35 "aprotoc",
36 "protoc-gen-grpc-cpp-plugin",
37 ],
38 cmd: "$(location aprotoc) -Ihardware/interfaces/automotive/vehicle/aidl/impl/proto -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)",
39 srcs: [
40 ":VehicleHalProtoFiles",
41 ],
42 out: [
Hao Chena810fb22023-04-11 15:27:44 -070043 "android/hardware/automotive/vehicle/DumpOptions.pb.h",
Yu Shana2bbcd22021-09-09 18:06:03 -070044 "android/hardware/automotive/vehicle/DumpResult.pb.h",
45 "android/hardware/automotive/vehicle/StatusCode.pb.h",
46 "android/hardware/automotive/vehicle/VehicleAreaConfig.pb.h",
47 "android/hardware/automotive/vehicle/VehiclePropConfig.pb.h",
48 "android/hardware/automotive/vehicle/VehiclePropertyAccess.pb.h",
49 "android/hardware/automotive/vehicle/VehiclePropertyChangeMode.pb.h",
50 "android/hardware/automotive/vehicle/VehiclePropertyStatus.pb.h",
51 "android/hardware/automotive/vehicle/VehiclePropValue.pb.h",
52 "android/hardware/automotive/vehicle/VehiclePropValueRequest.pb.h",
Yu Shan5c846f72024-05-16 15:39:51 -070053 "android/hardware/automotive/vehicle/SubscribeOptions.pb.h",
54 "android/hardware/automotive/vehicle/SubscribeRequest.pb.h",
Yu Shan2c37c112024-05-20 17:27:19 -070055 "android/hardware/automotive/vehicle/UnsubscribeRequest.pb.h",
Yu Shana2bbcd22021-09-09 18:06:03 -070056 ],
57}
58
59genrule {
60 name: "VehicleProtoStub_cc",
61 tools: [
62 "aprotoc",
63 "protoc-gen-grpc-cpp-plugin",
64 ],
65 cmd: "$(location aprotoc) -Ihardware/interfaces/automotive/vehicle/aidl/impl/proto -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)",
66 srcs: [
67 ":VehicleHalProtoFiles",
68 ],
69 out: [
Hao Chena810fb22023-04-11 15:27:44 -070070 "android/hardware/automotive/vehicle/DumpOptions.pb.cc",
Yu Shana2bbcd22021-09-09 18:06:03 -070071 "android/hardware/automotive/vehicle/DumpResult.pb.cc",
72 "android/hardware/automotive/vehicle/StatusCode.pb.cc",
73 "android/hardware/automotive/vehicle/VehicleAreaConfig.pb.cc",
74 "android/hardware/automotive/vehicle/VehiclePropConfig.pb.cc",
75 "android/hardware/automotive/vehicle/VehiclePropertyAccess.pb.cc",
76 "android/hardware/automotive/vehicle/VehiclePropertyChangeMode.pb.cc",
77 "android/hardware/automotive/vehicle/VehiclePropertyStatus.pb.cc",
78 "android/hardware/automotive/vehicle/VehiclePropValue.pb.cc",
79 "android/hardware/automotive/vehicle/VehiclePropValueRequest.pb.cc",
Yu Shan5c846f72024-05-16 15:39:51 -070080 "android/hardware/automotive/vehicle/SubscribeOptions.pb.cc",
81 "android/hardware/automotive/vehicle/SubscribeRequest.pb.cc",
Yu Shan2c37c112024-05-20 17:27:19 -070082 "android/hardware/automotive/vehicle/UnsubscribeRequest.pb.cc",
Yu Shana2bbcd22021-09-09 18:06:03 -070083 ],
84}
85
86cc_library_static {
87 name: "VehicleHalProtos",
88 vendor: true,
89 host_supported: true,
90 include_dirs: [
91 "external/protobuf/src",
92 ],
93 generated_headers: [
94 "VehicleProtoStub_h",
95 ],
96 export_generated_headers: [
97 "VehicleProtoStub_h",
98 ],
99 generated_sources: [
100 "VehicleProtoStub_cc",
101 ],
102 shared_libs: [
103 "libgrpc++_unsecure",
104 ],
105 cflags: [
106 "-Wno-unused-parameter",
107 ],
108}