1// Copyright (C) 2016 The Android Open Source Project 2// 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: ["system_connectivity_wificond_license"], 17} 18 19// Added automatically by a large-scale-change that took the approach of 20// 'apply every license found to every target'. While this makes sure we respect 21// every license restriction, it may not be entirely correct. 22// 23// e.g. GPL in an MIT project might only apply to the contrib/ directory. 24// 25// Please consider splitting the single license below into multiple licenses, 26// taking care not to lose any license_kind information, and overriding the 27// default license using the 'licenses: [...]' property on targets as needed. 28// 29// For unused files, consider creating a 'filegroup' with "//visibility:private" 30// to attach the license to, and including a comment whether the files may be 31// used in the current project. 32// http://go/android-license-faq 33license { 34 name: "system_connectivity_wificond_license", 35 visibility: [":__subpackages__"], 36 license_kinds: [ 37 "SPDX-license-identifier-Apache-2.0", 38 "SPDX-license-identifier-ISC", 39 ], 40 license_text: [ 41 "NOTICE", 42 ], 43} 44 45cc_defaults { 46 name: "wificond_defaults", 47 48 cppflags: [ 49 "-Wall", 50 "-Werror", 51 "-Wno-unused-parameter", 52 ], 53 include_dirs: ["system/connectivity"], 54} 55 56// 57// wificond daemon. 58// 59cc_binary { 60 name: "wificond", 61 defaults: [ 62 "keystore2_use_latest_aidl_ndk_shared", 63 "wificond_defaults", 64 ], 65 init_rc: ["wificond.rc"], 66 srcs: [ 67 "main.cpp", 68 "wifi_keystore_hal_connector.cpp" 69 ], 70 include_dirs: ["system/security/keystore/include"], 71 72 shared_libs: [ 73 "android.hardware.net.nlinterceptor-V1-ndk", 74 "android.security.legacykeystore-ndk", 75 "libbinder", 76 "libbinder_ndk", 77 "libbase", 78 "libcrypto", 79 "libcutils", 80 "libhidlbase", 81 "libminijail", 82 "libssl", 83 "libutils", 84 "libwifi-system-iface", 85 "android.system.wifi.keystore@1.0", 86 ], 87 static_libs: [ 88 "libnlinterceptor", 89 "libwificond", // Wificond daemon 90 "libwifikeystorehal" // Wifi Keystore HAL service 91 ], 92} 93 94// 95// wificond static library 96// 97cc_library_static { 98 name: "libwificond", 99 defaults: ["wificond_defaults"], 100 srcs: [ 101 "ap_interface_binder.cpp", 102 "ap_interface_impl.cpp", 103 "client_interface_binder.cpp", 104 "client_interface_impl.cpp", 105 "device_wiphy_capabilities.cpp", 106 "logging_utils.cpp", 107 "client/native_wifi_client.cpp", 108 "scanning/channel_settings.cpp", 109 "scanning/hidden_network.cpp", 110 "scanning/pno_network.cpp", 111 "scanning/pno_settings.cpp", 112 "scanning/radio_chain_info.cpp", 113 "scanning/scan_result.cpp", 114 "scanning/single_scan_settings.cpp", 115 "scanning/scan_utils.cpp", 116 "scanning/scanner_impl.cpp", 117 "server.cpp", 118 ], 119 120 shared_libs: [ 121 "android.hardware.net.nlinterceptor-V1-ndk", 122 "libbase", 123 "libbinder", 124 "libutils", 125 "libwifi-system-iface", 126 ], 127 whole_static_libs: [ 128 "libnlinterceptor", 129 "libwificond_ipc", 130 "libwificond_nl", 131 "libwificond_event_loop", 132 ], 133} 134 135// 136// wificond netlink library 137// 138cc_library_static { 139 name: "libwificond_nl", 140 defaults: ["wificond_defaults"], 141 srcs: [ 142 "net/mlme_event.cpp", 143 "net/netlink_manager.cpp", 144 "net/netlink_utils.cpp", 145 "net/nl80211_attribute.cpp", 146 "net/nl80211_packet.cpp", 147 ], 148 shared_libs: [ 149 "android.hardware.net.nlinterceptor-V1-ndk", 150 "libbinder_ndk", 151 "libbase", 152 ], 153 whole_static_libs: [ 154 "libnlinterceptor", 155 "android.hardware.automotive.can@libnetdevice", 156 "libnl++", 157 ], 158} 159 160// 161// wificond event loop library 162// 163cc_library_static { 164 name: "libwificond_event_loop", 165 defaults: ["wificond_defaults"], 166 srcs: ["looper_backed_event_loop.cpp"], 167 whole_static_libs: [ 168 "liblog", 169 "libbase", 170 ], 171 172} 173 174// 175// wificond IPC interface library 176// 177cc_library_static { 178 name: "libwificond_ipc", 179 defaults: ["wificond_defaults"], 180 aidl: { 181 local_include_dirs: ["aidl"], 182 export_aidl_headers: true, 183 }, 184 export_shared_lib_headers: ["libbinder"], 185 srcs: [ 186 "ipc_constants.cpp", 187 ":libwificond_ipc_aidl", 188 "client/native_wifi_client.cpp", 189 "device_wiphy_capabilities.cpp", 190 "scanning/channel_settings.cpp", 191 "scanning/hidden_network.cpp", 192 "scanning/pno_network.cpp", 193 "scanning/pno_settings.cpp", 194 "scanning/radio_chain_info.cpp", 195 "scanning/scan_result.cpp", 196 "scanning/single_scan_settings.cpp", 197 ], 198 shared_libs: [ 199 "android.hardware.net.nlinterceptor-V1-ndk", 200 "libbinder", 201 ], 202 static_libs: ["libnlinterceptor"], 203} 204 205filegroup { 206 name: "libwificond_ipc_aidl", 207 srcs: [ 208 "aidl/android/net/wifi/nl80211/IApInterface.aidl", 209 "aidl/android/net/wifi/nl80211/IApInterfaceEventCallback.aidl", 210 "aidl/android/net/wifi/nl80211/IClientInterface.aidl", 211 "aidl/android/net/wifi/nl80211/IInterfaceEventCallback.aidl", 212 "aidl/android/net/wifi/nl80211/IPnoScanEvent.aidl", 213 "aidl/android/net/wifi/nl80211/IScanEvent.aidl", 214 "aidl/android/net/wifi/nl80211/ISendMgmtFrameEvent.aidl", 215 "aidl/android/net/wifi/nl80211/IWificond.aidl", 216 "aidl/android/net/wifi/nl80211/IWificondEventCallback.aidl", 217 "aidl/android/net/wifi/nl80211/IWifiScannerImpl.aidl", 218 ], 219 path: "aidl", 220} 221 222// 223// test util library 224// 225cc_library_static { 226 name: "libwificond_test_utils", 227 defaults: ["wificond_defaults"], 228 srcs: [ 229 "tests/integration/process_utils.cpp", 230 "tests/shell_utils.cpp", 231 ], 232 shared_libs: ["libbase"], 233 234 whole_static_libs: [ 235 "libwificond_ipc", 236 "libwificond_event_loop", 237 ], 238} 239 240// 241// wificond unit tests. 242// 243cc_test { 244 name: "wificond_unit_test", 245 defaults: ["wificond_defaults"], 246 test_suites: ["device-tests"], 247 tidy_timeout_srcs: [ 248 "tests/client_interface_impl_unittest.cpp", 249 "tests/netlink_utils_unittest.cpp", 250 "tests/scanner_unittest.cpp", 251 "tests/scan_utils_unittest.cpp", 252 "tests/server_unittest.cpp", 253 ], 254 srcs: [ 255 "tests/ap_interface_impl_unittest.cpp", 256 "tests/client_interface_impl_unittest.cpp", 257 "tests/looper_backed_event_loop_unittest.cpp", 258 "tests/main.cpp", 259 "tests/mock_client_interface_impl.cpp", 260 "tests/mock_netlink_manager.cpp", 261 "tests/mock_netlink_utils.cpp", 262 "tests/mock_scan_utils.cpp", 263 "tests/native_wifi_client_unittest.cpp", 264 "tests/netlink_manager_unittest.cpp", 265 "tests/netlink_utils_unittest.cpp", 266 "tests/nl80211_attribute_unittest.cpp", 267 "tests/nl80211_packet_unittest.cpp", 268 "tests/scanner_unittest.cpp", 269 "tests/scan_result_unittest.cpp", 270 "tests/scan_settings_unittest.cpp", 271 "tests/scan_utils_unittest.cpp", 272 "tests/server_unittest.cpp", 273 ], 274 275 static_libs: [ 276 "libgmock", 277 "libgtest", 278 "libnlinterceptor", 279 "libwifi-system-iface-test", 280 "libwificond", 281 "libwificond_nl", 282 ], 283 shared_libs: [ 284 "android.hardware.net.nlinterceptor-V1-ndk", 285 "libbase", 286 "libbinder", 287 "libbinder_ndk", 288 "libcutils", 289 "liblog", 290 "libutils", 291 "libwifi-system-iface", 292 ], 293} 294 295// 296// wificond device integration tests. 297// 298cc_test { 299 name: "wificond_integration_test", 300 defaults: ["wificond_defaults"], 301 srcs: [ 302 "tests/integration/ap_interface_test.cpp", 303 "tests/integration/client_interface_test.cpp", 304 "tests/integration/life_cycle_test.cpp", 305 "tests/integration/scanner_test.cpp", 306 "tests/main.cpp", 307 "tests/shell_unittest.cpp", 308 ], 309 shared_libs: [ 310 "libbase", 311 "libbinder", 312 "libcutils", 313 "libutils", 314 "libwifi-system-iface", 315 ], 316 static_libs: [ 317 "libgmock", 318 "libwificond_ipc", 319 "libwificond_test_utils", 320 ], 321} 322