Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 1 | // Copyright (C) 2017 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 | |
| 15 | // Vehicle HAL Protobuf library |
Bob Badour | c22b35b | 2021-02-23 14:26:20 -0800 | [diff] [blame] | 16 | package { |
| 17 | // See: http://go/android-license-faq |
| 18 | // A large-scale-change added 'default_applicable_licenses' to import |
| 19 | // all of the 'license_kinds' from "hardware_interfaces_license" |
| 20 | // to get the below license kinds: |
| 21 | // SPDX-license-identifier-Apache-2.0 |
| 22 | default_applicable_licenses: ["hardware_interfaces_license"], |
| 23 | } |
| 24 | |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 25 | cc_library_static { |
| 26 | name: "android.hardware.automotive.vehicle@2.0-libproto-native", |
Yu Shan | 6029a37 | 2021-06-22 19:11:05 -0700 | [diff] [blame] | 27 | visibility: [ |
Yu Shan | 6cd2fd7 | 2022-01-19 15:05:31 -0800 | [diff] [blame] | 28 | "//hardware/interfaces/automotive/vehicle:__subpackages__", |
| 29 | "//device/generic/car/emulator:__subpackages__", |
Hugo Drumond Jacob | f1522dc | 2023-09-27 16:07:37 +0200 | [diff] [blame] | 30 | "//system/software_defined_vehicle/core_services:__subpackages__", |
Yu Shan | 6029a37 | 2021-06-22 19:11:05 -0700 | [diff] [blame] | 31 | ], |
Tri Vo | 22b2d68 | 2017-07-11 12:53:12 -0700 | [diff] [blame] | 32 | vendor: true, |
Hao Chen | c324db9 | 2020-06-03 18:29:31 -0700 | [diff] [blame] | 33 | host_supported: true, |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 34 | proto: { |
| 35 | export_proto_headers: true, |
| 36 | type: "lite", |
| 37 | }, |
| 38 | strip: { |
| 39 | keep_symbols: true, |
| 40 | }, |
Chih-Hung Hsieh | 8c7f10b | 2017-11-28 14:14:06 -0800 | [diff] [blame] | 41 | cflags: [ |
| 42 | "-Wall", |
| 43 | "-Werror", |
| 44 | ], |
Hao Chen | efc31de | 2020-04-06 16:11:18 -0700 | [diff] [blame] | 45 | srcs: ["VehicleHalProto.proto"], |
| 46 | } |
| 47 | |
| 48 | filegroup { |
| 49 | name: "vhal-proto-src", |
| 50 | visibility: [ |
| 51 | "//device/google/trout/hal/vehicle/2.0:__subpackages__", |
| 52 | ], |
| 53 | srcs: [ |
| 54 | "VehicleHalProto.proto", |
| 55 | ], |
Tri Vo | fc87140 | 2017-07-10 17:13:23 -0700 | [diff] [blame] | 56 | } |
Hao Chen | 3ebbb82 | 2019-11-20 15:49:55 -0800 | [diff] [blame] | 57 | |
Hao Chen | 3ebbb82 | 2019-11-20 15:49:55 -0800 | [diff] [blame] | 58 | genrule { |
| 59 | name: "DefaultVehicleHalProtoStub_h", |
| 60 | tools: [ |
| 61 | "aprotoc", |
| 62 | "protoc-gen-grpc-cpp-plugin", |
| 63 | ], |
| 64 | 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)", |
| 65 | srcs: [ |
| 66 | "VehicleHalProto.proto", |
Hao Chen | 3ebbb82 | 2019-11-20 15:49:55 -0800 | [diff] [blame] | 67 | ], |
| 68 | out: [ |
| 69 | "VehicleHalProto.pb.h", |
| 70 | "VehicleHalProto.grpc.pb.h", |
Hao Chen | 3ebbb82 | 2019-11-20 15:49:55 -0800 | [diff] [blame] | 71 | ], |
| 72 | } |
| 73 | |
| 74 | genrule { |
| 75 | name: "DefaultVehicleHalProtoStub_cc", |
| 76 | tools: [ |
| 77 | "aprotoc", |
| 78 | "protoc-gen-grpc-cpp-plugin", |
| 79 | ], |
| 80 | 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)", |
| 81 | srcs: [ |
| 82 | "VehicleHalProto.proto", |
Hao Chen | 3ebbb82 | 2019-11-20 15:49:55 -0800 | [diff] [blame] | 83 | ], |
| 84 | out: [ |
| 85 | "VehicleHalProto.pb.cc", |
| 86 | "VehicleHalProto.grpc.pb.cc", |
Hao Chen | 3ebbb82 | 2019-11-20 15:49:55 -0800 | [diff] [blame] | 87 | ], |
| 88 | } |