Dmitry Shmidt | c81d5b6 | 2012-05-14 13:35:02 -0700 | [diff] [blame] | 1 | # Copyright (C) 2008 The Android Open Source Project |
| 2 | # |
| 3 | # This software may be distributed under the terms of the BSD license. |
| 4 | # See README for more details. |
| 5 | # |
| 6 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 7 | LOCAL_PATH := $(call my-dir) |
| 8 | |
| 9 | WPA_BUILD_HOSTAPD := false |
Jeff Brown | bbda627 | 2011-07-11 22:12:15 -0700 | [diff] [blame] | 10 | ifneq ($(BOARD_HOSTAPD_DRIVER),) |
| 11 | WPA_BUILD_HOSTAPD := true |
| 12 | CONFIG_DRIVER_$(BOARD_HOSTAPD_DRIVER) := y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 13 | endif |
| 14 | |
Dmitry Shmidt | e61a2d6 | 2011-06-27 10:59:51 -0700 | [diff] [blame] | 15 | ifeq ($(WPA_BUILD_HOSTAPD),true) |
| 16 | |
Dmitry Shmidt | 7dd0f20 | 2012-02-21 16:49:00 -0800 | [diff] [blame] | 17 | include $(LOCAL_PATH)/android.config |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 18 | |
| 19 | # To ignore possible wrong network configurations |
| 20 | L_CFLAGS = -DWPA_IGNORE_CONFIG_ERRORS |
| 21 | |
Dmitry Shmidt | 95613e4 | 2011-10-25 10:50:42 -0700 | [diff] [blame] | 22 | L_CFLAGS += -DVERSION_STR_POSTFIX=\"-$(PLATFORM_VERSION)\" |
| 23 | |
Dmitry Shmidt | 648b749 | 2011-09-30 15:03:42 -0700 | [diff] [blame] | 24 | # Set Android log name |
| 25 | L_CFLAGS += -DANDROID_LOG_NAME=\"hostapd\" |
| 26 | |
Chih-Hung Hsieh | 0220b4c | 2017-11-07 11:08:08 -0800 | [diff] [blame] | 27 | L_CFLAGS += -Wall -Werror |
| 28 | |
Elliott Hughes | 17cb3c1 | 2018-01-22 13:31:46 -0800 | [diff] [blame] | 29 | # TODO: move off readdir_r upstream, pull fix back (http://b/72326431). |
| 30 | L_CFLAGS += -Wno-error-deprecated-declarations |
| 31 | |
Dmitry Shmidt | f9bdef9 | 2014-04-25 10:46:36 -0700 | [diff] [blame] | 32 | # Disable unused parameter warnings |
| 33 | L_CFLAGS += -Wno-unused-parameter |
| 34 | |
Chih-Hung Hsieh | 0220b4c | 2017-11-07 11:08:08 -0800 | [diff] [blame] | 35 | # Disable unused variable warnings |
| 36 | L_CFLAGS += -Wno-unused-variable |
| 37 | |
Christopher Ferris | b6c19e0 | 2017-02-23 15:50:04 -0800 | [diff] [blame] | 38 | # Disable macro redefined warnings |
| 39 | L_CFLAGS += -Wno-macro-redefined |
| 40 | |
Dmitry Shmidt | b58836e | 2014-04-29 14:35:56 -0700 | [diff] [blame] | 41 | # Set Android extended P2P functionality |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 42 | L_CFLAGS += -DANDROID_P2P |
Dmitry Shmidt | 4171258 | 2015-06-29 11:02:15 -0700 | [diff] [blame] | 43 | |
Dmitry Shmidt | b58836e | 2014-04-29 14:35:56 -0700 | [diff] [blame] | 44 | ifeq ($(BOARD_HOSTAPD_PRIVATE_LIB),) |
Dmitry Shmidt | 4171258 | 2015-06-29 11:02:15 -0700 | [diff] [blame] | 45 | L_CFLAGS += -DANDROID_LIB_STUB |
Mike J. Chen | 0cc49e8 | 2012-12-05 11:20:29 -0800 | [diff] [blame] | 46 | endif |
| 47 | |
Jeff Johnson | 205f214 | 2012-09-03 22:12:17 -0700 | [diff] [blame] | 48 | # Use Android specific directory for control interface sockets |
Huajun Tong | 527b3ba | 2018-04-20 16:29:50 +0800 | [diff] [blame] | 49 | L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/vendor/wifi/hostapd/sockets\" |
| 50 | L_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/vendor/wifi/hostapd/ctrl\" |
Jeff Johnson | 205f214 | 2012-09-03 22:12:17 -0700 | [diff] [blame] | 51 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 52 | # Use Android specific directory for hostapd_cli command completion history |
Huajun Tong | 527b3ba | 2018-04-20 16:29:50 +0800 | [diff] [blame] | 53 | L_CFLAGS += -DCONFIG_HOSTAPD_CLI_HISTORY_DIR=\"/data/vendor/wifi/hostapd\" |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 54 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 55 | # To force sizeof(enum) = 4 |
| 56 | ifeq ($(TARGET_ARCH),arm) |
| 57 | L_CFLAGS += -mabi=aapcs-linux |
| 58 | endif |
| 59 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 60 | INCLUDES = $(LOCAL_PATH) |
| 61 | INCLUDES += $(LOCAL_PATH)/src |
| 62 | INCLUDES += $(LOCAL_PATH)/src/utils |
Stephen Smalley | f1396b4 | 2012-11-16 12:50:03 -0500 | [diff] [blame] | 63 | INCLUDES += system/security/keystore/include |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 64 | ifdef CONFIG_DRIVER_NL80211 |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 65 | ifneq ($(wildcard external/libnl),) |
Dmitry Shmidt | d620e6d | 2014-02-18 11:07:59 -0800 | [diff] [blame] | 66 | INCLUDES += external/libnl/include |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 67 | else |
| 68 | INCLUDES += external/libnl-headers |
| 69 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 70 | endif |
| 71 | |
| 72 | |
| 73 | ifndef CONFIG_OS |
| 74 | ifdef CONFIG_NATIVE_WINDOWS |
| 75 | CONFIG_OS=win32 |
| 76 | else |
| 77 | CONFIG_OS=unix |
| 78 | endif |
| 79 | endif |
| 80 | |
| 81 | ifeq ($(CONFIG_OS), internal) |
| 82 | L_CFLAGS += -DOS_NO_C_LIB_DEFINES |
| 83 | endif |
| 84 | |
| 85 | ifdef CONFIG_NATIVE_WINDOWS |
| 86 | L_CFLAGS += -DCONFIG_NATIVE_WINDOWS |
| 87 | LIBS += -lws2_32 |
| 88 | endif |
| 89 | |
| 90 | OBJS = main.c |
| 91 | OBJS += config_file.c |
| 92 | |
| 93 | OBJS += src/ap/hostapd.c |
| 94 | OBJS += src/ap/wpa_auth_glue.c |
| 95 | OBJS += src/ap/drv_callbacks.c |
| 96 | OBJS += src/ap/ap_drv_ops.c |
| 97 | OBJS += src/ap/utils.c |
| 98 | OBJS += src/ap/authsrv.c |
| 99 | OBJS += src/ap/ieee802_1x.c |
| 100 | OBJS += src/ap/ap_config.c |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 101 | OBJS += src/ap/eap_user_db.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 102 | OBJS += src/ap/ieee802_11_auth.c |
| 103 | OBJS += src/ap/sta_info.c |
| 104 | OBJS += src/ap/wpa_auth.c |
| 105 | OBJS += src/ap/tkip_countermeasures.c |
| 106 | OBJS += src/ap/ap_mlme.c |
| 107 | OBJS += src/ap/wpa_auth_ie.c |
| 108 | OBJS += src/ap/preauth_auth.c |
| 109 | OBJS += src/ap/pmksa_cache_auth.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 110 | OBJS += src/ap/ieee802_11_shared.c |
| 111 | OBJS += src/ap/beacon.c |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 112 | OBJS += src/ap/bss_load.c |
Dmitry Shmidt | 849734c | 2016-05-27 09:59:01 -0700 | [diff] [blame] | 113 | OBJS += src/ap/neighbor_db.c |
| 114 | OBJS += src/ap/rrm.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 115 | OBJS_d = |
| 116 | OBJS_p = |
| 117 | LIBS = |
| 118 | LIBS_c = |
| 119 | HOBJS = |
| 120 | LIBS_h = |
| 121 | |
| 122 | NEED_RC4=y |
| 123 | NEED_AES=y |
| 124 | NEED_MD5=y |
| 125 | NEED_SHA1=y |
| 126 | |
| 127 | OBJS += src/drivers/drivers.c |
| 128 | L_CFLAGS += -DHOSTAPD |
| 129 | |
| 130 | ifdef CONFIG_WPA_TRACE |
| 131 | L_CFLAGS += -DWPA_TRACE |
| 132 | OBJS += src/utils/trace.c |
| 133 | HOBJS += src/utils/trace.c |
| 134 | LDFLAGS += -rdynamic |
| 135 | L_CFLAGS += -funwind-tables |
| 136 | ifdef CONFIG_WPA_TRACE_BFD |
| 137 | L_CFLAGS += -DWPA_TRACE_BFD |
| 138 | LIBS += -lbfd |
| 139 | LIBS_c += -lbfd |
| 140 | LIBS_h += -lbfd |
| 141 | endif |
| 142 | endif |
| 143 | |
| 144 | OBJS += src/utils/eloop.c |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 145 | |
| 146 | ifdef CONFIG_ELOOP_POLL |
| 147 | L_CFLAGS += -DCONFIG_ELOOP_POLL |
| 148 | endif |
| 149 | |
| 150 | ifdef CONFIG_ELOOP_EPOLL |
| 151 | L_CFLAGS += -DCONFIG_ELOOP_EPOLL |
| 152 | endif |
| 153 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 154 | OBJS += src/utils/common.c |
| 155 | OBJS += src/utils/wpa_debug.c |
| 156 | OBJS += src/utils/wpabuf.c |
| 157 | OBJS += src/utils/os_$(CONFIG_OS).c |
| 158 | OBJS += src/utils/ip_addr.c |
| 159 | |
| 160 | OBJS += src/common/ieee802_11_common.c |
| 161 | OBJS += src/common/wpa_common.c |
Dmitry Shmidt | 746bde5 | 2015-01-12 13:01:47 -0800 | [diff] [blame] | 162 | OBJS += src/common/hw_features_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 163 | |
| 164 | OBJS += src/eapol_auth/eapol_auth_sm.c |
| 165 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 166 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 167 | ifndef CONFIG_NO_DUMP_STATE |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 168 | # define HOSTAPD_DUMP_STATE to include support for dumping internal state |
| 169 | # through control interface commands (undefine it, if you want to save in |
| 170 | # binary size) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 171 | L_CFLAGS += -DHOSTAPD_DUMP_STATE |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 172 | OBJS += src/eapol_auth/eapol_auth_dump.c |
| 173 | endif |
| 174 | |
| 175 | ifdef CONFIG_NO_RADIUS |
| 176 | L_CFLAGS += -DCONFIG_NO_RADIUS |
| 177 | CONFIG_NO_ACCOUNTING=y |
| 178 | else |
| 179 | OBJS += src/radius/radius.c |
| 180 | OBJS += src/radius/radius_client.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 181 | OBJS += src/radius/radius_das.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 182 | endif |
| 183 | |
| 184 | ifdef CONFIG_NO_ACCOUNTING |
| 185 | L_CFLAGS += -DCONFIG_NO_ACCOUNTING |
| 186 | else |
| 187 | OBJS += src/ap/accounting.c |
| 188 | endif |
| 189 | |
| 190 | ifdef CONFIG_NO_VLAN |
| 191 | L_CFLAGS += -DCONFIG_NO_VLAN |
| 192 | else |
| 193 | OBJS += src/ap/vlan_init.c |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 194 | OBJS += src/ap/vlan_ifconfig.c |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 195 | OBJS += src/ap/vlan.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 196 | ifdef CONFIG_FULL_DYNAMIC_VLAN |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 197 | # Define CONFIG_FULL_DYNAMIC_VLAN to have hostapd manipulate bridges |
| 198 | # and VLAN interfaces for the VLAN feature. |
| 199 | L_CFLAGS += -DCONFIG_FULL_DYNAMIC_VLAN |
| 200 | OBJS += src/ap/vlan_full.c |
| 201 | ifdef CONFIG_VLAN_NETLINK |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 202 | OBJS += src/ap/vlan_util.c |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 203 | else |
| 204 | OBJS += src/ap/vlan_ioctl.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 205 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 206 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 207 | endif |
| 208 | |
| 209 | ifdef CONFIG_NO_CTRL_IFACE |
| 210 | L_CFLAGS += -DCONFIG_NO_CTRL_IFACE |
| 211 | else |
Dmitry Shmidt | 31a29cc | 2016-03-09 15:58:17 -0800 | [diff] [blame] | 212 | OBJS += src/common/ctrl_iface_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 213 | OBJS += ctrl_iface.c |
| 214 | OBJS += src/ap/ctrl_iface_ap.c |
| 215 | endif |
| 216 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 217 | L_CFLAGS += -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX |
| 218 | |
| 219 | ifdef CONFIG_IAPP |
| 220 | L_CFLAGS += -DCONFIG_IAPP |
| 221 | OBJS += src/ap/iapp.c |
| 222 | endif |
| 223 | |
| 224 | ifdef CONFIG_RSN_PREAUTH |
| 225 | L_CFLAGS += -DCONFIG_RSN_PREAUTH |
| 226 | CONFIG_L2_PACKET=y |
| 227 | endif |
| 228 | |
Dmitry Shmidt | f21452a | 2014-02-26 10:55:25 -0800 | [diff] [blame] | 229 | ifdef CONFIG_HS20 |
| 230 | NEED_AES_OMAC1=y |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 231 | CONFIG_PROXYARP=y |
| 232 | endif |
| 233 | |
| 234 | ifdef CONFIG_PROXYARP |
| 235 | CONFIG_L2_PACKET=y |
| 236 | endif |
| 237 | |
| 238 | ifdef CONFIG_SUITEB |
| 239 | L_CFLAGS += -DCONFIG_SUITEB |
| 240 | NEED_SHA256=y |
| 241 | NEED_AES_OMAC1=y |
Dmitry Shmidt | f21452a | 2014-02-26 10:55:25 -0800 | [diff] [blame] | 242 | endif |
| 243 | |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 244 | ifdef CONFIG_SUITEB192 |
| 245 | L_CFLAGS += -DCONFIG_SUITEB192 |
| 246 | NEED_SHA384=y |
| 247 | endif |
| 248 | |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 249 | ifdef CONFIG_OCV |
| 250 | L_CFLAGS += -DCONFIG_OCV |
| 251 | OBJS += src/common/ocv.c |
| 252 | CONFIG_IEEE80211W=y |
| 253 | endif |
| 254 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 255 | ifdef CONFIG_IEEE80211W |
| 256 | L_CFLAGS += -DCONFIG_IEEE80211W |
| 257 | NEED_SHA256=y |
| 258 | NEED_AES_OMAC1=y |
| 259 | endif |
| 260 | |
| 261 | ifdef CONFIG_IEEE80211R |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 262 | L_CFLAGS += -DCONFIG_IEEE80211R -DCONFIG_IEEE80211R_AP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 263 | OBJS += src/ap/wpa_auth_ft.c |
| 264 | NEED_SHA256=y |
| 265 | NEED_AES_OMAC1=y |
| 266 | NEED_AES_UNWRAP=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 267 | NEED_AES_SIV=y |
| 268 | NEED_ETH_P_OUI=y |
| 269 | NEED_SHA256=y |
| 270 | NEED_HMAC_SHA256_KDF=y |
| 271 | endif |
| 272 | |
| 273 | ifdef NEED_ETH_P_OUI |
| 274 | L_CFLAGS += -DCONFIG_ETH_P_OUI |
| 275 | OBJS += src/ap/eth_p_oui.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 276 | endif |
| 277 | |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 278 | ifdef CONFIG_SAE |
| 279 | L_CFLAGS += -DCONFIG_SAE |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 280 | OBJS += src/common/sae.c |
| 281 | NEED_ECC=y |
| 282 | NEED_DH_GROUPS=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame^] | 283 | NEED_DRAGONFLY=y |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 284 | endif |
| 285 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 286 | ifdef CONFIG_OWE |
| 287 | L_CFLAGS += -DCONFIG_OWE |
| 288 | NEED_ECC=y |
| 289 | NEED_HMAC_SHA256_KDF=y |
| 290 | NEED_HMAC_SHA384_KDF=y |
| 291 | NEED_HMAC_SHA512_KDF=y |
| 292 | NEED_SHA256=y |
| 293 | NEED_SHA384=y |
| 294 | NEED_SHA512=y |
| 295 | endif |
| 296 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 297 | ifdef CONFIG_FILS |
| 298 | L_CFLAGS += -DCONFIG_FILS |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 299 | OBJS += src/ap/fils_hlp.c |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 300 | NEED_SHA384=y |
| 301 | NEED_AES_SIV=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 302 | ifdef CONFIG_FILS_SK_PFS |
| 303 | L_CFLAGS += -DCONFIG_FILS_SK_PFS |
| 304 | NEED_ECC=y |
| 305 | endif |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 306 | endif |
| 307 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 308 | ifdef CONFIG_WNM |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 309 | L_CFLAGS += -DCONFIG_WNM -DCONFIG_WNM_AP |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 310 | OBJS += src/ap/wnm_ap.c |
| 311 | endif |
| 312 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 313 | ifdef CONFIG_IEEE80211N |
| 314 | L_CFLAGS += -DCONFIG_IEEE80211N |
| 315 | endif |
| 316 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 317 | ifdef CONFIG_IEEE80211AC |
| 318 | L_CFLAGS += -DCONFIG_IEEE80211AC |
| 319 | endif |
| 320 | |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 321 | ifdef CONFIG_IEEE80211AX |
| 322 | L_CFLAGS += -DCONFIG_IEEE80211AX |
| 323 | endif |
| 324 | |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 325 | ifdef CONFIG_MBO |
| 326 | L_CFLAGS += -DCONFIG_MBO |
| 327 | OBJS += src/ap/mbo_ap.c |
| 328 | endif |
| 329 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 330 | ifdef CONFIG_FST |
| 331 | L_CFLAGS += -DCONFIG_FST |
| 332 | OBJS += src/fst/fst.c |
| 333 | OBJS += src/fst/fst_group.c |
| 334 | OBJS += src/fst/fst_iface.c |
| 335 | OBJS += src/fst/fst_session.c |
| 336 | OBJS += src/fst/fst_ctrl_aux.c |
| 337 | ifdef CONFIG_FST_TEST |
| 338 | L_CFLAGS += -DCONFIG_FST_TEST |
| 339 | endif |
| 340 | ifndef CONFIG_NO_CTRL_IFACE |
| 341 | OBJS += src/fst/fst_ctrl_iface.c |
| 342 | endif |
| 343 | endif |
| 344 | |
| 345 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 346 | include $(LOCAL_PATH)/src/drivers/drivers.mk |
| 347 | |
| 348 | OBJS += $(DRV_AP_OBJS) |
| 349 | L_CFLAGS += $(DRV_AP_CFLAGS) |
| 350 | LDFLAGS += $(DRV_AP_LDFLAGS) |
| 351 | LIBS += $(DRV_AP_LIBS) |
| 352 | |
| 353 | ifdef CONFIG_L2_PACKET |
| 354 | ifdef CONFIG_DNET_PCAP |
| 355 | ifdef CONFIG_L2_FREEBSD |
| 356 | LIBS += -lpcap |
| 357 | OBJS += src/l2_packet/l2_packet_freebsd.c |
| 358 | else |
| 359 | LIBS += -ldnet -lpcap |
| 360 | OBJS += src/l2_packet/l2_packet_pcap.c |
| 361 | endif |
| 362 | else |
| 363 | OBJS += src/l2_packet/l2_packet_linux.c |
| 364 | endif |
| 365 | else |
| 366 | OBJS += src/l2_packet/l2_packet_none.c |
| 367 | endif |
| 368 | |
| 369 | |
| 370 | ifdef CONFIG_EAP_MD5 |
| 371 | L_CFLAGS += -DEAP_SERVER_MD5 |
| 372 | OBJS += src/eap_server/eap_server_md5.c |
| 373 | CHAP=y |
| 374 | endif |
| 375 | |
| 376 | ifdef CONFIG_EAP_TLS |
| 377 | L_CFLAGS += -DEAP_SERVER_TLS |
| 378 | OBJS += src/eap_server/eap_server_tls.c |
| 379 | TLS_FUNCS=y |
| 380 | endif |
| 381 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 382 | ifdef CONFIG_EAP_UNAUTH_TLS |
| 383 | L_CFLAGS += -DEAP_SERVER_UNAUTH_TLS |
| 384 | ifndef CONFIG_EAP_TLS |
| 385 | OBJS += src/eap_server/eap_server_tls.c |
| 386 | TLS_FUNCS=y |
| 387 | endif |
| 388 | endif |
| 389 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 390 | ifdef CONFIG_EAP_PEAP |
| 391 | L_CFLAGS += -DEAP_SERVER_PEAP |
| 392 | OBJS += src/eap_server/eap_server_peap.c |
| 393 | OBJS += src/eap_common/eap_peap_common.c |
| 394 | TLS_FUNCS=y |
| 395 | CONFIG_EAP_MSCHAPV2=y |
| 396 | endif |
| 397 | |
| 398 | ifdef CONFIG_EAP_TTLS |
| 399 | L_CFLAGS += -DEAP_SERVER_TTLS |
| 400 | OBJS += src/eap_server/eap_server_ttls.c |
| 401 | TLS_FUNCS=y |
| 402 | CHAP=y |
| 403 | endif |
| 404 | |
| 405 | ifdef CONFIG_EAP_MSCHAPV2 |
| 406 | L_CFLAGS += -DEAP_SERVER_MSCHAPV2 |
| 407 | OBJS += src/eap_server/eap_server_mschapv2.c |
| 408 | MS_FUNCS=y |
| 409 | endif |
| 410 | |
| 411 | ifdef CONFIG_EAP_GTC |
| 412 | L_CFLAGS += -DEAP_SERVER_GTC |
| 413 | OBJS += src/eap_server/eap_server_gtc.c |
| 414 | endif |
| 415 | |
| 416 | ifdef CONFIG_EAP_SIM |
| 417 | L_CFLAGS += -DEAP_SERVER_SIM |
| 418 | OBJS += src/eap_server/eap_server_sim.c |
| 419 | CONFIG_EAP_SIM_COMMON=y |
| 420 | NEED_AES_CBC=y |
| 421 | endif |
| 422 | |
| 423 | ifdef CONFIG_EAP_AKA |
| 424 | L_CFLAGS += -DEAP_SERVER_AKA |
| 425 | OBJS += src/eap_server/eap_server_aka.c |
| 426 | CONFIG_EAP_SIM_COMMON=y |
| 427 | NEED_SHA256=y |
| 428 | NEED_AES_CBC=y |
| 429 | endif |
| 430 | |
| 431 | ifdef CONFIG_EAP_AKA_PRIME |
| 432 | L_CFLAGS += -DEAP_SERVER_AKA_PRIME |
| 433 | endif |
| 434 | |
| 435 | ifdef CONFIG_EAP_SIM_COMMON |
| 436 | OBJS += src/eap_common/eap_sim_common.c |
| 437 | # Example EAP-SIM/AKA interface for GSM/UMTS authentication. This can be |
| 438 | # replaced with another file implementating the interface specified in |
| 439 | # eap_sim_db.h. |
| 440 | OBJS += src/eap_server/eap_sim_db.c |
| 441 | NEED_FIPS186_2_PRF=y |
| 442 | endif |
| 443 | |
| 444 | ifdef CONFIG_EAP_PAX |
| 445 | L_CFLAGS += -DEAP_SERVER_PAX |
| 446 | OBJS += src/eap_server/eap_server_pax.c src/eap_common/eap_pax_common.c |
| 447 | endif |
| 448 | |
| 449 | ifdef CONFIG_EAP_PSK |
| 450 | L_CFLAGS += -DEAP_SERVER_PSK |
| 451 | OBJS += src/eap_server/eap_server_psk.c src/eap_common/eap_psk_common.c |
| 452 | NEED_AES_OMAC1=y |
| 453 | NEED_AES_ENCBLOCK=y |
| 454 | NEED_AES_EAX=y |
| 455 | endif |
| 456 | |
| 457 | ifdef CONFIG_EAP_SAKE |
| 458 | L_CFLAGS += -DEAP_SERVER_SAKE |
| 459 | OBJS += src/eap_server/eap_server_sake.c src/eap_common/eap_sake_common.c |
| 460 | endif |
| 461 | |
| 462 | ifdef CONFIG_EAP_GPSK |
| 463 | L_CFLAGS += -DEAP_SERVER_GPSK |
| 464 | OBJS += src/eap_server/eap_server_gpsk.c src/eap_common/eap_gpsk_common.c |
| 465 | ifdef CONFIG_EAP_GPSK_SHA256 |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 466 | L_CFLAGS += -DEAP_GPSK_SHA256 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 467 | endif |
| 468 | NEED_SHA256=y |
| 469 | NEED_AES_OMAC1=y |
| 470 | endif |
| 471 | |
| 472 | ifdef CONFIG_EAP_PWD |
| 473 | L_CFLAGS += -DEAP_SERVER_PWD |
| 474 | OBJS += src/eap_server/eap_server_pwd.c src/eap_common/eap_pwd_common.c |
| 475 | NEED_SHA256=y |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 476 | NEED_ECC=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame^] | 477 | NEED_DRAGONFLY=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 478 | endif |
| 479 | |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 480 | ifdef CONFIG_EAP_EKE |
| 481 | L_CFLAGS += -DEAP_SERVER_EKE |
| 482 | OBJS += src/eap_server/eap_server_eke.c src/eap_common/eap_eke_common.c |
| 483 | NEED_DH_GROUPS=y |
| 484 | NEED_DH_GROUPS_ALL=y |
| 485 | endif |
| 486 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 487 | ifdef CONFIG_EAP_VENDOR_TEST |
| 488 | L_CFLAGS += -DEAP_SERVER_VENDOR_TEST |
| 489 | OBJS += src/eap_server/eap_server_vendor_test.c |
| 490 | endif |
| 491 | |
| 492 | ifdef CONFIG_EAP_FAST |
| 493 | L_CFLAGS += -DEAP_SERVER_FAST |
| 494 | OBJS += src/eap_server/eap_server_fast.c |
| 495 | OBJS += src/eap_common/eap_fast_common.c |
| 496 | TLS_FUNCS=y |
| 497 | NEED_T_PRF=y |
| 498 | NEED_AES_UNWRAP=y |
| 499 | endif |
| 500 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame^] | 501 | ifdef CONFIG_EAP_TEAP |
| 502 | L_CFLAGS += -DEAP_SERVER_TEAP |
| 503 | OBJS += src/eap_server/eap_server_teap.c |
| 504 | OBJS += src/eap_common/eap_teap_common.c |
| 505 | TLS_FUNCS=y |
| 506 | NEED_T_PRF=y |
| 507 | NEED_SHA384=y |
| 508 | NEED_AES_UNWRAP=y |
| 509 | endif |
| 510 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 511 | ifdef CONFIG_WPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 512 | L_CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC |
| 513 | OBJS += src/utils/uuid.c |
| 514 | OBJS += src/ap/wps_hostapd.c |
| 515 | OBJS += src/eap_server/eap_server_wsc.c src/eap_common/eap_wsc_common.c |
| 516 | OBJS += src/wps/wps.c |
| 517 | OBJS += src/wps/wps_common.c |
| 518 | OBJS += src/wps/wps_attr_parse.c |
| 519 | OBJS += src/wps/wps_attr_build.c |
| 520 | OBJS += src/wps/wps_attr_process.c |
| 521 | OBJS += src/wps/wps_dev_attr.c |
| 522 | OBJS += src/wps/wps_enrollee.c |
| 523 | OBJS += src/wps/wps_registrar.c |
| 524 | NEED_DH_GROUPS=y |
| 525 | NEED_SHA256=y |
| 526 | NEED_BASE64=y |
| 527 | NEED_AES_CBC=y |
| 528 | NEED_MODEXP=y |
| 529 | CONFIG_EAP=y |
| 530 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 531 | ifdef CONFIG_WPS_NFC |
| 532 | L_CFLAGS += -DCONFIG_WPS_NFC |
| 533 | OBJS += src/wps/ndef.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 534 | NEED_WPS_OOB=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 535 | endif |
| 536 | |
| 537 | ifdef NEED_WPS_OOB |
| 538 | L_CFLAGS += -DCONFIG_WPS_OOB |
| 539 | endif |
| 540 | |
| 541 | ifdef CONFIG_WPS_UPNP |
| 542 | L_CFLAGS += -DCONFIG_WPS_UPNP |
| 543 | OBJS += src/wps/wps_upnp.c |
| 544 | OBJS += src/wps/wps_upnp_ssdp.c |
| 545 | OBJS += src/wps/wps_upnp_web.c |
| 546 | OBJS += src/wps/wps_upnp_event.c |
| 547 | OBJS += src/wps/wps_upnp_ap.c |
| 548 | OBJS += src/wps/upnp_xml.c |
| 549 | OBJS += src/wps/httpread.c |
| 550 | OBJS += src/wps/http_client.c |
| 551 | OBJS += src/wps/http_server.c |
| 552 | endif |
| 553 | |
| 554 | ifdef CONFIG_WPS_STRICT |
| 555 | L_CFLAGS += -DCONFIG_WPS_STRICT |
| 556 | OBJS += src/wps/wps_validate.c |
| 557 | endif |
| 558 | |
| 559 | ifdef CONFIG_WPS_TESTING |
| 560 | L_CFLAGS += -DCONFIG_WPS_TESTING |
| 561 | endif |
| 562 | |
| 563 | endif |
| 564 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 565 | ifdef CONFIG_DPP |
| 566 | L_CFLAGS += -DCONFIG_DPP |
| 567 | OBJS += src/common/dpp.c |
| 568 | OBJS += src/ap/dpp_hostapd.c |
| 569 | OBJS += src/ap/gas_query_ap.c |
| 570 | NEED_AES_SIV=y |
| 571 | NEED_HMAC_SHA256_KDF=y |
| 572 | NEED_HMAC_SHA384_KDF=y |
| 573 | NEED_HMAC_SHA512_KDF=y |
| 574 | NEED_SHA256=y |
| 575 | NEED_SHA384=y |
| 576 | NEED_SHA512=y |
| 577 | NEED_JSON=y |
| 578 | NEED_GAS=y |
| 579 | NEED_BASE64=y |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 580 | ifdef CONFIG_DPP2 |
| 581 | L_CFLAGS += -DCONFIG_DPP2 |
| 582 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 583 | endif |
| 584 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 585 | ifdef CONFIG_EAP_IKEV2 |
| 586 | L_CFLAGS += -DEAP_SERVER_IKEV2 |
| 587 | OBJS += src/eap_server/eap_server_ikev2.c src/eap_server/ikev2.c |
| 588 | OBJS += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c |
| 589 | NEED_DH_GROUPS=y |
| 590 | NEED_DH_GROUPS_ALL=y |
| 591 | NEED_MODEXP=y |
| 592 | NEED_CIPHER=y |
| 593 | endif |
| 594 | |
| 595 | ifdef CONFIG_EAP_TNC |
| 596 | L_CFLAGS += -DEAP_SERVER_TNC |
| 597 | OBJS += src/eap_server/eap_server_tnc.c |
| 598 | OBJS += src/eap_server/tncs.c |
| 599 | NEED_BASE64=y |
| 600 | ifndef CONFIG_DRIVER_BSD |
| 601 | LIBS += -ldl |
| 602 | endif |
| 603 | endif |
| 604 | |
| 605 | # Basic EAP functionality is needed for EAPOL |
| 606 | OBJS += eap_register.c |
| 607 | OBJS += src/eap_server/eap_server.c |
| 608 | OBJS += src/eap_common/eap_common.c |
| 609 | OBJS += src/eap_server/eap_server_methods.c |
| 610 | OBJS += src/eap_server/eap_server_identity.c |
| 611 | L_CFLAGS += -DEAP_SERVER_IDENTITY |
| 612 | |
| 613 | ifdef CONFIG_EAP |
| 614 | L_CFLAGS += -DEAP_SERVER |
| 615 | endif |
| 616 | |
| 617 | ifdef CONFIG_PKCS12 |
| 618 | L_CFLAGS += -DPKCS12_FUNCS |
| 619 | endif |
| 620 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame^] | 621 | ifdef NEED_DRAGONFLY |
| 622 | OBJS += src/common/dragonfly.c |
| 623 | endif |
| 624 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 625 | ifdef MS_FUNCS |
| 626 | OBJS += src/crypto/ms_funcs.c |
| 627 | NEED_DES=y |
| 628 | NEED_MD4=y |
| 629 | endif |
| 630 | |
| 631 | ifdef CHAP |
| 632 | OBJS += src/eap_common/chap.c |
| 633 | endif |
| 634 | |
| 635 | ifdef TLS_FUNCS |
| 636 | NEED_DES=y |
| 637 | # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS) |
| 638 | L_CFLAGS += -DEAP_TLS_FUNCS |
| 639 | OBJS += src/eap_server/eap_server_tls_common.c |
| 640 | NEED_TLS_PRF=y |
| 641 | endif |
| 642 | |
| 643 | ifndef CONFIG_TLS |
| 644 | CONFIG_TLS=openssl |
| 645 | endif |
| 646 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 647 | ifdef CONFIG_TLSV11 |
| 648 | L_CFLAGS += -DCONFIG_TLSV11 |
| 649 | endif |
| 650 | |
| 651 | ifdef CONFIG_TLSV12 |
| 652 | L_CFLAGS += -DCONFIG_TLSV12 |
| 653 | NEED_SHA256=y |
| 654 | endif |
| 655 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 656 | ifeq ($(CONFIG_TLS), openssl) |
| 657 | ifdef TLS_FUNCS |
| 658 | OBJS += src/crypto/tls_openssl.c |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 659 | OBJS += src/crypto/tls_openssl_ocsp.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 660 | LIBS += -lssl |
| 661 | endif |
| 662 | OBJS += src/crypto/crypto_openssl.c |
| 663 | HOBJS += src/crypto/crypto_openssl.c |
| 664 | ifdef NEED_FIPS186_2_PRF |
| 665 | OBJS += src/crypto/fips_prf_openssl.c |
| 666 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 667 | NEED_SHA256=y |
| 668 | NEED_TLS_PRF_SHA256=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 669 | LIBS += -lcrypto |
| 670 | LIBS_h += -lcrypto |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 671 | ifndef CONFIG_TLS_DEFAULT_CIPHERS |
| 672 | CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW" |
| 673 | endif |
| 674 | L_CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 675 | endif |
| 676 | |
| 677 | ifeq ($(CONFIG_TLS), gnutls) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 678 | ifndef CONFIG_CRYPTO |
| 679 | # default to libgcrypt |
| 680 | CONFIG_CRYPTO=gnutls |
| 681 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 682 | ifdef TLS_FUNCS |
| 683 | OBJS += src/crypto/tls_gnutls.c |
| 684 | LIBS += -lgnutls -lgpg-error |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 685 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 686 | OBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c |
| 687 | HOBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 688 | ifdef NEED_FIPS186_2_PRF |
Dmitry Shmidt | 9866086 | 2014-03-11 17:26:21 -0700 | [diff] [blame] | 689 | OBJS += src/crypto/fips_prf_internal.c |
| 690 | OBJS += src/crypto/sha1-internal.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 691 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 692 | ifeq ($(CONFIG_CRYPTO), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 693 | LIBS += -lgcrypt |
| 694 | LIBS_h += -lgcrypt |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 695 | CONFIG_INTERNAL_RC4=y |
| 696 | CONFIG_INTERNAL_DH_GROUP5=y |
| 697 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 698 | ifeq ($(CONFIG_CRYPTO), nettle) |
| 699 | LIBS += -lnettle -lgmp |
| 700 | LIBS_p += -lnettle -lgmp |
| 701 | CONFIG_INTERNAL_RC4=y |
| 702 | CONFIG_INTERNAL_DH_GROUP5=y |
| 703 | endif |
| 704 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 705 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 706 | ifeq ($(CONFIG_TLS), internal) |
| 707 | ifndef CONFIG_CRYPTO |
| 708 | CONFIG_CRYPTO=internal |
| 709 | endif |
| 710 | ifdef TLS_FUNCS |
| 711 | OBJS += src/crypto/crypto_internal-rsa.c |
| 712 | OBJS += src/crypto/tls_internal.c |
| 713 | OBJS += src/tls/tlsv1_common.c |
| 714 | OBJS += src/tls/tlsv1_record.c |
| 715 | OBJS += src/tls/tlsv1_cred.c |
| 716 | OBJS += src/tls/tlsv1_server.c |
| 717 | OBJS += src/tls/tlsv1_server_write.c |
| 718 | OBJS += src/tls/tlsv1_server_read.c |
| 719 | OBJS += src/tls/asn1.c |
| 720 | OBJS += src/tls/rsa.c |
| 721 | OBJS += src/tls/x509v3.c |
| 722 | OBJS += src/tls/pkcs1.c |
| 723 | OBJS += src/tls/pkcs5.c |
| 724 | OBJS += src/tls/pkcs8.c |
| 725 | NEED_SHA256=y |
| 726 | NEED_BASE64=y |
| 727 | NEED_TLS_PRF=y |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 728 | ifdef CONFIG_TLSV12 |
| 729 | NEED_TLS_PRF_SHA256=y |
| 730 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 731 | NEED_MODEXP=y |
| 732 | NEED_CIPHER=y |
| 733 | L_CFLAGS += -DCONFIG_TLS_INTERNAL |
| 734 | L_CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER |
| 735 | endif |
| 736 | ifdef NEED_CIPHER |
| 737 | NEED_DES=y |
| 738 | OBJS += src/crypto/crypto_internal-cipher.c |
| 739 | endif |
| 740 | ifdef NEED_MODEXP |
| 741 | OBJS += src/crypto/crypto_internal-modexp.c |
| 742 | OBJS += src/tls/bignum.c |
| 743 | endif |
| 744 | ifeq ($(CONFIG_CRYPTO), libtomcrypt) |
| 745 | OBJS += src/crypto/crypto_libtomcrypt.c |
| 746 | LIBS += -ltomcrypt -ltfm |
| 747 | LIBS_h += -ltomcrypt -ltfm |
| 748 | CONFIG_INTERNAL_SHA256=y |
| 749 | CONFIG_INTERNAL_RC4=y |
| 750 | CONFIG_INTERNAL_DH_GROUP5=y |
| 751 | endif |
| 752 | ifeq ($(CONFIG_CRYPTO), internal) |
| 753 | OBJS += src/crypto/crypto_internal.c |
| 754 | NEED_AES_DEC=y |
| 755 | L_CFLAGS += -DCONFIG_CRYPTO_INTERNAL |
| 756 | ifdef CONFIG_INTERNAL_LIBTOMMATH |
| 757 | L_CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 758 | ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST |
| 759 | L_CFLAGS += -DLTM_FAST |
| 760 | endif |
| 761 | else |
| 762 | LIBS += -ltommath |
| 763 | LIBS_h += -ltommath |
| 764 | endif |
| 765 | CONFIG_INTERNAL_AES=y |
| 766 | CONFIG_INTERNAL_DES=y |
| 767 | CONFIG_INTERNAL_SHA1=y |
| 768 | CONFIG_INTERNAL_MD4=y |
| 769 | CONFIG_INTERNAL_MD5=y |
| 770 | CONFIG_INTERNAL_SHA256=y |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 771 | CONFIG_INTERNAL_SHA384=y |
| 772 | CONFIG_INTERNAL_SHA512=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 773 | CONFIG_INTERNAL_RC4=y |
| 774 | CONFIG_INTERNAL_DH_GROUP5=y |
| 775 | endif |
| 776 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 777 | OBJS += src/crypto/crypto_cryptoapi.c |
| 778 | OBJS_p += src/crypto/crypto_cryptoapi.c |
| 779 | L_CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI |
| 780 | CONFIG_INTERNAL_SHA256=y |
| 781 | CONFIG_INTERNAL_RC4=y |
| 782 | endif |
| 783 | endif |
| 784 | |
| 785 | ifeq ($(CONFIG_TLS), none) |
| 786 | ifdef TLS_FUNCS |
| 787 | OBJS += src/crypto/tls_none.c |
| 788 | L_CFLAGS += -DEAP_TLS_NONE |
| 789 | CONFIG_INTERNAL_AES=y |
| 790 | CONFIG_INTERNAL_SHA1=y |
| 791 | CONFIG_INTERNAL_MD5=y |
| 792 | endif |
| 793 | OBJS += src/crypto/crypto_none.c |
| 794 | OBJS_p += src/crypto/crypto_none.c |
| 795 | CONFIG_INTERNAL_SHA256=y |
| 796 | CONFIG_INTERNAL_RC4=y |
| 797 | endif |
| 798 | |
| 799 | ifndef TLS_FUNCS |
| 800 | OBJS += src/crypto/tls_none.c |
| 801 | ifeq ($(CONFIG_TLS), internal) |
| 802 | CONFIG_INTERNAL_AES=y |
| 803 | CONFIG_INTERNAL_SHA1=y |
| 804 | CONFIG_INTERNAL_MD5=y |
| 805 | CONFIG_INTERNAL_RC4=y |
| 806 | endif |
| 807 | endif |
| 808 | |
| 809 | AESOBJS = # none so far |
| 810 | ifdef CONFIG_INTERNAL_AES |
| 811 | AESOBJS += src/crypto/aes-internal.c src/crypto/aes-internal-enc.c |
| 812 | endif |
| 813 | |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 814 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 815 | AESOBJS += src/crypto/aes-wrap.c |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 816 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 817 | ifdef NEED_AES_EAX |
| 818 | AESOBJS += src/crypto/aes-eax.c |
| 819 | NEED_AES_CTR=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 820 | NEED_AES_OMAC1=y |
| 821 | endif |
| 822 | ifdef NEED_AES_SIV |
| 823 | AESOBJS += src/crypto/aes-siv.c |
| 824 | NEED_AES_CTR=y |
| 825 | NEED_AES_OMAC1=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 826 | endif |
| 827 | ifdef NEED_AES_CTR |
| 828 | AESOBJS += src/crypto/aes-ctr.c |
| 829 | endif |
| 830 | ifdef NEED_AES_ENCBLOCK |
| 831 | AESOBJS += src/crypto/aes-encblock.c |
| 832 | endif |
| 833 | ifdef NEED_AES_OMAC1 |
| 834 | AESOBJS += src/crypto/aes-omac1.c |
| 835 | endif |
| 836 | ifdef NEED_AES_UNWRAP |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 837 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 838 | NEED_AES_DEC=y |
| 839 | AESOBJS += src/crypto/aes-unwrap.c |
| 840 | endif |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 841 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 842 | ifdef NEED_AES_CBC |
| 843 | NEED_AES_DEC=y |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 844 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 845 | AESOBJS += src/crypto/aes-cbc.c |
| 846 | endif |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 847 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 848 | ifdef NEED_AES_DEC |
| 849 | ifdef CONFIG_INTERNAL_AES |
| 850 | AESOBJS += src/crypto/aes-internal-dec.c |
| 851 | endif |
| 852 | endif |
| 853 | ifdef NEED_AES |
| 854 | OBJS += $(AESOBJS) |
| 855 | endif |
| 856 | |
| 857 | SHA1OBJS = |
| 858 | ifdef NEED_SHA1 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 859 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 860 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 861 | SHA1OBJS += src/crypto/sha1.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 862 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 863 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 864 | SHA1OBJS += src/crypto/sha1-prf.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 865 | ifdef CONFIG_INTERNAL_SHA1 |
| 866 | SHA1OBJS += src/crypto/sha1-internal.c |
| 867 | ifdef NEED_FIPS186_2_PRF |
| 868 | SHA1OBJS += src/crypto/fips_prf_internal.c |
| 869 | endif |
| 870 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 871 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 872 | SHA1OBJS += src/crypto/sha1-pbkdf2.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 873 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 874 | ifdef NEED_T_PRF |
| 875 | SHA1OBJS += src/crypto/sha1-tprf.c |
| 876 | endif |
| 877 | ifdef NEED_TLS_PRF |
| 878 | SHA1OBJS += src/crypto/sha1-tlsprf.c |
| 879 | endif |
| 880 | endif |
| 881 | |
| 882 | ifdef NEED_SHA1 |
| 883 | OBJS += $(SHA1OBJS) |
| 884 | endif |
| 885 | |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 886 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 887 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 888 | OBJS += src/crypto/md5.c |
| 889 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 890 | endif |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 891 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 892 | ifdef NEED_MD5 |
| 893 | ifdef CONFIG_INTERNAL_MD5 |
| 894 | OBJS += src/crypto/md5-internal.c |
| 895 | HOBJS += src/crypto/md5-internal.c |
| 896 | endif |
| 897 | endif |
| 898 | |
| 899 | ifdef NEED_MD4 |
| 900 | ifdef CONFIG_INTERNAL_MD4 |
| 901 | OBJS += src/crypto/md4-internal.c |
| 902 | endif |
| 903 | endif |
| 904 | |
| 905 | ifdef NEED_DES |
| 906 | ifdef CONFIG_INTERNAL_DES |
| 907 | OBJS += src/crypto/des-internal.c |
| 908 | endif |
| 909 | endif |
| 910 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 911 | ifdef CONFIG_NO_RC4 |
| 912 | L_CFLAGS += -DCONFIG_NO_RC4 |
| 913 | endif |
| 914 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 915 | ifdef NEED_RC4 |
| 916 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 917 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 918 | OBJS += src/crypto/rc4.c |
| 919 | endif |
| 920 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 921 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 922 | |
| 923 | ifdef NEED_SHA256 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 924 | L_CFLAGS += -DCONFIG_SHA256 |
| 925 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 926 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 927 | OBJS += src/crypto/sha256.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 928 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 929 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 930 | OBJS += src/crypto/sha256-prf.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 931 | ifdef CONFIG_INTERNAL_SHA256 |
| 932 | OBJS += src/crypto/sha256-internal.c |
| 933 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 934 | ifdef NEED_TLS_PRF_SHA256 |
| 935 | OBJS += src/crypto/sha256-tlsprf.c |
| 936 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 937 | ifdef NEED_HMAC_SHA256_KDF |
| 938 | OBJS += src/crypto/sha256-kdf.c |
| 939 | endif |
| 940 | ifdef NEED_HMAC_SHA384_KDF |
| 941 | OBJS += src/crypto/sha384-kdf.c |
| 942 | endif |
| 943 | ifdef NEED_HMAC_SHA512_KDF |
| 944 | OBJS += src/crypto/sha512-kdf.c |
| 945 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 946 | endif |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 947 | ifdef NEED_SHA384 |
| 948 | L_CFLAGS += -DCONFIG_SHA384 |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 949 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 950 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 951 | OBJS += src/crypto/sha384.c |
| 952 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 953 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 954 | OBJS += src/crypto/sha384-prf.c |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 955 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 956 | ifdef NEED_SHA512 |
| 957 | L_CFLAGS += -DCONFIG_SHA512 |
| 958 | ifneq ($(CONFIG_TLS), openssl) |
| 959 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 960 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 961 | OBJS += src/crypto/sha512.c |
| 962 | endif |
| 963 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 964 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 965 | OBJS += src/crypto/sha512-prf.c |
| 966 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 967 | |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 968 | ifdef CONFIG_INTERNAL_SHA384 |
| 969 | L_CFLAGS += -DCONFIG_INTERNAL_SHA384 |
| 970 | OBJS += src/crypto/sha384-internal.c |
| 971 | endif |
| 972 | |
| 973 | ifdef CONFIG_INTERNAL_SHA512 |
| 974 | L_CFLAGS += -DCONFIG_INTERNAL_SHA512 |
| 975 | OBJS += src/crypto/sha512-internal.c |
| 976 | endif |
| 977 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 978 | ifdef NEED_DH_GROUPS |
| 979 | OBJS += src/crypto/dh_groups.c |
| 980 | endif |
| 981 | ifdef NEED_DH_GROUPS_ALL |
| 982 | L_CFLAGS += -DALL_DH_GROUPS |
| 983 | endif |
| 984 | ifdef CONFIG_INTERNAL_DH_GROUP5 |
| 985 | ifdef NEED_DH_GROUPS |
| 986 | OBJS += src/crypto/dh_group5.c |
| 987 | endif |
| 988 | endif |
| 989 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 990 | ifdef NEED_ECC |
| 991 | L_CFLAGS += -DCONFIG_ECC |
| 992 | endif |
| 993 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 994 | ifdef CONFIG_NO_RANDOM_POOL |
| 995 | L_CFLAGS += -DCONFIG_NO_RANDOM_POOL |
| 996 | else |
| 997 | OBJS += src/crypto/random.c |
| 998 | HOBJS += src/crypto/random.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 999 | HOBJS += src/utils/eloop.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1000 | HOBJS += $(SHA1OBJS) |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 1001 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1002 | HOBJS += src/crypto/md5.c |
| 1003 | endif |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 1004 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1005 | |
| 1006 | ifdef CONFIG_RADIUS_SERVER |
| 1007 | L_CFLAGS += -DRADIUS_SERVER |
| 1008 | OBJS += src/radius/radius_server.c |
| 1009 | endif |
| 1010 | |
| 1011 | ifdef CONFIG_IPV6 |
| 1012 | L_CFLAGS += -DCONFIG_IPV6 |
| 1013 | endif |
| 1014 | |
| 1015 | ifdef CONFIG_DRIVER_RADIUS_ACL |
| 1016 | L_CFLAGS += -DCONFIG_DRIVER_RADIUS_ACL |
| 1017 | endif |
| 1018 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1019 | ifdef NEED_BASE64 |
| 1020 | OBJS += src/utils/base64.c |
| 1021 | endif |
| 1022 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1023 | ifdef NEED_JSON |
| 1024 | OBJS += src/utils/json.c |
| 1025 | L_CFLAGS += -DCONFIG_JSON |
| 1026 | endif |
| 1027 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1028 | ifdef NEED_AP_MLME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1029 | OBJS += src/ap/wmm.c |
| 1030 | OBJS += src/ap/ap_list.c |
| 1031 | OBJS += src/ap/ieee802_11.c |
| 1032 | OBJS += src/ap/hw_features.c |
Dmitry Shmidt | 051af73 | 2013-10-22 13:52:46 -0700 | [diff] [blame] | 1033 | OBJS += src/ap/dfs.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1034 | L_CFLAGS += -DNEED_AP_MLME |
| 1035 | endif |
| 1036 | ifdef CONFIG_IEEE80211N |
| 1037 | OBJS += src/ap/ieee802_11_ht.c |
| 1038 | endif |
| 1039 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1040 | ifdef CONFIG_IEEE80211AC |
| 1041 | OBJS += src/ap/ieee802_11_vht.c |
| 1042 | endif |
| 1043 | |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1044 | ifdef CONFIG_IEEE80211AX |
| 1045 | OBJS += src/ap/ieee802_11_he.c |
| 1046 | endif |
| 1047 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1048 | ifdef CONFIG_P2P_MANAGER |
| 1049 | L_CFLAGS += -DCONFIG_P2P_MANAGER |
| 1050 | OBJS += src/ap/p2p_hostapd.c |
| 1051 | endif |
| 1052 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1053 | ifdef CONFIG_HS20 |
| 1054 | L_CFLAGS += -DCONFIG_HS20 |
| 1055 | OBJS += src/ap/hs20.c |
| 1056 | CONFIG_INTERWORKING=y |
| 1057 | endif |
| 1058 | |
| 1059 | ifdef CONFIG_INTERWORKING |
| 1060 | L_CFLAGS += -DCONFIG_INTERWORKING |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1061 | NEED_GAS=y |
| 1062 | endif |
| 1063 | |
| 1064 | ifdef NEED_GAS |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1065 | OBJS += src/common/gas.c |
| 1066 | OBJS += src/ap/gas_serv.c |
| 1067 | endif |
| 1068 | |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1069 | ifdef CONFIG_PROXYARP |
| 1070 | L_CFLAGS += -DCONFIG_PROXYARP |
| 1071 | OBJS += src/ap/x_snoop.c |
| 1072 | OBJS += src/ap/dhcp_snoop.c |
| 1073 | ifdef CONFIG_IPV6 |
| 1074 | OBJS += src/ap/ndisc_snoop.c |
| 1075 | endif |
| 1076 | endif |
| 1077 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1078 | OBJS += src/drivers/driver_common.c |
| 1079 | |
Dmitry Shmidt | 5460547 | 2013-11-08 11:10:19 -0800 | [diff] [blame] | 1080 | ifdef CONFIG_ACS |
| 1081 | L_CFLAGS += -DCONFIG_ACS |
| 1082 | OBJS += src/ap/acs.c |
| 1083 | LIBS += -lm |
| 1084 | endif |
| 1085 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1086 | ifdef CONFIG_NO_STDOUT_DEBUG |
| 1087 | L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG |
| 1088 | endif |
| 1089 | |
Paul Stewart | 092955c | 2017-02-06 09:13:09 -0800 | [diff] [blame] | 1090 | ifdef CONFIG_DEBUG_SYSLOG |
| 1091 | L_CFLAGS += -DCONFIG_DEBUG_SYSLOG |
| 1092 | endif |
| 1093 | |
Dmitry Shmidt | 5460547 | 2013-11-08 11:10:19 -0800 | [diff] [blame] | 1094 | ifdef CONFIG_DEBUG_LINUX_TRACING |
| 1095 | L_CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING |
| 1096 | endif |
| 1097 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1098 | ifdef CONFIG_DEBUG_FILE |
| 1099 | L_CFLAGS += -DCONFIG_DEBUG_FILE |
| 1100 | endif |
| 1101 | |
| 1102 | ifdef CONFIG_ANDROID_LOG |
| 1103 | L_CFLAGS += -DCONFIG_ANDROID_LOG |
| 1104 | endif |
| 1105 | |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1106 | OBJS_c = hostapd_cli.c |
| 1107 | OBJS_c += src/common/wpa_ctrl.c |
| 1108 | OBJS_c += src/utils/os_$(CONFIG_OS).c |
| 1109 | OBJS_c += src/common/cli.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1110 | OBJS_c += src/utils/eloop.c |
Dmitry Shmidt | a3dc309 | 2015-06-23 11:21:28 -0700 | [diff] [blame] | 1111 | OBJS_c += src/utils/common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1112 | ifdef CONFIG_WPA_TRACE |
| 1113 | OBJS_c += src/utils/trace.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1114 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1115 | OBJS_c += src/utils/wpa_debug.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1116 | ifdef CONFIG_WPA_CLI_EDIT |
| 1117 | OBJS_c += src/utils/edit.c |
| 1118 | else |
| 1119 | OBJS_c += src/utils/edit_simple.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1120 | endif |
| 1121 | |
Bjoern Johansson | 05c7f27 | 2018-05-15 14:58:52 -0700 | [diff] [blame] | 1122 | ifeq ($(filter gce_x86 gce_x86_64 calypso, $(TARGET_DEVICE)),) |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1123 | ifdef CONFIG_CTRL_IFACE_HIDL |
| 1124 | HOSTAPD_USE_HIDL=y |
| 1125 | L_CFLAGS += -DCONFIG_CTRL_IFACE_HIDL |
| 1126 | L_CPPFLAGS = -Wall -Werror |
| 1127 | endif |
Roshan Pius | 35ecec4 | 2018-01-16 17:49:00 -0800 | [diff] [blame] | 1128 | endif |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1129 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1130 | ######################## |
| 1131 | |
| 1132 | include $(CLEAR_VARS) |
| 1133 | LOCAL_MODULE := hostapd_cli |
Po-Chien Hsueh | 2051e4b | 2017-02-10 11:34:58 +0800 | [diff] [blame] | 1134 | LOCAL_PROPRIETARY_MODULE := true |
Ying Wang | e93dd11 | 2013-04-09 21:53:29 -0700 | [diff] [blame] | 1135 | LOCAL_SHARED_LIBRARIES := libc libcutils liblog |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1136 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1137 | LOCAL_SRC_FILES := $(OBJS_c) |
| 1138 | LOCAL_C_INCLUDES := $(INCLUDES) |
| 1139 | include $(BUILD_EXECUTABLE) |
| 1140 | |
| 1141 | ######################## |
| 1142 | include $(CLEAR_VARS) |
| 1143 | LOCAL_MODULE := hostapd |
| 1144 | LOCAL_MODULE_TAGS := optional |
Po-Chien Hsueh | 2051e4b | 2017-02-10 11:34:58 +0800 | [diff] [blame] | 1145 | LOCAL_PROPRIETARY_MODULE := true |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1146 | LOCAL_MODULE_RELATIVE_PATH := hw |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1147 | ifdef CONFIG_DRIVER_CUSTOM |
| 1148 | LOCAL_STATIC_LIBRARIES := libCustomWifi |
| 1149 | endif |
| 1150 | ifneq ($(BOARD_HOSTAPD_PRIVATE_LIB),) |
| 1151 | LOCAL_STATIC_LIBRARIES += $(BOARD_HOSTAPD_PRIVATE_LIB) |
| 1152 | endif |
Ying Wang | e93dd11 | 2013-04-09 21:53:29 -0700 | [diff] [blame] | 1153 | LOCAL_SHARED_LIBRARIES := libc libcutils liblog libcrypto libssl |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1154 | ifdef CONFIG_DRIVER_NL80211 |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 1155 | ifneq ($(wildcard external/libnl),) |
Dmitry Shmidt | d620e6d | 2014-02-18 11:07:59 -0800 | [diff] [blame] | 1156 | LOCAL_SHARED_LIBRARIES += libnl |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 1157 | else |
| 1158 | LOCAL_STATIC_LIBRARIES += libnl_2 |
| 1159 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1160 | endif |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1161 | ifeq ($(HOSTAPD_USE_HIDL), y) |
| 1162 | LOCAL_SHARED_LIBRARIES += android.hardware.wifi.hostapd@1.0 |
Roshan Pius | e2d2101 | 2018-08-17 11:22:06 -0700 | [diff] [blame] | 1163 | LOCAL_SHARED_LIBRARIES += android.hardware.wifi.hostapd@1.1 |
Roshan Pius | 30b452e | 2017-12-27 13:36:21 -0800 | [diff] [blame] | 1164 | LOCAL_SHARED_LIBRARIES += libbase libhidlbase libhidltransport libhwbinder libutils |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1165 | LOCAL_STATIC_LIBRARIES += libhostapd_hidl |
| 1166 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1167 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1168 | LOCAL_SRC_FILES := $(OBJS) |
| 1169 | LOCAL_C_INCLUDES := $(INCLUDES) |
Christopher Wiley | 5ec9510 | 2016-07-13 10:34:47 -0700 | [diff] [blame] | 1170 | LOCAL_INIT_RC := hostapd.android.rc |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1171 | include $(BUILD_EXECUTABLE) |
| 1172 | |
Bjoern Johansson | 05c7f27 | 2018-05-15 14:58:52 -0700 | [diff] [blame] | 1173 | ######################## |
| 1174 | include $(CLEAR_VARS) |
| 1175 | LOCAL_MODULE := hostapd_nohidl |
| 1176 | LOCAL_MODULE_TAGS := optional |
| 1177 | LOCAL_PROPRIETARY_MODULE := true |
| 1178 | ifdef CONFIG_DRIVER_CUSTOM |
| 1179 | LOCAL_STATIC_LIBRARIES := libCustomWifi |
| 1180 | endif |
| 1181 | ifneq ($(BOARD_HOSTAPD_PRIVATE_LIB),) |
| 1182 | LOCAL_STATIC_LIBRARIES += $(BOARD_HOSTAPD_PRIVATE_LIB) |
| 1183 | endif |
| 1184 | LOCAL_SHARED_LIBRARIES := libc libcutils liblog libcrypto libssl |
| 1185 | ifdef CONFIG_DRIVER_NL80211 |
| 1186 | ifneq ($(wildcard external/libnl),) |
| 1187 | LOCAL_SHARED_LIBRARIES += libnl |
| 1188 | else |
| 1189 | LOCAL_STATIC_LIBRARIES += libnl_2 |
| 1190 | endif |
| 1191 | endif |
| 1192 | LOCAL_CFLAGS := $(patsubst -DCONFIG_CTRL_IFACE_HIDL,,$(L_CFLAGS)) |
| 1193 | LOCAL_SRC_FILES := $(OBJS) |
| 1194 | LOCAL_C_INCLUDES := $(INCLUDES) |
| 1195 | include $(BUILD_EXECUTABLE) |
| 1196 | |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1197 | ifeq ($(HOSTAPD_USE_HIDL), y) |
| 1198 | ### Hidl service library ### |
| 1199 | ######################## |
| 1200 | include $(CLEAR_VARS) |
| 1201 | LOCAL_MODULE := libhostapd_hidl |
| 1202 | LOCAL_VENDOR_MODULE := true |
| 1203 | LOCAL_CPPFLAGS := $(L_CPPFLAGS) |
| 1204 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1205 | LOCAL_C_INCLUDES := $(INCLUDES) |
Roshan Pius | e2d2101 | 2018-08-17 11:22:06 -0700 | [diff] [blame] | 1206 | HIDL_INTERFACE_VERSION = 1.1 |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1207 | LOCAL_SRC_FILES := \ |
| 1208 | hidl/$(HIDL_INTERFACE_VERSION)/hidl.cpp \ |
| 1209 | hidl/$(HIDL_INTERFACE_VERSION)/hostapd.cpp |
| 1210 | LOCAL_SHARED_LIBRARIES := \ |
| 1211 | android.hardware.wifi.hostapd@1.0 \ |
Roshan Pius | e2d2101 | 2018-08-17 11:22:06 -0700 | [diff] [blame] | 1212 | android.hardware.wifi.hostapd@1.1 \ |
Roshan Pius | 30b452e | 2017-12-27 13:36:21 -0800 | [diff] [blame] | 1213 | libbase \ |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1214 | libhidlbase \ |
| 1215 | libhidltransport \ |
| 1216 | libhwbinder \ |
| 1217 | libutils \ |
| 1218 | liblog |
| 1219 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 1220 | $(LOCAL_PATH)/hidl/$(HIDL_INTERFACE_VERSION) |
| 1221 | include $(BUILD_STATIC_LIBRARY) |
| 1222 | endif # HOSTAPD_USE_HIDL == y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1223 | endif # ifeq ($(WPA_BUILD_HOSTAPD),true) |