blob: 97ed2c12f0749d1c18270358e074497d4a7f7d9d [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",
Yu Shan39b19852023-01-12 16:20:11 -080027 ],
Yu Shan7a5283f2022-10-25 18:01:05 -070028 whole_static_libs: [
29 "RemoteAccessService",
30 ],
Yu Shan39b19852023-01-12 16:20:11 -080031 static_libs: [
Yu Shan2a096c42023-02-15 18:16:22 -080032 "BindToDeviceSocketMutatorLib",
Yu Shan39b19852023-01-12 16:20:11 -080033 ],
Yu Shan7a5283f2022-10-25 18:01:05 -070034 shared_libs: [
Yu Shan7a5283f2022-10-25 18:01:05 -070035 "libbinder_ndk",
Yu Shan7a5283f2022-10-25 18:01:05 -070036 "libutils",
Yu Shan7a5283f2022-10-25 18:01:05 -070037 "libprotobuf-cpp-full",
38 ],
39 defaults: [
40 "vhalclient_defaults",
Yu Shan2a096c42023-02-15 18:16:22 -080041 "BindToDeviceSocketMutatorDefaults",
Yu Shan7a5283f2022-10-25 18:01:05 -070042 ],
43 cflags: [
Yu Shan2a096c42023-02-15 18:16:22 -080044 // This is already included in BindToDeviceSocketMutatorDefaults but
45 // might be overridden by vhalclient_defaults.
Yu Shan7a5283f2022-10-25 18:01:05 -070046 "-Wno-unused-parameter",
Yu Shan1532afd2022-11-30 14:41:30 -080047 ],
48}
49
Yu Shan06ddbc62023-08-23 18:05:26 -070050cc_binary {
51 name: "android.hardware.automotive.remoteaccess@V2-default-service",
52 defaults: ["remote-access-hal-defaults"],
Yu Shan1532afd2022-11-30 14:41:30 -080053 vintf_fragments: ["remoteaccess-default-service.xml"],
54 init_rc: ["remoteaccess-default-service.rc"],
55 cflags: [
Yu Shan3a129d72023-05-31 16:33:07 -070056 "-DGRPC_SERVICE_ADDRESS=\"10.0.2.2:50051\"",
Yu Shan7a5283f2022-10-25 18:01:05 -070057 ],
58}
59
Yu Shan06ddbc62023-08-23 18:05:26 -070060cc_binary {
61 name: "android.hardware.automotive.remoteaccess@V2-tcu-test-service",
62 defaults: ["remote-access-hal-defaults"],
Yu Shan1532afd2022-11-30 14:41:30 -080063 vintf_fragments: ["remoteaccess-default-service.xml"],
64 init_rc: ["remoteaccess-tcu-test-service.rc"],
65 cflags: [
66 "-DGRPC_SERVICE_ADDRESS=\"10.10.10.1:50051\"",
Yu Shan39b19852023-01-12 16:20:11 -080067 "-DGRPC_SERVICE_IFNAME=\"eth1\"",
Yu Shan1532afd2022-11-30 14:41:30 -080068 ],
69}
70
Yu Shan7a5283f2022-10-25 18:01:05 -070071cc_library {
72 name: "RemoteAccessService",
73 vendor_available: true,
74 local_include_dirs: ["include"],
75 export_include_dirs: ["include"],
76 srcs: [
77 "src/RemoteAccessService.cpp",
78 ],
79 whole_static_libs: [
Yu Shan06ddbc62023-08-23 18:05:26 -070080 "android.hardware.automotive.remoteaccess-V2-ndk",
Yu Shan7a5283f2022-10-25 18:01:05 -070081 "wakeup_client_protos",
82 "libvhalclient",
83 ],
84 defaults: [
85 "vhalclient_defaults",
86 ],
87 shared_libs: [
88 "libbase",
89 "libbinder_ndk",
90 "libcutils",
91 "liblog",
92 "libutils",
93 "libgrpc++",
94 "libprotobuf-cpp-full",
95 ],
96 cflags: [
97 "-Wno-unused-parameter",
98 ],
99}
100
101cc_fuzz {
Yu Shan06ddbc62023-08-23 18:05:26 -0700102 name: "android.hardware.automotive.remoteaccess@V2-default-service.aidl_fuzzer",
Yu Shan7a5283f2022-10-25 18:01:05 -0700103 srcs: ["fuzzer/fuzzer.cpp"],
104 whole_static_libs: [
105 "RemoteAccessService",
106 ],
107 static_libs: [
108 "libgtest",
109 "libgmock",
110 ],
111 shared_libs: [
112 "libbase",
113 "libbinder_ndk",
114 "liblog",
115 "libutils",
116 "libgrpc++",
117 "libprotobuf-cpp-full",
118 ],
119 defaults: [
120 "vhalclient_defaults",
121 "service_fuzzer_defaults",
122 ],
123 cflags: [
124 "-Wno-unused-parameter",
125 "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"",
126 ],
127 fuzz_config: {
128 cc: [
129 "shanyu@google.com",
130 ],
131 },
132}