blob: c636bb98d88e15a101307133d73400160ff42874 [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 Shana2bbcd22021-09-09 18:06:03 -070055 ],
56}
57
58genrule {
59 name: "VehicleProtoStub_cc",
60 tools: [
61 "aprotoc",
62 "protoc-gen-grpc-cpp-plugin",
63 ],
64 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)",
65 srcs: [
66 ":VehicleHalProtoFiles",
67 ],
68 out: [
Hao Chena810fb22023-04-11 15:27:44 -070069 "android/hardware/automotive/vehicle/DumpOptions.pb.cc",
Yu Shana2bbcd22021-09-09 18:06:03 -070070 "android/hardware/automotive/vehicle/DumpResult.pb.cc",
71 "android/hardware/automotive/vehicle/StatusCode.pb.cc",
72 "android/hardware/automotive/vehicle/VehicleAreaConfig.pb.cc",
73 "android/hardware/automotive/vehicle/VehiclePropConfig.pb.cc",
74 "android/hardware/automotive/vehicle/VehiclePropertyAccess.pb.cc",
75 "android/hardware/automotive/vehicle/VehiclePropertyChangeMode.pb.cc",
76 "android/hardware/automotive/vehicle/VehiclePropertyStatus.pb.cc",
77 "android/hardware/automotive/vehicle/VehiclePropValue.pb.cc",
78 "android/hardware/automotive/vehicle/VehiclePropValueRequest.pb.cc",
Yu Shan5c846f72024-05-16 15:39:51 -070079 "android/hardware/automotive/vehicle/SubscribeOptions.pb.cc",
80 "android/hardware/automotive/vehicle/SubscribeRequest.pb.cc",
Yu Shana2bbcd22021-09-09 18:06:03 -070081 ],
82}
83
84cc_library_static {
85 name: "VehicleHalProtos",
86 vendor: true,
87 host_supported: true,
88 include_dirs: [
89 "external/protobuf/src",
90 ],
91 generated_headers: [
92 "VehicleProtoStub_h",
93 ],
94 export_generated_headers: [
95 "VehicleProtoStub_h",
96 ],
97 generated_sources: [
98 "VehicleProtoStub_cc",
99 ],
100 shared_libs: [
101 "libgrpc++_unsecure",
102 ],
103 cflags: [
104 "-Wno-unused-parameter",
105 ],
106}