blob: 683f1281c439d0f66c0040600432496b876c0a76 [file] [log] [blame]
Tri Vofc871402017-07-10 17:13:23 -07001// 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 Badourc22b35b2021-02-23 14:26:20 -080016package {
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 Vofc871402017-07-10 17:13:23 -070025cc_library_static {
26 name: "android.hardware.automotive.vehicle@2.0-libproto-native",
Yu Shan6029a372021-06-22 19:11:05 -070027 visibility: [
Yu Shan6cd2fd72022-01-19 15:05:31 -080028 "//hardware/interfaces/automotive/vehicle:__subpackages__",
29 "//device/generic/car/emulator:__subpackages__",
Yu Shan6029a372021-06-22 19:11:05 -070030 ],
Tri Vo22b2d682017-07-11 12:53:12 -070031 vendor: true,
Hao Chenc324db92020-06-03 18:29:31 -070032 host_supported: true,
Tri Vofc871402017-07-10 17:13:23 -070033 proto: {
34 export_proto_headers: true,
35 type: "lite",
36 },
37 strip: {
38 keep_symbols: true,
39 },
Chih-Hung Hsieh8c7f10b2017-11-28 14:14:06 -080040 cflags: [
41 "-Wall",
42 "-Werror",
43 ],
Hao Chenefc31de2020-04-06 16:11:18 -070044 srcs: ["VehicleHalProto.proto"],
45}
46
47filegroup {
48 name: "vhal-proto-src",
49 visibility: [
50 "//device/google/trout/hal/vehicle/2.0:__subpackages__",
51 ],
52 srcs: [
53 "VehicleHalProto.proto",
54 ],
Tri Vofc871402017-07-10 17:13:23 -070055}
Hao Chen3ebbb822019-11-20 15:49:55 -080056
Hao Chen3ebbb822019-11-20 15:49:55 -080057genrule {
58 name: "DefaultVehicleHalProtoStub_h",
59 tools: [
60 "aprotoc",
61 "protoc-gen-grpc-cpp-plugin",
62 ],
63 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)",
64 srcs: [
65 "VehicleHalProto.proto",
Hao Chen3ebbb822019-11-20 15:49:55 -080066 ],
67 out: [
68 "VehicleHalProto.pb.h",
69 "VehicleHalProto.grpc.pb.h",
Hao Chen3ebbb822019-11-20 15:49:55 -080070 ],
71}
72
73genrule {
74 name: "DefaultVehicleHalProtoStub_cc",
75 tools: [
76 "aprotoc",
77 "protoc-gen-grpc-cpp-plugin",
78 ],
79 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)",
80 srcs: [
81 "VehicleHalProto.proto",
Hao Chen3ebbb822019-11-20 15:49:55 -080082 ],
83 out: [
84 "VehicleHalProto.pb.cc",
85 "VehicleHalProto.grpc.pb.cc",
Hao Chen3ebbb822019-11-20 15:49:55 -080086 ],
87}