blob: b6c052596f097e49272ed900d801f32d5fee740b [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"],
Yu Shan1532afd2022-11-30 14:41:30 -080054 init_rc: ["remoteaccess-default-service.rc"],
Kiyoung Kimcf0a2dd2024-08-12 15:30:48 +090055 vintf_fragment_modules: ["remoteaccess-default-service.xml"],
56
Yu Shan7a5283f2022-10-25 18:01:05 -070057}
58
Yu Shan06ddbc62023-08-23 18:05:26 -070059cc_binary {
60 name: "android.hardware.automotive.remoteaccess@V2-tcu-test-service",
61 defaults: ["remote-access-hal-defaults"],
Yu Shan1532afd2022-11-30 14:41:30 -080062 init_rc: ["remoteaccess-tcu-test-service.rc"],
Kiyoung Kimcf0a2dd2024-08-12 15:30:48 +090063 vintf_fragment_modules: ["remoteaccess-default-service.xml"],
64}
65
66vintf_fragment {
67 name: "remoteaccess-default-service.xml",
68 src: "remoteaccess-default-service.xml",
69 vendor: true,
Yu Shan1532afd2022-11-30 14:41:30 -080070}
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: [
Yu Shan06ddbc62023-08-23 18:05:26 -070081 "android.hardware.automotive.remoteaccess-V2-ndk",
Yu Shan7a5283f2022-10-25 18:01:05 -070082 "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 {
Yu Shan06ddbc62023-08-23 18:05:26 -0700103 name: "android.hardware.automotive.remoteaccess@V2-default-service.aidl_fuzzer",
Yu Shan7a5283f2022-10-25 18:01:05 -0700104 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}