blob: 441d461b789a2faf603a030daae570a7d84e127d [file] [log] [blame]
Gabriel Birene58e2632022-07-15 23:25:39 +00001// Copyright (C) 2022 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
29 ],
30 value_variables: [
31 "hal_interface_combinations", // WIFI_HAL_INTERFACE_COMBINATIONS
32 ],
33 properties: [
34 "cppflags",
35 ],
Sundong Ahn80af4e42021-12-02 01:01:49 +000036}
37
Jooyung Han1e6cdac2022-07-22 17:39:41 +090038wifi_hal_cc_defaults {
Gabriel Birene58e2632022-07-15 23:25:39 +000039 name: "android.hardware.wifi-service-cppflags-defaults",
Jooyung Han1e6cdac2022-07-22 17:39:41 +090040 soong_config_variables: {
41 hidl_feature_aware: {
42 cppflags: ["-DWIFI_HIDL_FEATURE_AWARE"],
43 },
44 hidl_feature_dual_interface: {
45 cppflags: ["-DWIFI_HIDL_FEATURE_DUAL_INTERFACE"],
46 },
47 hidl_feature_disable_ap: {
48 cppflags: ["-DWIFI_HIDL_FEATURE_DISABLE_AP"],
49 },
50 hidl_feature_disable_ap_mac_randomization: {
51 cppflags: ["-DWIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION"],
52 },
53 avoid_iface_reset_mac_change: {
54 cppflags: ["-DWIFI_AVOID_IFACE_RESET_MAC_CHANGE"],
55 },
56 hal_interface_combinations: {
57 cppflags: ["-DWIFI_HAL_INTERFACE_COMBINATIONS=%s"],
58 },
59 },
60}
61
62cc_library_static {
Gabriel Birene58e2632022-07-15 23:25:39 +000063 name: "android.hardware.wifi-service-lib",
64 defaults: ["android.hardware.wifi-service-cppflags-defaults"],
Jooyung Han1e6cdac2022-07-22 17:39:41 +090065 proprietary: true,
Jiyong Park46afe632022-08-12 13:40:26 +090066 compile_multilib: "first",
Sundong Ahn80af4e42021-12-02 01:01:49 +000067 cppflags: [
68 "-Wall",
69 "-Werror",
70 "-Wextra",
71 ],
Jooyung Han1e6cdac2022-07-22 17:39:41 +090072 // Allow implicit fallthroughs in wifi_legacy_hal.cpp until they are fixed.
73 cflags: ["-Wno-error=implicit-fallthrough"],
Sundong Ahn80af4e42021-12-02 01:01:49 +000074 srcs: [
Gabriel Birene58e2632022-07-15 23:25:39 +000075 "aidl_struct_util.cpp",
76 "aidl_sync_util.cpp",
Sundong Ahn80af4e42021-12-02 01:01:49 +000077 "ringbuffer.cpp",
78 "wifi.cpp",
79 "wifi_ap_iface.cpp",
80 "wifi_chip.cpp",
81 "wifi_feature_flags.cpp",
82 "wifi_iface_util.cpp",
83 "wifi_legacy_hal.cpp",
84 "wifi_legacy_hal_factory.cpp",
85 "wifi_legacy_hal_stubs.cpp",
86 "wifi_mode_controller.cpp",
87 "wifi_nan_iface.cpp",
88 "wifi_p2p_iface.cpp",
89 "wifi_rtt_controller.cpp",
90 "wifi_sta_iface.cpp",
91 "wifi_status_util.cpp",
92 ],
Sundong Ahn80af4e42021-12-02 01:01:49 +000093
Sundong Ahn80af4e42021-12-02 01:01:49 +000094 shared_libs: [
Jooyung Han1e6cdac2022-07-22 17:39:41 +090095 "libbase",
Gabriel Birene58e2632022-07-15 23:25:39 +000096 "libbinder_ndk",
Jooyung Han1e6cdac2022-07-22 17:39:41 +090097 "libcutils",
Jooyung Han1e6cdac2022-07-22 17:39:41 +090098 "liblog",
99 "libnl",
100 "libutils",
101 "libwifi-hal",
102 "libwifi-system-iface",
103 "libxml2",
Gabriel Birene58e2632022-07-15 23:25:39 +0000104 "android.hardware.wifi-V1-ndk",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900105 ],
106
107 export_include_dirs: ["."],
108}
109
110cc_binary {
Gabriel Birene58e2632022-07-15 23:25:39 +0000111 name: "android.hardware.wifi-service",
112 vintf_fragments: ["android.hardware.wifi-service.xml"],
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900113 relative_install_path: "hw",
114 proprietary: true,
115 cppflags: [
116 "-Wall",
117 "-Werror",
118 "-Wextra",
119 ],
120 srcs: ["service.cpp"],
121 shared_libs: [
Sundong Ahn80af4e42021-12-02 01:01:49 +0000122 "libbase",
Gabriel Birene58e2632022-07-15 23:25:39 +0000123 "libbinder_ndk",
Sundong Ahn80af4e42021-12-02 01:01:49 +0000124 "libcutils",
Sundong Ahn80af4e42021-12-02 01:01:49 +0000125 "liblog",
126 "libnl",
127 "libutils",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900128 "libwifi-hal",
Sundong Ahn80af4e42021-12-02 01:01:49 +0000129 "libwifi-system-iface",
130 "libxml2",
Gabriel Birene58e2632022-07-15 23:25:39 +0000131 "android.hardware.wifi-V1-ndk",
Sundong Ahn80af4e42021-12-02 01:01:49 +0000132 ],
Gabriel Birene58e2632022-07-15 23:25:39 +0000133 static_libs: ["android.hardware.wifi-service-lib"],
134 init_rc: ["android.hardware.wifi-service.rc"],
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900135}
136
137cc_binary {
Gabriel Birene58e2632022-07-15 23:25:39 +0000138 name: "android.hardware.wifi-service-lazy",
139 vintf_fragments: ["android.hardware.wifi-service.xml"],
140 overrides: ["android.hardware.wifi-service"],
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900141 cflags: ["-DLAZY_SERVICE"],
142 relative_install_path: "hw",
143 proprietary: true,
Sundong Ahn80af4e42021-12-02 01:01:49 +0000144 cppflags: [
145 "-Wall",
146 "-Werror",
147 "-Wextra",
Sundong Ahn80af4e42021-12-02 01:01:49 +0000148 ],
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900149 srcs: ["service.cpp"],
150 shared_libs: [
151 "libbase",
Gabriel Birene58e2632022-07-15 23:25:39 +0000152 "libbinder_ndk",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900153 "libcutils",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900154 "liblog",
155 "libnl",
156 "libutils",
157 "libwifi-hal",
158 "libwifi-system-iface",
159 "libxml2",
Gabriel Birene58e2632022-07-15 23:25:39 +0000160 "android.hardware.wifi-V1-ndk",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900161 ],
Gabriel Birene58e2632022-07-15 23:25:39 +0000162 static_libs: ["android.hardware.wifi-service-lib"],
163 init_rc: ["android.hardware.wifi-service-lazy.rc"],
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900164}
165
166cc_test {
Gabriel Birene58e2632022-07-15 23:25:39 +0000167 name: "android.hardware.wifi-service-tests",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900168 proprietary: true,
Jiyong Park46afe632022-08-12 13:40:26 +0900169 compile_multilib: "first",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900170 cppflags: [
171 "-Wall",
172 "-Werror",
173 "-Wextra",
174 ],
175 srcs: [
Gabriel Birene58e2632022-07-15 23:25:39 +0000176 "tests/aidl_struct_util_unit_tests.cpp",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900177 "tests/main.cpp",
178 "tests/mock_interface_tool.cpp",
179 "tests/mock_wifi_feature_flags.cpp",
180 "tests/mock_wifi_iface_util.cpp",
181 "tests/mock_wifi_legacy_hal.cpp",
182 "tests/mock_wifi_mode_controller.cpp",
183 "tests/ringbuffer_unit_tests.cpp",
184 "tests/wifi_nan_iface_unit_tests.cpp",
185 "tests/wifi_chip_unit_tests.cpp",
186 "tests/wifi_iface_util_unit_tests.cpp",
187 ],
188 static_libs: [
189 "libgmock",
190 "libgtest",
Gabriel Birene58e2632022-07-15 23:25:39 +0000191 "android.hardware.wifi-V1-ndk",
192 "android.hardware.wifi-service-lib",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900193 ],
194 shared_libs: [
195 "libbase",
Gabriel Birene58e2632022-07-15 23:25:39 +0000196 "libbinder_ndk",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900197 "libcutils",
Jooyung Han1e6cdac2022-07-22 17:39:41 +0900198 "liblog",
199 "libnl",
200 "libutils",
201 "libwifi-hal",
202 "libwifi-system-iface",
203 ],
Sundong Ahn80af4e42021-12-02 01:01:49 +0000204}
Kenn Frankele85de1d2022-10-07 22:13:38 +0000205
206filegroup {
Gabriel Birene58e2632022-07-15 23:25:39 +0000207 name: "default-android.hardware.wifi-service.rc",
208 srcs: ["android.hardware.wifi-service.rc"],
Kenn Frankele85de1d2022-10-07 22:13:38 +0000209}
210
211filegroup {
Gabriel Birene58e2632022-07-15 23:25:39 +0000212 name: "default-android.hardware.wifi-service.xml",
213 srcs: ["android.hardware.wifi-service.xml"],
Kenn Frankele85de1d2022-10-07 22:13:38 +0000214}