blob: f27b8f86e6745a8d4f7862f10f1da32493884965 [file] [log] [blame]
Yu Shan7a5283f2022-10-25 18:01:05 -07001/*
2 * Copyright (C) 2022 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
17package {
18 default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
Yu Shan1532afd2022-11-30 14:41:30 -080021cc_defaults {
22 name: "remote-access-hal-defaults",
Yu Shan7a5283f2022-10-25 18:01:05 -070023 vendor: true,
Yu Shan7a5283f2022-10-25 18:01:05 -070024 relative_install_path: "hw",
25 srcs: ["src/RemoteAccessImpl.cpp"],
26 whole_static_libs: [
27 "RemoteAccessService",
28 ],
29 shared_libs: [
30 "libbase",
31 "libbinder_ndk",
32 "liblog",
33 "libutils",
34 "libgrpc++",
35 "libprotobuf-cpp-full",
36 ],
37 defaults: [
38 "vhalclient_defaults",
39 ],
40 cflags: [
41 "-Wno-unused-parameter",
Yu Shan1532afd2022-11-30 14:41:30 -080042 ],
43}
44
45cc_binary {
46 name: "android.hardware.automotive.remoteaccess@V1-default-service",
47 defaults: ["remote-access-hal-defaults"],
48 vintf_fragments: ["remoteaccess-default-service.xml"],
49 init_rc: ["remoteaccess-default-service.rc"],
50 cflags: [
Yu Shan7a5283f2022-10-25 18:01:05 -070051 "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"",
52 ],
53}
54
Yu Shan1532afd2022-11-30 14:41:30 -080055cc_binary {
56 name: "android.hardware.automotive.remoteaccess@V1-tcu-test-service",
57 defaults: ["remote-access-hal-defaults"],
58 vintf_fragments: ["remoteaccess-default-service.xml"],
59 init_rc: ["remoteaccess-tcu-test-service.rc"],
60 cflags: [
61 "-DGRPC_SERVICE_ADDRESS=\"10.10.10.1:50051\"",
62 ],
63}
64
Yu Shan7a5283f2022-10-25 18:01:05 -070065cc_library {
66 name: "RemoteAccessService",
67 vendor_available: true,
68 local_include_dirs: ["include"],
69 export_include_dirs: ["include"],
70 srcs: [
71 "src/RemoteAccessService.cpp",
72 ],
73 whole_static_libs: [
74 "android.hardware.automotive.remoteaccess-V1-ndk",
75 "wakeup_client_protos",
76 "libvhalclient",
77 ],
78 defaults: [
79 "vhalclient_defaults",
80 ],
81 shared_libs: [
82 "libbase",
83 "libbinder_ndk",
84 "libcutils",
85 "liblog",
86 "libutils",
87 "libgrpc++",
88 "libprotobuf-cpp-full",
89 ],
90 cflags: [
91 "-Wno-unused-parameter",
92 ],
93}
94
95cc_fuzz {
96 name: "android.hardware.automotive.remoteaccess@V1-default-service.aidl_fuzzer",
97 srcs: ["fuzzer/fuzzer.cpp"],
98 whole_static_libs: [
99 "RemoteAccessService",
100 ],
101 static_libs: [
102 "libgtest",
103 "libgmock",
104 ],
105 shared_libs: [
106 "libbase",
107 "libbinder_ndk",
108 "liblog",
109 "libutils",
110 "libgrpc++",
111 "libprotobuf-cpp-full",
112 ],
113 defaults: [
114 "vhalclient_defaults",
115 "service_fuzzer_defaults",
116 ],
117 cflags: [
118 "-Wno-unused-parameter",
119 "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"",
120 ],
121 fuzz_config: {
122 cc: [
123 "shanyu@google.com",
124 ],
125 },
126}