blob: cc8f2b0fddadbd44a3d5ef589fa024a9b799c40d [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
Yu Shan06ddbc62023-08-23 18:05:26 -070051cc_binary {
52 name: "android.hardware.automotive.remoteaccess@V2-default-service",
53 defaults: ["remote-access-hal-defaults"],
Greg Kaiser38922742024-08-30 14:07:37 +000054 vintf_fragments: ["remoteaccess-default-service.xml"],
Yu Shan1532afd2022-11-30 14:41:30 -080055 init_rc: ["remoteaccess-default-service.rc"],
Yu Shan7a5283f2022-10-25 18:01:05 -070056}
57
Yu Shan06ddbc62023-08-23 18:05:26 -070058cc_binary {
59 name: "android.hardware.automotive.remoteaccess@V2-tcu-test-service",
60 defaults: ["remote-access-hal-defaults"],
Greg Kaiser38922742024-08-30 14:07:37 +000061 vintf_fragments: ["remoteaccess-default-service.xml"],
Yu Shan1532afd2022-11-30 14:41:30 -080062 init_rc: ["remoteaccess-tcu-test-service.rc"],
Yu Shan1532afd2022-11-30 14:41:30 -080063}
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: [
Yu Shan06ddbc62023-08-23 18:05:26 -070074 "android.hardware.automotive.remoteaccess-V2-ndk",
Yu Shan7a5283f2022-10-25 18:01:05 -070075 "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 {
Yu Shan06ddbc62023-08-23 18:05:26 -070096 name: "android.hardware.automotive.remoteaccess@V2-default-service.aidl_fuzzer",
Yu Shan7a5283f2022-10-25 18:01:05 -070097 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}