blob: 6038e367a4a061ed6ea5935615bd75133613174b [file] [log] [blame]
Gabriel Biren631a8112022-12-01 22:29:32 +00001// Copyright (C) 2021 The Android Open Source Project
Sundong Ahn80af4e42021-12-02 01:01:49 +00002//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16 default_applicable_licenses: ["hardware_interfaces_license"],
17}
18
Jooyung Han1e6cdac2022-07-22 17:39:41 +090019soong_config_module_type {
20 name: "wifi_hal_cc_defaults",
21 module_type: "cc_defaults",
22 config_namespace: "wifi",
23 bool_variables: [
24 "hidl_feature_aware", // WIFI_HIDL_FEATURE_AWARE
25 "hidl_feature_dual_interface", // WIFI_HIDL_FEATURE_DUAL_INTERFACE
26 "hidl_feature_disable_ap", // WIFI_HIDL_FEATURE_DISABLE_AP
27 "hidl_feature_disable_ap_mac_randomization", // WIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION
28 "avoid_iface_reset_mac_change", // WIFI_AVOID_IFACE_RESET_MAC_CHANGE
Ye Jiao2dc47ca2023-03-13 10:58:08 +080029 "wifi_skip_state_toggle_off_on_for_nan", // WIFI_SKIP_STATE_TOGGLE_OFF_ON_FOR_NAN
Jooyung Han1e6cdac2022-07-22 17:39:41 +090030 ],
31 value_variables: [
32 "hal_interface_combinations", // WIFI_HAL_INTERFACE_COMBINATIONS
33 ],
34 properties: [
35 "cppflags",
36 ],
Sundong Ahn80af4e42021-12-02 01:01:49 +000037}
38
Jooyung Han1e6cdac2022-07-22 17:39:41 +090039wifi_hal_cc_defaults {
Gabriel Biren631a8112022-12-01 22:29:32 +000040 name: "android.hardware.wifi@1.0-service-cppflags-defaults",
Jooyung Han1e6cdac2022-07-22 17:39:41 +090041 soong_config_variables: {
42 hidl_feature_aware: {
43 cppflags: ["-DWIFI_HIDL_FEATURE_AWARE"],
44 },
45 hidl_feature_dual_interface: {
46 cppflags: ["-DWIFI_HIDL_FEATURE_DUAL_INTERFACE"],
47 },
48 hidl_feature_disable_ap: {
49 cppflags: ["-DWIFI_HIDL_FEATURE_DISABLE_AP"],
50 },
51 hidl_feature_disable_ap_mac_randomization: {
52 cppflags: ["-DWIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION"],
53 },
54 avoid_iface_reset_mac_change: {
55 cppflags: ["-DWIFI_AVOID_IFACE_RESET_MAC_CHANGE"],
56 },
Ye Jiao2dc47ca2023-03-13 10:58:08 +080057 wifi_skip_state_toggle_off_on_for_nan: {
58 cppflags: ["-DWIFI_SKIP_STATE_TOGGLE_OFF_ON_FOR_NAN"],
59 },
Jooyung Han1e6cdac2022-07-22 17:39:41 +090060 hal_interface_combinations: {
61 cppflags: ["-DWIFI_HAL_INTERFACE_COMBINATIONS=%s"],
62 },
63 },
64}
65
66cc_library_static {
Gabriel Biren631a8112022-12-01 22:29:32 +000067 name: "android.hardware.wifi@1.0-service-lib",
68 defaults: ["android.hardware.wifi@1.0-service-cppflags-defaults"],
Jooyung Han1e6cdac2022-07-22 17:39:41 +090069 proprietary: true,
Jiyong Park46afe632022-08-12 13:40:26 +090070 compile_multilib: "first",
Sundong Ahn80af4e42021-12-02 01:01:49 +000071 cppflags: [
72 "-Wall",
73 "-Werror",
74 "-Wextra",
75 ],
Jooyung Han1e6cdac2022-07-22 17:39:41 +090076 // Allow implicit fallthroughs in wifi_legacy_hal.cpp until they are fixed.
77 cflags: ["-Wno-error=implicit-fallthrough"],
Sundong Ahn80af4e42021-12-02 01:01:49 +000078 srcs: [
Gabriel Biren631a8112022-12-01 22:29:32 +000079 "hidl_struct_util.cpp",
80 "hidl_sync_util.cpp",
Sundong Ahn80af4e42021-12-02 01:01:49 +000081 "ringbuffer.cpp",
82 "wifi.cpp",
83 "wifi_ap_iface.cpp",
84 "wifi_chip.cpp",
85 "wifi_feature_flags.cpp",
86 "wifi_iface_util.cpp",
87 "wifi_legacy_hal.cpp",
88 "wifi_legacy_hal_factory.cpp",
89 "wifi_legacy_hal_stubs.cpp",
90 "wifi_mode_controller.cpp",
91 "wifi_nan_iface.cpp",
92 "wifi_p2p_iface.cpp",
93 "wifi_rtt_controller.cpp",
94 "wifi_sta_iface.cpp",
95 "wifi_status_util.cpp",
96 ],
Sundong Ahn80af4e42021-12-02 01:01:49 +000097
Sundong Ahn80af4e42021-12-02 01:01:49 +000098 shared_libs: [
Jooyung Han1e6cdac2022-07-22 17:39:41 +090099 "libbase",
100 "libcutils",
Gabriel Biren631a8112022-12-01 22:29:32 +0000101 "libhidlbase",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900102 "liblog",
103 "libnl",
104 "libutils",
105 "libwifi-hal",
106 "libwifi-system-iface",
107 "libxml2",
Gabriel Biren631a8112022-12-01 22:29:32 +0000108 "android.hardware.wifi@1.0",
109 "android.hardware.wifi@1.1",
110 "android.hardware.wifi@1.2",
111 "android.hardware.wifi@1.3",
112 "android.hardware.wifi@1.4",
113 "android.hardware.wifi@1.5",
114 "android.hardware.wifi@1.6",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900115 ],
116
117 export_include_dirs: ["."],
118}
119
120cc_binary {
Gabriel Biren631a8112022-12-01 22:29:32 +0000121 name: "android.hardware.wifi@1.0-service",
122 vintf_fragments: ["android.hardware.wifi@1.0-service.xml"],
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900123 relative_install_path: "hw",
124 proprietary: true,
125 cppflags: [
126 "-Wall",
127 "-Werror",
128 "-Wextra",
129 ],
130 srcs: ["service.cpp"],
131 shared_libs: [
Sundong Ahn80af4e42021-12-02 01:01:49 +0000132 "libbase",
133 "libcutils",
Gabriel Biren631a8112022-12-01 22:29:32 +0000134 "libhidlbase",
Sundong Ahn80af4e42021-12-02 01:01:49 +0000135 "liblog",
136 "libnl",
137 "libutils",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900138 "libwifi-hal",
Sundong Ahn80af4e42021-12-02 01:01:49 +0000139 "libwifi-system-iface",
140 "libxml2",
Gabriel Biren631a8112022-12-01 22:29:32 +0000141 "android.hardware.wifi@1.0",
142 "android.hardware.wifi@1.1",
143 "android.hardware.wifi@1.2",
144 "android.hardware.wifi@1.3",
145 "android.hardware.wifi@1.4",
146 "android.hardware.wifi@1.5",
147 "android.hardware.wifi@1.6",
Sundong Ahn80af4e42021-12-02 01:01:49 +0000148 ],
Gabriel Biren631a8112022-12-01 22:29:32 +0000149 static_libs: ["android.hardware.wifi@1.0-service-lib"],
150 init_rc: ["android.hardware.wifi@1.0-service.rc"],
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900151}
152
153cc_binary {
Gabriel Biren631a8112022-12-01 22:29:32 +0000154 name: "android.hardware.wifi@1.0-service-lazy",
155 vintf_fragments: ["android.hardware.wifi@1.0-service.xml"],
156 overrides: ["android.hardware.wifi@1.0-service"],
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900157 cflags: ["-DLAZY_SERVICE"],
158 relative_install_path: "hw",
159 proprietary: true,
Sundong Ahn80af4e42021-12-02 01:01:49 +0000160 cppflags: [
161 "-Wall",
162 "-Werror",
163 "-Wextra",
Sundong Ahn80af4e42021-12-02 01:01:49 +0000164 ],
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900165 srcs: ["service.cpp"],
166 shared_libs: [
167 "libbase",
168 "libcutils",
Gabriel Biren631a8112022-12-01 22:29:32 +0000169 "libhidlbase",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900170 "liblog",
171 "libnl",
172 "libutils",
173 "libwifi-hal",
174 "libwifi-system-iface",
175 "libxml2",
Gabriel Biren631a8112022-12-01 22:29:32 +0000176 "android.hardware.wifi@1.0",
177 "android.hardware.wifi@1.1",
178 "android.hardware.wifi@1.2",
179 "android.hardware.wifi@1.3",
180 "android.hardware.wifi@1.4",
181 "android.hardware.wifi@1.5",
182 "android.hardware.wifi@1.6",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900183 ],
Gabriel Biren631a8112022-12-01 22:29:32 +0000184 static_libs: ["android.hardware.wifi@1.0-service-lib"],
185 init_rc: ["android.hardware.wifi@1.0-service-lazy.rc"],
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900186}
187
188cc_test {
Gabriel Biren631a8112022-12-01 22:29:32 +0000189 name: "android.hardware.wifi@1.0-service-tests",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900190 proprietary: true,
Jiyong Park46afe632022-08-12 13:40:26 +0900191 compile_multilib: "first",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900192 cppflags: [
193 "-Wall",
194 "-Werror",
195 "-Wextra",
196 ],
197 srcs: [
Gabriel Biren631a8112022-12-01 22:29:32 +0000198 "tests/hidl_struct_util_unit_tests.cpp",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900199 "tests/main.cpp",
200 "tests/mock_interface_tool.cpp",
201 "tests/mock_wifi_feature_flags.cpp",
202 "tests/mock_wifi_iface_util.cpp",
203 "tests/mock_wifi_legacy_hal.cpp",
204 "tests/mock_wifi_mode_controller.cpp",
205 "tests/ringbuffer_unit_tests.cpp",
206 "tests/wifi_nan_iface_unit_tests.cpp",
207 "tests/wifi_chip_unit_tests.cpp",
208 "tests/wifi_iface_util_unit_tests.cpp",
209 ],
210 static_libs: [
211 "libgmock",
212 "libgtest",
Gabriel Biren631a8112022-12-01 22:29:32 +0000213 "android.hardware.wifi@1.0",
214 "android.hardware.wifi@1.1",
215 "android.hardware.wifi@1.2",
216 "android.hardware.wifi@1.3",
217 "android.hardware.wifi@1.4",
218 "android.hardware.wifi@1.5",
219 "android.hardware.wifi@1.6",
220 "android.hardware.wifi@1.0-service-lib",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900221 ],
222 shared_libs: [
223 "libbase",
224 "libcutils",
Gabriel Biren631a8112022-12-01 22:29:32 +0000225 "libhidlbase",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900226 "liblog",
227 "libnl",
228 "libutils",
229 "libwifi-hal",
230 "libwifi-system-iface",
231 ],
Sundong Ahn80af4e42021-12-02 01:01:49 +0000232}
Kenn Frankele85de1d2022-10-07 22:13:38 +0000233
234filegroup {
Gabriel Biren631a8112022-12-01 22:29:32 +0000235 name: "default-android.hardware.wifi@1.0-service.rc",
236 srcs: ["android.hardware.wifi@1.0-service.rc"],
Kenn Frankele85de1d2022-10-07 22:13:38 +0000237}
238
239filegroup {
Gabriel Biren631a8112022-12-01 22:29:32 +0000240 name: "default-android.hardware.wifi@1.0-service.xml",
241 srcs: ["android.hardware.wifi@1.0-service.xml"],
Kenn Frankele85de1d2022-10-07 22:13:38 +0000242}