blob: bfab1ed698f23f9162f72fa9206a41cf49f263fb [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",
Yu Shan39b19852023-01-12 16:20:11 -080025 srcs: [
26 "src/RemoteAccessImpl.cpp",
27 "src/BindToDeviceSocketMutator.cpp",
28 ],
Yu Shan7a5283f2022-10-25 18:01:05 -070029 whole_static_libs: [
30 "RemoteAccessService",
31 ],
Yu Shan39b19852023-01-12 16:20:11 -080032 static_libs: [
33 "android.hardware.automotive.can@libnetdevice",
34 "libnl++",
35 ],
Yu Shan7a5283f2022-10-25 18:01:05 -070036 shared_libs: [
37 "libbase",
38 "libbinder_ndk",
39 "liblog",
40 "libutils",
41 "libgrpc++",
42 "libprotobuf-cpp-full",
43 ],
44 defaults: [
45 "vhalclient_defaults",
46 ],
47 cflags: [
48 "-Wno-unused-parameter",
Yu Shan1532afd2022-11-30 14:41:30 -080049 ],
50}
51
52cc_binary {
53 name: "android.hardware.automotive.remoteaccess@V1-default-service",
54 defaults: ["remote-access-hal-defaults"],
55 vintf_fragments: ["remoteaccess-default-service.xml"],
56 init_rc: ["remoteaccess-default-service.rc"],
57 cflags: [
Yu Shan7a5283f2022-10-25 18:01:05 -070058 "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"",
59 ],
60}
61
Yu Shan1532afd2022-11-30 14:41:30 -080062cc_binary {
63 name: "android.hardware.automotive.remoteaccess@V1-tcu-test-service",
64 defaults: ["remote-access-hal-defaults"],
65 vintf_fragments: ["remoteaccess-default-service.xml"],
66 init_rc: ["remoteaccess-tcu-test-service.rc"],
67 cflags: [
68 "-DGRPC_SERVICE_ADDRESS=\"10.10.10.1:50051\"",
Yu Shan39b19852023-01-12 16:20:11 -080069 "-DGRPC_SERVICE_IFNAME=\"eth1\"",
Yu Shan1532afd2022-11-30 14:41:30 -080070 ],
71}
72
Yu Shan7a5283f2022-10-25 18:01:05 -070073cc_library {
74 name: "RemoteAccessService",
75 vendor_available: true,
76 local_include_dirs: ["include"],
77 export_include_dirs: ["include"],
78 srcs: [
79 "src/RemoteAccessService.cpp",
80 ],
81 whole_static_libs: [
82 "android.hardware.automotive.remoteaccess-V1-ndk",
83 "wakeup_client_protos",
84 "libvhalclient",
85 ],
86 defaults: [
87 "vhalclient_defaults",
88 ],
89 shared_libs: [
90 "libbase",
91 "libbinder_ndk",
92 "libcutils",
93 "liblog",
94 "libutils",
95 "libgrpc++",
96 "libprotobuf-cpp-full",
97 ],
98 cflags: [
99 "-Wno-unused-parameter",
100 ],
101}
102
103cc_fuzz {
104 name: "android.hardware.automotive.remoteaccess@V1-default-service.aidl_fuzzer",
105 srcs: ["fuzzer/fuzzer.cpp"],
106 whole_static_libs: [
107 "RemoteAccessService",
108 ],
109 static_libs: [
110 "libgtest",
111 "libgmock",
112 ],
113 shared_libs: [
114 "libbase",
115 "libbinder_ndk",
116 "liblog",
117 "libutils",
118 "libgrpc++",
119 "libprotobuf-cpp-full",
120 ],
121 defaults: [
122 "vhalclient_defaults",
123 "service_fuzzer_defaults",
124 ],
125 cflags: [
126 "-Wno-unused-parameter",
127 "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"",
128 ],
129 fuzz_config: {
130 cc: [
131 "shanyu@google.com",
132 ],
133 },
134}