Yu Shan | a2bbcd2 | 2021-09-09 18:06:03 -0700 | [diff] [blame] | 1 | /* |
| 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 Badour | 47589e0 | 2021-10-07 16:13:14 -0700 | [diff] [blame] | 17 | package { |
| 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 Shan | a2bbcd2 | 2021-09-09 18:06:03 -0700 | [diff] [blame] | 26 | filegroup { |
| 27 | name: "VehicleHalProtoFiles", |
| 28 | srcs: ["**/*.proto"], |
| 29 | visibility: ["//hardware/interfaces/automotive/vehicle:__subpackages__"], |
| 30 | } |
| 31 | |
| 32 | genrule { |
| 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 Chen | a810fb2 | 2023-04-11 15:27:44 -0700 | [diff] [blame] | 43 | "android/hardware/automotive/vehicle/DumpOptions.pb.h", |
Yu Shan | a2bbcd2 | 2021-09-09 18:06:03 -0700 | [diff] [blame] | 44 | "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 Shan | 5c846f7 | 2024-05-16 15:39:51 -0700 | [diff] [blame^] | 53 | "android/hardware/automotive/vehicle/SubscribeOptions.pb.h", |
| 54 | "android/hardware/automotive/vehicle/SubscribeRequest.pb.h", |
Yu Shan | a2bbcd2 | 2021-09-09 18:06:03 -0700 | [diff] [blame] | 55 | ], |
| 56 | } |
| 57 | |
| 58 | genrule { |
| 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 Chen | a810fb2 | 2023-04-11 15:27:44 -0700 | [diff] [blame] | 69 | "android/hardware/automotive/vehicle/DumpOptions.pb.cc", |
Yu Shan | a2bbcd2 | 2021-09-09 18:06:03 -0700 | [diff] [blame] | 70 | "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 Shan | 5c846f7 | 2024-05-16 15:39:51 -0700 | [diff] [blame^] | 79 | "android/hardware/automotive/vehicle/SubscribeOptions.pb.cc", |
| 80 | "android/hardware/automotive/vehicle/SubscribeRequest.pb.cc", |
Yu Shan | a2bbcd2 | 2021-09-09 18:06:03 -0700 | [diff] [blame] | 81 | ], |
| 82 | } |
| 83 | |
| 84 | cc_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 | } |