blob: a16e22ff193bba399f45575e8a014e8f00bc3603 [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 {
Aditya Choudhary04ef2122024-02-02 14:00:43 +000018 default_team: "trendy_team_aaos_framework",
Yu Shan7a5283f2022-10-25 18:01:05 -070019 default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
Yu Shan1532afd2022-11-30 14:41:30 -080022cc_defaults {
23 name: "remote-access-hal-defaults",
Yu Shan7a5283f2022-10-25 18:01:05 -070024 vendor: true,
Yu Shan7a5283f2022-10-25 18:01:05 -070025 relative_install_path: "hw",
Yu Shan39b19852023-01-12 16:20:11 -080026 srcs: [
27 "src/RemoteAccessImpl.cpp",
Yu Shan39b19852023-01-12 16:20:11 -080028 ],
Yu Shan7a5283f2022-10-25 18:01:05 -070029 whole_static_libs: [
30 "RemoteAccessService",
31 ],
Yu Shan39b19852023-01-12 16:20:11 -080032 static_libs: [
Yu Shan2a096c42023-02-15 18:16:22 -080033 "BindToDeviceSocketMutatorLib",
Yu Shan39b19852023-01-12 16:20:11 -080034 ],
Yu Shan7a5283f2022-10-25 18:01:05 -070035 shared_libs: [
Yu Shan7a5283f2022-10-25 18:01:05 -070036 "libbinder_ndk",
Yu Shan7a5283f2022-10-25 18:01:05 -070037 "libutils",
Yu Shan7a5283f2022-10-25 18:01:05 -070038 "libprotobuf-cpp-full",
39 ],
40 defaults: [
41 "vhalclient_defaults",
Yu Shan2a096c42023-02-15 18:16:22 -080042 "BindToDeviceSocketMutatorDefaults",
Yu Shan7a5283f2022-10-25 18:01:05 -070043 ],
44 cflags: [
Yu Shan2a096c42023-02-15 18:16:22 -080045 // This is already included in BindToDeviceSocketMutatorDefaults but
46 // might be overridden by vhalclient_defaults.
Yu Shan7a5283f2022-10-25 18:01:05 -070047 "-Wno-unused-parameter",
Yu Shan1532afd2022-11-30 14:41:30 -080048 ],
49}
50
51cc_binary {
52 name: "android.hardware.automotive.remoteaccess@V1-default-service",
53 defaults: ["remote-access-hal-defaults"],
54 vintf_fragments: ["remoteaccess-default-service.xml"],
55 init_rc: ["remoteaccess-default-service.rc"],
56 cflags: [
Yu Shan7a5283f2022-10-25 18:01:05 -070057 "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"",
58 ],
59}
60
Yu Shan1532afd2022-11-30 14:41:30 -080061cc_binary {
62 name: "android.hardware.automotive.remoteaccess@V1-tcu-test-service",
63 defaults: ["remote-access-hal-defaults"],
64 vintf_fragments: ["remoteaccess-default-service.xml"],
65 init_rc: ["remoteaccess-tcu-test-service.rc"],
66 cflags: [
67 "-DGRPC_SERVICE_ADDRESS=\"10.10.10.1:50051\"",
Yu Shan39b19852023-01-12 16:20:11 -080068 "-DGRPC_SERVICE_IFNAME=\"eth1\"",
Yu Shan1532afd2022-11-30 14:41:30 -080069 ],
70}
71
Yu Shan7a5283f2022-10-25 18:01:05 -070072cc_library {
73 name: "RemoteAccessService",
74 vendor_available: true,
75 local_include_dirs: ["include"],
76 export_include_dirs: ["include"],
77 srcs: [
78 "src/RemoteAccessService.cpp",
79 ],
80 whole_static_libs: [
81 "android.hardware.automotive.remoteaccess-V1-ndk",
82 "wakeup_client_protos",
83 "libvhalclient",
84 ],
85 defaults: [
86 "vhalclient_defaults",
87 ],
88 shared_libs: [
89 "libbase",
90 "libbinder_ndk",
91 "libcutils",
92 "liblog",
93 "libutils",
94 "libgrpc++",
95 "libprotobuf-cpp-full",
96 ],
97 cflags: [
98 "-Wno-unused-parameter",
99 ],
100}
101
102cc_fuzz {
103 name: "android.hardware.automotive.remoteaccess@V1-default-service.aidl_fuzzer",
104 srcs: ["fuzzer/fuzzer.cpp"],
105 whole_static_libs: [
106 "RemoteAccessService",
107 ],
108 static_libs: [
109 "libgtest",
110 "libgmock",
111 ],
112 shared_libs: [
113 "libbase",
114 "libbinder_ndk",
115 "liblog",
116 "libutils",
117 "libgrpc++",
118 "libprotobuf-cpp-full",
119 ],
120 defaults: [
121 "vhalclient_defaults",
122 "service_fuzzer_defaults",
123 ],
124 cflags: [
125 "-Wno-unused-parameter",
126 "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"",
127 ],
128 fuzz_config: {
129 cc: [
130 "shanyu@google.com",
131 ],
132 },
133}