blob: 06c96001002459d79dacefe4e70f30350ead87da [file] [log] [blame]
Hao Chen6cb86892023-04-10 15:21:59 -07001// Copyright (C) 2023 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
15package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19genrule {
20 name: "VehicleServerProtoStub_h@default-grpc",
21 tools: [
22 "aprotoc",
23 "protoc-gen-grpc-cpp-plugin",
24 ],
25 cmd: "$(location aprotoc) -I$$(dirname $(in)) -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)",
26 srcs: [
27 "proto/VehicleServer.proto",
28 ],
29 out: [
30 "VehicleServer.pb.h",
31 "VehicleServer.grpc.pb.h",
32 ],
33 visibility: ["//visibility:private"],
34}
35
36genrule {
37 name: "VehicleServerProtoStub_cc@default-grpc",
38 tools: [
39 "aprotoc",
40 "protoc-gen-grpc-cpp-plugin",
41 ],
42 cmd: "$(location aprotoc) -I$$(dirname $(in)) -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)",
43 srcs: [
44 "proto/VehicleServer.proto",
45 ],
46 out: [
47 "VehicleServer.pb.cc",
48 "VehicleServer.grpc.pb.cc",
49 ],
50 visibility: ["//visibility:private"],
51}
52
53cc_library_static {
54 name: "android.hardware.automotive.vehicle@default-grpc-libgrpc",
55 vendor: true,
56 host_supported: true,
57 include_dirs: [
58 "external/protobuf/src",
59 ],
60 generated_headers: [
61 "VehicleServerProtoStub_h@default-grpc",
62 ],
63 export_generated_headers: [
64 "VehicleServerProtoStub_h@default-grpc",
65 ],
66 generated_sources: [
67 "VehicleServerProtoStub_cc@default-grpc",
68 ],
69 whole_static_libs: [
70 "VehicleHalProtos",
71 ],
72 shared_libs: [
73 "libgrpc++",
74 ],
75 cflags: [
76 "-Wno-unused-parameter",
77 ],
78}
79
80cc_library_static {
81 name: "android.hardware.automotive.vehicle@default-grpc-hardware-lib",
82 defaults: ["VehicleHalDefaults"],
83 vendor: true,
84 srcs: [
85 "GRPCVehicleHardware.cpp",
86 ],
87 whole_static_libs: [
88 "android.hardware.automotive.vehicle@default-grpc-libgrpc",
89 "VehicleHalProtoMessageConverter",
90 ],
91 header_libs: [
92 "IVehicleHardware",
93 ],
94 shared_libs: [
95 "libgrpc++",
96 "libprotobuf-cpp-full",
97 ],
98 export_include_dirs: ["."],
99 cflags: [
100 "-Wno-unused-parameter",
101 ],
102}
Hao Chen32d46702023-04-10 15:59:50 -0700103
104cc_library_static {
105 name: "android.hardware.automotive.vehicle@default-grpc-server-lib",
106 defaults: ["VehicleHalDefaults"],
107 vendor: true,
108 srcs: [
109 "GRPCVehicleProxyServer.cpp",
110 ],
111 whole_static_libs: [
112 "android.hardware.automotive.vehicle@default-grpc-libgrpc",
113 "VehicleHalProtoMessageConverter",
114 ],
115 header_libs: [
116 "IVehicleHardware",
117 ],
118 shared_libs: [
119 "libgrpc++",
120 "libprotobuf-cpp-full",
121 ],
122 export_include_dirs: ["."],
123 cflags: [
124 "-Wno-unused-parameter",
125 ],
126}