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 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 219 | ifdef CONFIG_RSN_PREAUTH |
| 220 | L_CFLAGS += -DCONFIG_RSN_PREAUTH |
| 221 | CONFIG_L2_PACKET=y |
| 222 | endif |
| 223 | |
Dmitry Shmidt | f21452a | 2014-02-26 10:55:25 -0800 | [diff] [blame] | 224 | ifdef CONFIG_HS20 |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 225 | CONFIG_PROXYARP=y |
| 226 | endif |
| 227 | |
| 228 | ifdef CONFIG_PROXYARP |
| 229 | CONFIG_L2_PACKET=y |
| 230 | endif |
| 231 | |
| 232 | ifdef CONFIG_SUITEB |
| 233 | L_CFLAGS += -DCONFIG_SUITEB |
Dmitry Shmidt | f21452a | 2014-02-26 10:55:25 -0800 | [diff] [blame] | 234 | endif |
| 235 | |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 236 | ifdef CONFIG_SUITEB192 |
| 237 | L_CFLAGS += -DCONFIG_SUITEB192 |
| 238 | NEED_SHA384=y |
| 239 | endif |
| 240 | |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 241 | ifdef CONFIG_OCV |
| 242 | L_CFLAGS += -DCONFIG_OCV |
| 243 | OBJS += src/common/ocv.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 244 | endif |
| 245 | |
| 246 | ifdef CONFIG_IEEE80211R |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 247 | L_CFLAGS += -DCONFIG_IEEE80211R -DCONFIG_IEEE80211R_AP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 248 | OBJS += src/ap/wpa_auth_ft.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 249 | NEED_AES_UNWRAP=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 250 | NEED_AES_SIV=y |
| 251 | NEED_ETH_P_OUI=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 252 | NEED_HMAC_SHA256_KDF=y |
| 253 | endif |
| 254 | |
| 255 | ifdef NEED_ETH_P_OUI |
| 256 | L_CFLAGS += -DCONFIG_ETH_P_OUI |
| 257 | OBJS += src/ap/eth_p_oui.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 258 | endif |
| 259 | |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 260 | ifdef CONFIG_SAE |
| 261 | L_CFLAGS += -DCONFIG_SAE |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 262 | OBJS += src/common/sae.c |
| 263 | NEED_ECC=y |
| 264 | NEED_DH_GROUPS=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 265 | NEED_DRAGONFLY=y |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 266 | endif |
| 267 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 268 | ifdef CONFIG_OWE |
| 269 | L_CFLAGS += -DCONFIG_OWE |
| 270 | NEED_ECC=y |
| 271 | NEED_HMAC_SHA256_KDF=y |
| 272 | NEED_HMAC_SHA384_KDF=y |
| 273 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 274 | NEED_SHA384=y |
| 275 | NEED_SHA512=y |
| 276 | endif |
| 277 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 278 | ifdef CONFIG_FILS |
| 279 | L_CFLAGS += -DCONFIG_FILS |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 280 | OBJS += src/ap/fils_hlp.c |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 281 | NEED_SHA384=y |
| 282 | NEED_AES_SIV=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 283 | ifdef CONFIG_FILS_SK_PFS |
| 284 | L_CFLAGS += -DCONFIG_FILS_SK_PFS |
| 285 | NEED_ECC=y |
| 286 | endif |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 287 | endif |
| 288 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 289 | ifdef CONFIG_WNM |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 290 | L_CFLAGS += -DCONFIG_WNM -DCONFIG_WNM_AP |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 291 | OBJS += src/ap/wnm_ap.c |
| 292 | endif |
| 293 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 294 | ifdef CONFIG_IEEE80211N |
| 295 | L_CFLAGS += -DCONFIG_IEEE80211N |
| 296 | endif |
| 297 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 298 | ifdef CONFIG_IEEE80211AC |
| 299 | L_CFLAGS += -DCONFIG_IEEE80211AC |
| 300 | endif |
| 301 | |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 302 | ifdef CONFIG_IEEE80211AX |
| 303 | L_CFLAGS += -DCONFIG_IEEE80211AX |
| 304 | endif |
| 305 | |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 306 | ifdef CONFIG_MBO |
| 307 | L_CFLAGS += -DCONFIG_MBO |
| 308 | OBJS += src/ap/mbo_ap.c |
| 309 | endif |
| 310 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 311 | ifdef CONFIG_FST |
| 312 | L_CFLAGS += -DCONFIG_FST |
| 313 | OBJS += src/fst/fst.c |
| 314 | OBJS += src/fst/fst_group.c |
| 315 | OBJS += src/fst/fst_iface.c |
| 316 | OBJS += src/fst/fst_session.c |
| 317 | OBJS += src/fst/fst_ctrl_aux.c |
| 318 | ifdef CONFIG_FST_TEST |
| 319 | L_CFLAGS += -DCONFIG_FST_TEST |
| 320 | endif |
| 321 | ifndef CONFIG_NO_CTRL_IFACE |
| 322 | OBJS += src/fst/fst_ctrl_iface.c |
| 323 | endif |
| 324 | endif |
| 325 | |
| 326 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 327 | include $(LOCAL_PATH)/src/drivers/drivers.mk |
| 328 | |
| 329 | OBJS += $(DRV_AP_OBJS) |
| 330 | L_CFLAGS += $(DRV_AP_CFLAGS) |
| 331 | LDFLAGS += $(DRV_AP_LDFLAGS) |
| 332 | LIBS += $(DRV_AP_LIBS) |
| 333 | |
| 334 | ifdef CONFIG_L2_PACKET |
| 335 | ifdef CONFIG_DNET_PCAP |
| 336 | ifdef CONFIG_L2_FREEBSD |
| 337 | LIBS += -lpcap |
| 338 | OBJS += src/l2_packet/l2_packet_freebsd.c |
| 339 | else |
| 340 | LIBS += -ldnet -lpcap |
| 341 | OBJS += src/l2_packet/l2_packet_pcap.c |
| 342 | endif |
| 343 | else |
| 344 | OBJS += src/l2_packet/l2_packet_linux.c |
| 345 | endif |
| 346 | else |
| 347 | OBJS += src/l2_packet/l2_packet_none.c |
| 348 | endif |
| 349 | |
| 350 | |
| 351 | ifdef CONFIG_EAP_MD5 |
| 352 | L_CFLAGS += -DEAP_SERVER_MD5 |
| 353 | OBJS += src/eap_server/eap_server_md5.c |
| 354 | CHAP=y |
| 355 | endif |
| 356 | |
| 357 | ifdef CONFIG_EAP_TLS |
| 358 | L_CFLAGS += -DEAP_SERVER_TLS |
| 359 | OBJS += src/eap_server/eap_server_tls.c |
| 360 | TLS_FUNCS=y |
| 361 | endif |
| 362 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 363 | ifdef CONFIG_EAP_UNAUTH_TLS |
| 364 | L_CFLAGS += -DEAP_SERVER_UNAUTH_TLS |
| 365 | ifndef CONFIG_EAP_TLS |
| 366 | OBJS += src/eap_server/eap_server_tls.c |
| 367 | TLS_FUNCS=y |
| 368 | endif |
| 369 | endif |
| 370 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 371 | ifdef CONFIG_EAP_PEAP |
| 372 | L_CFLAGS += -DEAP_SERVER_PEAP |
| 373 | OBJS += src/eap_server/eap_server_peap.c |
| 374 | OBJS += src/eap_common/eap_peap_common.c |
| 375 | TLS_FUNCS=y |
| 376 | CONFIG_EAP_MSCHAPV2=y |
| 377 | endif |
| 378 | |
| 379 | ifdef CONFIG_EAP_TTLS |
| 380 | L_CFLAGS += -DEAP_SERVER_TTLS |
| 381 | OBJS += src/eap_server/eap_server_ttls.c |
| 382 | TLS_FUNCS=y |
| 383 | CHAP=y |
| 384 | endif |
| 385 | |
| 386 | ifdef CONFIG_EAP_MSCHAPV2 |
| 387 | L_CFLAGS += -DEAP_SERVER_MSCHAPV2 |
| 388 | OBJS += src/eap_server/eap_server_mschapv2.c |
| 389 | MS_FUNCS=y |
| 390 | endif |
| 391 | |
| 392 | ifdef CONFIG_EAP_GTC |
| 393 | L_CFLAGS += -DEAP_SERVER_GTC |
| 394 | OBJS += src/eap_server/eap_server_gtc.c |
| 395 | endif |
| 396 | |
| 397 | ifdef CONFIG_EAP_SIM |
| 398 | L_CFLAGS += -DEAP_SERVER_SIM |
| 399 | OBJS += src/eap_server/eap_server_sim.c |
| 400 | CONFIG_EAP_SIM_COMMON=y |
| 401 | NEED_AES_CBC=y |
| 402 | endif |
| 403 | |
| 404 | ifdef CONFIG_EAP_AKA |
| 405 | L_CFLAGS += -DEAP_SERVER_AKA |
| 406 | OBJS += src/eap_server/eap_server_aka.c |
| 407 | CONFIG_EAP_SIM_COMMON=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 408 | NEED_AES_CBC=y |
| 409 | endif |
| 410 | |
| 411 | ifdef CONFIG_EAP_AKA_PRIME |
| 412 | L_CFLAGS += -DEAP_SERVER_AKA_PRIME |
| 413 | endif |
| 414 | |
| 415 | ifdef CONFIG_EAP_SIM_COMMON |
| 416 | OBJS += src/eap_common/eap_sim_common.c |
| 417 | # Example EAP-SIM/AKA interface for GSM/UMTS authentication. This can be |
| 418 | # replaced with another file implementating the interface specified in |
| 419 | # eap_sim_db.h. |
| 420 | OBJS += src/eap_server/eap_sim_db.c |
| 421 | NEED_FIPS186_2_PRF=y |
| 422 | endif |
| 423 | |
| 424 | ifdef CONFIG_EAP_PAX |
| 425 | L_CFLAGS += -DEAP_SERVER_PAX |
| 426 | OBJS += src/eap_server/eap_server_pax.c src/eap_common/eap_pax_common.c |
| 427 | endif |
| 428 | |
| 429 | ifdef CONFIG_EAP_PSK |
| 430 | L_CFLAGS += -DEAP_SERVER_PSK |
| 431 | OBJS += src/eap_server/eap_server_psk.c src/eap_common/eap_psk_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 432 | NEED_AES_ENCBLOCK=y |
| 433 | NEED_AES_EAX=y |
| 434 | endif |
| 435 | |
| 436 | ifdef CONFIG_EAP_SAKE |
| 437 | L_CFLAGS += -DEAP_SERVER_SAKE |
| 438 | OBJS += src/eap_server/eap_server_sake.c src/eap_common/eap_sake_common.c |
| 439 | endif |
| 440 | |
| 441 | ifdef CONFIG_EAP_GPSK |
| 442 | L_CFLAGS += -DEAP_SERVER_GPSK |
| 443 | OBJS += src/eap_server/eap_server_gpsk.c src/eap_common/eap_gpsk_common.c |
| 444 | ifdef CONFIG_EAP_GPSK_SHA256 |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 445 | L_CFLAGS += -DEAP_GPSK_SHA256 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 446 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 447 | endif |
| 448 | |
| 449 | ifdef CONFIG_EAP_PWD |
| 450 | L_CFLAGS += -DEAP_SERVER_PWD |
| 451 | OBJS += src/eap_server/eap_server_pwd.c src/eap_common/eap_pwd_common.c |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 452 | NEED_ECC=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 453 | NEED_DRAGONFLY=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 454 | endif |
| 455 | |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 456 | ifdef CONFIG_EAP_EKE |
| 457 | L_CFLAGS += -DEAP_SERVER_EKE |
| 458 | OBJS += src/eap_server/eap_server_eke.c src/eap_common/eap_eke_common.c |
| 459 | NEED_DH_GROUPS=y |
| 460 | NEED_DH_GROUPS_ALL=y |
| 461 | endif |
| 462 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 463 | ifdef CONFIG_EAP_VENDOR_TEST |
| 464 | L_CFLAGS += -DEAP_SERVER_VENDOR_TEST |
| 465 | OBJS += src/eap_server/eap_server_vendor_test.c |
| 466 | endif |
| 467 | |
| 468 | ifdef CONFIG_EAP_FAST |
| 469 | L_CFLAGS += -DEAP_SERVER_FAST |
| 470 | OBJS += src/eap_server/eap_server_fast.c |
| 471 | OBJS += src/eap_common/eap_fast_common.c |
| 472 | TLS_FUNCS=y |
| 473 | NEED_T_PRF=y |
| 474 | NEED_AES_UNWRAP=y |
| 475 | endif |
| 476 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 477 | ifdef CONFIG_EAP_TEAP |
| 478 | L_CFLAGS += -DEAP_SERVER_TEAP |
| 479 | OBJS += src/eap_server/eap_server_teap.c |
| 480 | OBJS += src/eap_common/eap_teap_common.c |
| 481 | TLS_FUNCS=y |
| 482 | NEED_T_PRF=y |
| 483 | NEED_SHA384=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame^] | 484 | NEED_TLS_PRF_SHA256=y |
| 485 | NEED_TLS_PRF_SHA384=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 486 | NEED_AES_UNWRAP=y |
| 487 | endif |
| 488 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 489 | ifdef CONFIG_WPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 490 | L_CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC |
| 491 | OBJS += src/utils/uuid.c |
| 492 | OBJS += src/ap/wps_hostapd.c |
| 493 | OBJS += src/eap_server/eap_server_wsc.c src/eap_common/eap_wsc_common.c |
| 494 | OBJS += src/wps/wps.c |
| 495 | OBJS += src/wps/wps_common.c |
| 496 | OBJS += src/wps/wps_attr_parse.c |
| 497 | OBJS += src/wps/wps_attr_build.c |
| 498 | OBJS += src/wps/wps_attr_process.c |
| 499 | OBJS += src/wps/wps_dev_attr.c |
| 500 | OBJS += src/wps/wps_enrollee.c |
| 501 | OBJS += src/wps/wps_registrar.c |
| 502 | NEED_DH_GROUPS=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 503 | NEED_BASE64=y |
| 504 | NEED_AES_CBC=y |
| 505 | NEED_MODEXP=y |
| 506 | CONFIG_EAP=y |
| 507 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 508 | ifdef CONFIG_WPS_NFC |
| 509 | L_CFLAGS += -DCONFIG_WPS_NFC |
| 510 | OBJS += src/wps/ndef.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 511 | NEED_WPS_OOB=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 512 | endif |
| 513 | |
| 514 | ifdef NEED_WPS_OOB |
| 515 | L_CFLAGS += -DCONFIG_WPS_OOB |
| 516 | endif |
| 517 | |
| 518 | ifdef CONFIG_WPS_UPNP |
| 519 | L_CFLAGS += -DCONFIG_WPS_UPNP |
| 520 | OBJS += src/wps/wps_upnp.c |
| 521 | OBJS += src/wps/wps_upnp_ssdp.c |
| 522 | OBJS += src/wps/wps_upnp_web.c |
| 523 | OBJS += src/wps/wps_upnp_event.c |
| 524 | OBJS += src/wps/wps_upnp_ap.c |
| 525 | OBJS += src/wps/upnp_xml.c |
| 526 | OBJS += src/wps/httpread.c |
| 527 | OBJS += src/wps/http_client.c |
| 528 | OBJS += src/wps/http_server.c |
| 529 | endif |
| 530 | |
| 531 | ifdef CONFIG_WPS_STRICT |
| 532 | L_CFLAGS += -DCONFIG_WPS_STRICT |
| 533 | OBJS += src/wps/wps_validate.c |
| 534 | endif |
| 535 | |
| 536 | ifdef CONFIG_WPS_TESTING |
| 537 | L_CFLAGS += -DCONFIG_WPS_TESTING |
| 538 | endif |
| 539 | |
| 540 | endif |
| 541 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 542 | ifdef CONFIG_DPP |
| 543 | L_CFLAGS += -DCONFIG_DPP |
| 544 | OBJS += src/common/dpp.c |
| 545 | OBJS += src/ap/dpp_hostapd.c |
| 546 | OBJS += src/ap/gas_query_ap.c |
| 547 | NEED_AES_SIV=y |
| 548 | NEED_HMAC_SHA256_KDF=y |
| 549 | NEED_HMAC_SHA384_KDF=y |
| 550 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 551 | NEED_SHA384=y |
| 552 | NEED_SHA512=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame^] | 553 | NEED_ECC=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 554 | NEED_JSON=y |
| 555 | NEED_GAS=y |
| 556 | NEED_BASE64=y |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 557 | ifdef CONFIG_DPP2 |
| 558 | L_CFLAGS += -DCONFIG_DPP2 |
| 559 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 560 | endif |
| 561 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 562 | ifdef CONFIG_EAP_IKEV2 |
| 563 | L_CFLAGS += -DEAP_SERVER_IKEV2 |
| 564 | OBJS += src/eap_server/eap_server_ikev2.c src/eap_server/ikev2.c |
| 565 | OBJS += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c |
| 566 | NEED_DH_GROUPS=y |
| 567 | NEED_DH_GROUPS_ALL=y |
| 568 | NEED_MODEXP=y |
| 569 | NEED_CIPHER=y |
| 570 | endif |
| 571 | |
| 572 | ifdef CONFIG_EAP_TNC |
| 573 | L_CFLAGS += -DEAP_SERVER_TNC |
| 574 | OBJS += src/eap_server/eap_server_tnc.c |
| 575 | OBJS += src/eap_server/tncs.c |
| 576 | NEED_BASE64=y |
| 577 | ifndef CONFIG_DRIVER_BSD |
| 578 | LIBS += -ldl |
| 579 | endif |
| 580 | endif |
| 581 | |
| 582 | # Basic EAP functionality is needed for EAPOL |
| 583 | OBJS += eap_register.c |
| 584 | OBJS += src/eap_server/eap_server.c |
| 585 | OBJS += src/eap_common/eap_common.c |
| 586 | OBJS += src/eap_server/eap_server_methods.c |
| 587 | OBJS += src/eap_server/eap_server_identity.c |
| 588 | L_CFLAGS += -DEAP_SERVER_IDENTITY |
| 589 | |
| 590 | ifdef CONFIG_EAP |
| 591 | L_CFLAGS += -DEAP_SERVER |
| 592 | endif |
| 593 | |
| 594 | ifdef CONFIG_PKCS12 |
| 595 | L_CFLAGS += -DPKCS12_FUNCS |
| 596 | endif |
| 597 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 598 | ifdef NEED_DRAGONFLY |
| 599 | OBJS += src/common/dragonfly.c |
| 600 | endif |
| 601 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 602 | ifdef MS_FUNCS |
| 603 | OBJS += src/crypto/ms_funcs.c |
| 604 | NEED_DES=y |
| 605 | NEED_MD4=y |
| 606 | endif |
| 607 | |
| 608 | ifdef CHAP |
| 609 | OBJS += src/eap_common/chap.c |
| 610 | endif |
| 611 | |
| 612 | ifdef TLS_FUNCS |
| 613 | NEED_DES=y |
| 614 | # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS) |
| 615 | L_CFLAGS += -DEAP_TLS_FUNCS |
| 616 | OBJS += src/eap_server/eap_server_tls_common.c |
| 617 | NEED_TLS_PRF=y |
| 618 | endif |
| 619 | |
| 620 | ifndef CONFIG_TLS |
| 621 | CONFIG_TLS=openssl |
| 622 | endif |
| 623 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 624 | ifdef CONFIG_TLSV11 |
| 625 | L_CFLAGS += -DCONFIG_TLSV11 |
| 626 | endif |
| 627 | |
| 628 | ifdef CONFIG_TLSV12 |
| 629 | L_CFLAGS += -DCONFIG_TLSV12 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 630 | endif |
| 631 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 632 | ifeq ($(CONFIG_TLS), openssl) |
| 633 | ifdef TLS_FUNCS |
| 634 | OBJS += src/crypto/tls_openssl.c |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 635 | OBJS += src/crypto/tls_openssl_ocsp.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 636 | LIBS += -lssl |
| 637 | endif |
| 638 | OBJS += src/crypto/crypto_openssl.c |
| 639 | HOBJS += src/crypto/crypto_openssl.c |
| 640 | ifdef NEED_FIPS186_2_PRF |
| 641 | OBJS += src/crypto/fips_prf_openssl.c |
| 642 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 643 | NEED_TLS_PRF_SHA256=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 644 | LIBS += -lcrypto |
| 645 | LIBS_h += -lcrypto |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 646 | ifndef CONFIG_TLS_DEFAULT_CIPHERS |
| 647 | CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW" |
| 648 | endif |
| 649 | L_CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 650 | endif |
| 651 | |
| 652 | ifeq ($(CONFIG_TLS), gnutls) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 653 | ifndef CONFIG_CRYPTO |
| 654 | # default to libgcrypt |
| 655 | CONFIG_CRYPTO=gnutls |
| 656 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 657 | ifdef TLS_FUNCS |
| 658 | OBJS += src/crypto/tls_gnutls.c |
| 659 | LIBS += -lgnutls -lgpg-error |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 660 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 661 | OBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c |
| 662 | HOBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 663 | ifdef NEED_FIPS186_2_PRF |
Dmitry Shmidt | 9866086 | 2014-03-11 17:26:21 -0700 | [diff] [blame] | 664 | OBJS += src/crypto/fips_prf_internal.c |
| 665 | OBJS += src/crypto/sha1-internal.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 666 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 667 | ifeq ($(CONFIG_CRYPTO), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 668 | LIBS += -lgcrypt |
| 669 | LIBS_h += -lgcrypt |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 670 | CONFIG_INTERNAL_RC4=y |
| 671 | CONFIG_INTERNAL_DH_GROUP5=y |
| 672 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 673 | ifeq ($(CONFIG_CRYPTO), nettle) |
| 674 | LIBS += -lnettle -lgmp |
| 675 | LIBS_p += -lnettle -lgmp |
| 676 | CONFIG_INTERNAL_RC4=y |
| 677 | CONFIG_INTERNAL_DH_GROUP5=y |
| 678 | endif |
| 679 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 680 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 681 | ifeq ($(CONFIG_TLS), internal) |
| 682 | ifndef CONFIG_CRYPTO |
| 683 | CONFIG_CRYPTO=internal |
| 684 | endif |
| 685 | ifdef TLS_FUNCS |
| 686 | OBJS += src/crypto/crypto_internal-rsa.c |
| 687 | OBJS += src/crypto/tls_internal.c |
| 688 | OBJS += src/tls/tlsv1_common.c |
| 689 | OBJS += src/tls/tlsv1_record.c |
| 690 | OBJS += src/tls/tlsv1_cred.c |
| 691 | OBJS += src/tls/tlsv1_server.c |
| 692 | OBJS += src/tls/tlsv1_server_write.c |
| 693 | OBJS += src/tls/tlsv1_server_read.c |
| 694 | OBJS += src/tls/asn1.c |
| 695 | OBJS += src/tls/rsa.c |
| 696 | OBJS += src/tls/x509v3.c |
| 697 | OBJS += src/tls/pkcs1.c |
| 698 | OBJS += src/tls/pkcs5.c |
| 699 | OBJS += src/tls/pkcs8.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 700 | NEED_BASE64=y |
| 701 | NEED_TLS_PRF=y |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 702 | ifdef CONFIG_TLSV12 |
| 703 | NEED_TLS_PRF_SHA256=y |
| 704 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 705 | NEED_MODEXP=y |
| 706 | NEED_CIPHER=y |
| 707 | L_CFLAGS += -DCONFIG_TLS_INTERNAL |
| 708 | L_CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER |
| 709 | endif |
| 710 | ifdef NEED_CIPHER |
| 711 | NEED_DES=y |
| 712 | OBJS += src/crypto/crypto_internal-cipher.c |
| 713 | endif |
| 714 | ifdef NEED_MODEXP |
| 715 | OBJS += src/crypto/crypto_internal-modexp.c |
| 716 | OBJS += src/tls/bignum.c |
| 717 | endif |
| 718 | ifeq ($(CONFIG_CRYPTO), libtomcrypt) |
| 719 | OBJS += src/crypto/crypto_libtomcrypt.c |
| 720 | LIBS += -ltomcrypt -ltfm |
| 721 | LIBS_h += -ltomcrypt -ltfm |
| 722 | CONFIG_INTERNAL_SHA256=y |
| 723 | CONFIG_INTERNAL_RC4=y |
| 724 | CONFIG_INTERNAL_DH_GROUP5=y |
| 725 | endif |
| 726 | ifeq ($(CONFIG_CRYPTO), internal) |
| 727 | OBJS += src/crypto/crypto_internal.c |
| 728 | NEED_AES_DEC=y |
| 729 | L_CFLAGS += -DCONFIG_CRYPTO_INTERNAL |
| 730 | ifdef CONFIG_INTERNAL_LIBTOMMATH |
| 731 | L_CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 732 | ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST |
| 733 | L_CFLAGS += -DLTM_FAST |
| 734 | endif |
| 735 | else |
| 736 | LIBS += -ltommath |
| 737 | LIBS_h += -ltommath |
| 738 | endif |
| 739 | CONFIG_INTERNAL_AES=y |
| 740 | CONFIG_INTERNAL_DES=y |
| 741 | CONFIG_INTERNAL_SHA1=y |
| 742 | CONFIG_INTERNAL_MD4=y |
| 743 | CONFIG_INTERNAL_MD5=y |
| 744 | CONFIG_INTERNAL_SHA256=y |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 745 | CONFIG_INTERNAL_SHA384=y |
| 746 | CONFIG_INTERNAL_SHA512=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 747 | CONFIG_INTERNAL_RC4=y |
| 748 | CONFIG_INTERNAL_DH_GROUP5=y |
| 749 | endif |
| 750 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 751 | OBJS += src/crypto/crypto_cryptoapi.c |
| 752 | OBJS_p += src/crypto/crypto_cryptoapi.c |
| 753 | L_CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI |
| 754 | CONFIG_INTERNAL_SHA256=y |
| 755 | CONFIG_INTERNAL_RC4=y |
| 756 | endif |
| 757 | endif |
| 758 | |
| 759 | ifeq ($(CONFIG_TLS), none) |
| 760 | ifdef TLS_FUNCS |
| 761 | OBJS += src/crypto/tls_none.c |
| 762 | L_CFLAGS += -DEAP_TLS_NONE |
| 763 | CONFIG_INTERNAL_AES=y |
| 764 | CONFIG_INTERNAL_SHA1=y |
| 765 | CONFIG_INTERNAL_MD5=y |
| 766 | endif |
| 767 | OBJS += src/crypto/crypto_none.c |
| 768 | OBJS_p += src/crypto/crypto_none.c |
| 769 | CONFIG_INTERNAL_SHA256=y |
| 770 | CONFIG_INTERNAL_RC4=y |
| 771 | endif |
| 772 | |
| 773 | ifndef TLS_FUNCS |
| 774 | OBJS += src/crypto/tls_none.c |
| 775 | ifeq ($(CONFIG_TLS), internal) |
| 776 | CONFIG_INTERNAL_AES=y |
| 777 | CONFIG_INTERNAL_SHA1=y |
| 778 | CONFIG_INTERNAL_MD5=y |
| 779 | CONFIG_INTERNAL_RC4=y |
| 780 | endif |
| 781 | endif |
| 782 | |
| 783 | AESOBJS = # none so far |
| 784 | ifdef CONFIG_INTERNAL_AES |
| 785 | AESOBJS += src/crypto/aes-internal.c src/crypto/aes-internal-enc.c |
| 786 | endif |
| 787 | |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 788 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 789 | AESOBJS += src/crypto/aes-wrap.c |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 790 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 791 | ifdef NEED_AES_EAX |
| 792 | AESOBJS += src/crypto/aes-eax.c |
| 793 | NEED_AES_CTR=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 794 | endif |
| 795 | ifdef NEED_AES_SIV |
| 796 | AESOBJS += src/crypto/aes-siv.c |
| 797 | NEED_AES_CTR=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 798 | endif |
| 799 | ifdef NEED_AES_CTR |
| 800 | AESOBJS += src/crypto/aes-ctr.c |
| 801 | endif |
| 802 | ifdef NEED_AES_ENCBLOCK |
| 803 | AESOBJS += src/crypto/aes-encblock.c |
| 804 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 805 | AESOBJS += src/crypto/aes-omac1.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 806 | ifdef NEED_AES_UNWRAP |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 807 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 808 | NEED_AES_DEC=y |
| 809 | AESOBJS += src/crypto/aes-unwrap.c |
| 810 | endif |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 811 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 812 | ifdef NEED_AES_CBC |
| 813 | NEED_AES_DEC=y |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 814 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 815 | AESOBJS += src/crypto/aes-cbc.c |
| 816 | endif |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 817 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 818 | ifdef NEED_AES_DEC |
| 819 | ifdef CONFIG_INTERNAL_AES |
| 820 | AESOBJS += src/crypto/aes-internal-dec.c |
| 821 | endif |
| 822 | endif |
| 823 | ifdef NEED_AES |
| 824 | OBJS += $(AESOBJS) |
| 825 | endif |
| 826 | |
| 827 | SHA1OBJS = |
| 828 | ifdef NEED_SHA1 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 829 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 830 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 831 | SHA1OBJS += src/crypto/sha1.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 832 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 833 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 834 | SHA1OBJS += src/crypto/sha1-prf.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 835 | ifdef CONFIG_INTERNAL_SHA1 |
| 836 | SHA1OBJS += src/crypto/sha1-internal.c |
| 837 | ifdef NEED_FIPS186_2_PRF |
| 838 | SHA1OBJS += src/crypto/fips_prf_internal.c |
| 839 | endif |
| 840 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 841 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 842 | SHA1OBJS += src/crypto/sha1-pbkdf2.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 843 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 844 | ifdef NEED_T_PRF |
| 845 | SHA1OBJS += src/crypto/sha1-tprf.c |
| 846 | endif |
| 847 | ifdef NEED_TLS_PRF |
| 848 | SHA1OBJS += src/crypto/sha1-tlsprf.c |
| 849 | endif |
| 850 | endif |
| 851 | |
| 852 | ifdef NEED_SHA1 |
| 853 | OBJS += $(SHA1OBJS) |
| 854 | endif |
| 855 | |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 856 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 857 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 858 | OBJS += src/crypto/md5.c |
| 859 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 860 | endif |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 861 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 862 | ifdef NEED_MD5 |
| 863 | ifdef CONFIG_INTERNAL_MD5 |
| 864 | OBJS += src/crypto/md5-internal.c |
| 865 | HOBJS += src/crypto/md5-internal.c |
| 866 | endif |
| 867 | endif |
| 868 | |
| 869 | ifdef NEED_MD4 |
| 870 | ifdef CONFIG_INTERNAL_MD4 |
| 871 | OBJS += src/crypto/md4-internal.c |
| 872 | endif |
| 873 | endif |
| 874 | |
| 875 | ifdef NEED_DES |
| 876 | ifdef CONFIG_INTERNAL_DES |
| 877 | OBJS += src/crypto/des-internal.c |
| 878 | endif |
| 879 | endif |
| 880 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 881 | ifdef CONFIG_NO_RC4 |
| 882 | L_CFLAGS += -DCONFIG_NO_RC4 |
| 883 | endif |
| 884 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 885 | ifdef NEED_RC4 |
| 886 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 887 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 888 | OBJS += src/crypto/rc4.c |
| 889 | endif |
| 890 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 891 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 892 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 893 | L_CFLAGS += -DCONFIG_SHA256 |
| 894 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 895 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 896 | OBJS += src/crypto/sha256.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 897 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 898 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 899 | OBJS += src/crypto/sha256-prf.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 900 | ifdef CONFIG_INTERNAL_SHA256 |
| 901 | OBJS += src/crypto/sha256-internal.c |
| 902 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 903 | ifdef NEED_TLS_PRF_SHA256 |
| 904 | OBJS += src/crypto/sha256-tlsprf.c |
| 905 | endif |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame^] | 906 | ifdef NEED_TLS_PRF_SHA384 |
| 907 | OBJS += src/crypto/sha384-tlsprf.c |
| 908 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 909 | ifdef NEED_HMAC_SHA256_KDF |
| 910 | OBJS += src/crypto/sha256-kdf.c |
| 911 | endif |
| 912 | ifdef NEED_HMAC_SHA384_KDF |
| 913 | OBJS += src/crypto/sha384-kdf.c |
| 914 | endif |
| 915 | ifdef NEED_HMAC_SHA512_KDF |
| 916 | OBJS += src/crypto/sha512-kdf.c |
| 917 | endif |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 918 | ifdef NEED_SHA384 |
| 919 | L_CFLAGS += -DCONFIG_SHA384 |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 920 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 921 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 922 | OBJS += src/crypto/sha384.c |
| 923 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 924 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 925 | OBJS += src/crypto/sha384-prf.c |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 926 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 927 | ifdef NEED_SHA512 |
| 928 | L_CFLAGS += -DCONFIG_SHA512 |
| 929 | ifneq ($(CONFIG_TLS), openssl) |
| 930 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 931 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 932 | OBJS += src/crypto/sha512.c |
| 933 | endif |
| 934 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 935 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 936 | OBJS += src/crypto/sha512-prf.c |
| 937 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 938 | |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 939 | ifdef CONFIG_INTERNAL_SHA384 |
| 940 | L_CFLAGS += -DCONFIG_INTERNAL_SHA384 |
| 941 | OBJS += src/crypto/sha384-internal.c |
| 942 | endif |
| 943 | |
| 944 | ifdef CONFIG_INTERNAL_SHA512 |
| 945 | L_CFLAGS += -DCONFIG_INTERNAL_SHA512 |
| 946 | OBJS += src/crypto/sha512-internal.c |
| 947 | endif |
| 948 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 949 | ifdef NEED_DH_GROUPS |
| 950 | OBJS += src/crypto/dh_groups.c |
| 951 | endif |
| 952 | ifdef NEED_DH_GROUPS_ALL |
| 953 | L_CFLAGS += -DALL_DH_GROUPS |
| 954 | endif |
| 955 | ifdef CONFIG_INTERNAL_DH_GROUP5 |
| 956 | ifdef NEED_DH_GROUPS |
| 957 | OBJS += src/crypto/dh_group5.c |
| 958 | endif |
| 959 | endif |
| 960 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 961 | ifdef NEED_ECC |
| 962 | L_CFLAGS += -DCONFIG_ECC |
| 963 | endif |
| 964 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 965 | ifdef CONFIG_NO_RANDOM_POOL |
| 966 | L_CFLAGS += -DCONFIG_NO_RANDOM_POOL |
| 967 | else |
| 968 | OBJS += src/crypto/random.c |
| 969 | HOBJS += src/crypto/random.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 970 | HOBJS += src/utils/eloop.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 971 | HOBJS += $(SHA1OBJS) |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 972 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 973 | HOBJS += src/crypto/md5.c |
| 974 | endif |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 975 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 976 | |
| 977 | ifdef CONFIG_RADIUS_SERVER |
| 978 | L_CFLAGS += -DRADIUS_SERVER |
| 979 | OBJS += src/radius/radius_server.c |
| 980 | endif |
| 981 | |
| 982 | ifdef CONFIG_IPV6 |
| 983 | L_CFLAGS += -DCONFIG_IPV6 |
| 984 | endif |
| 985 | |
| 986 | ifdef CONFIG_DRIVER_RADIUS_ACL |
| 987 | L_CFLAGS += -DCONFIG_DRIVER_RADIUS_ACL |
| 988 | endif |
| 989 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 990 | ifdef NEED_BASE64 |
| 991 | OBJS += src/utils/base64.c |
| 992 | endif |
| 993 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 994 | ifdef NEED_JSON |
| 995 | OBJS += src/utils/json.c |
| 996 | L_CFLAGS += -DCONFIG_JSON |
| 997 | endif |
| 998 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 999 | ifdef NEED_AP_MLME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1000 | OBJS += src/ap/wmm.c |
| 1001 | OBJS += src/ap/ap_list.c |
| 1002 | OBJS += src/ap/ieee802_11.c |
| 1003 | OBJS += src/ap/hw_features.c |
Dmitry Shmidt | 051af73 | 2013-10-22 13:52:46 -0700 | [diff] [blame] | 1004 | OBJS += src/ap/dfs.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1005 | L_CFLAGS += -DNEED_AP_MLME |
| 1006 | endif |
| 1007 | ifdef CONFIG_IEEE80211N |
| 1008 | OBJS += src/ap/ieee802_11_ht.c |
| 1009 | endif |
| 1010 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1011 | ifdef CONFIG_IEEE80211AC |
| 1012 | OBJS += src/ap/ieee802_11_vht.c |
| 1013 | endif |
| 1014 | |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1015 | ifdef CONFIG_IEEE80211AX |
| 1016 | OBJS += src/ap/ieee802_11_he.c |
| 1017 | endif |
| 1018 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1019 | ifdef CONFIG_P2P_MANAGER |
| 1020 | L_CFLAGS += -DCONFIG_P2P_MANAGER |
| 1021 | OBJS += src/ap/p2p_hostapd.c |
| 1022 | endif |
| 1023 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1024 | ifdef CONFIG_HS20 |
| 1025 | L_CFLAGS += -DCONFIG_HS20 |
| 1026 | OBJS += src/ap/hs20.c |
| 1027 | CONFIG_INTERWORKING=y |
| 1028 | endif |
| 1029 | |
| 1030 | ifdef CONFIG_INTERWORKING |
| 1031 | L_CFLAGS += -DCONFIG_INTERWORKING |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1032 | NEED_GAS=y |
| 1033 | endif |
| 1034 | |
| 1035 | ifdef NEED_GAS |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1036 | OBJS += src/common/gas.c |
| 1037 | OBJS += src/ap/gas_serv.c |
| 1038 | endif |
| 1039 | |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1040 | ifdef CONFIG_PROXYARP |
| 1041 | L_CFLAGS += -DCONFIG_PROXYARP |
| 1042 | OBJS += src/ap/x_snoop.c |
| 1043 | OBJS += src/ap/dhcp_snoop.c |
| 1044 | ifdef CONFIG_IPV6 |
| 1045 | OBJS += src/ap/ndisc_snoop.c |
| 1046 | endif |
| 1047 | endif |
| 1048 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1049 | OBJS += src/drivers/driver_common.c |
| 1050 | |
Dmitry Shmidt | 5460547 | 2013-11-08 11:10:19 -0800 | [diff] [blame] | 1051 | ifdef CONFIG_ACS |
| 1052 | L_CFLAGS += -DCONFIG_ACS |
| 1053 | OBJS += src/ap/acs.c |
| 1054 | LIBS += -lm |
| 1055 | endif |
| 1056 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1057 | ifdef CONFIG_NO_STDOUT_DEBUG |
| 1058 | L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG |
| 1059 | endif |
| 1060 | |
Paul Stewart | 092955c | 2017-02-06 09:13:09 -0800 | [diff] [blame] | 1061 | ifdef CONFIG_DEBUG_SYSLOG |
| 1062 | L_CFLAGS += -DCONFIG_DEBUG_SYSLOG |
| 1063 | endif |
| 1064 | |
Dmitry Shmidt | 5460547 | 2013-11-08 11:10:19 -0800 | [diff] [blame] | 1065 | ifdef CONFIG_DEBUG_LINUX_TRACING |
| 1066 | L_CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING |
| 1067 | endif |
| 1068 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1069 | ifdef CONFIG_DEBUG_FILE |
| 1070 | L_CFLAGS += -DCONFIG_DEBUG_FILE |
| 1071 | endif |
| 1072 | |
| 1073 | ifdef CONFIG_ANDROID_LOG |
| 1074 | L_CFLAGS += -DCONFIG_ANDROID_LOG |
| 1075 | endif |
| 1076 | |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1077 | OBJS_c = hostapd_cli.c |
| 1078 | OBJS_c += src/common/wpa_ctrl.c |
| 1079 | OBJS_c += src/utils/os_$(CONFIG_OS).c |
| 1080 | OBJS_c += src/common/cli.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1081 | OBJS_c += src/utils/eloop.c |
Dmitry Shmidt | a3dc309 | 2015-06-23 11:21:28 -0700 | [diff] [blame] | 1082 | OBJS_c += src/utils/common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1083 | ifdef CONFIG_WPA_TRACE |
| 1084 | OBJS_c += src/utils/trace.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1085 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1086 | OBJS_c += src/utils/wpa_debug.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1087 | ifdef CONFIG_WPA_CLI_EDIT |
| 1088 | OBJS_c += src/utils/edit.c |
| 1089 | else |
| 1090 | OBJS_c += src/utils/edit_simple.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1091 | endif |
| 1092 | |
Bjoern Johansson | 05c7f27 | 2018-05-15 14:58:52 -0700 | [diff] [blame] | 1093 | ifeq ($(filter gce_x86 gce_x86_64 calypso, $(TARGET_DEVICE)),) |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1094 | ifdef CONFIG_CTRL_IFACE_HIDL |
| 1095 | HOSTAPD_USE_HIDL=y |
| 1096 | L_CFLAGS += -DCONFIG_CTRL_IFACE_HIDL |
| 1097 | L_CPPFLAGS = -Wall -Werror |
| 1098 | endif |
Roshan Pius | 35ecec4 | 2018-01-16 17:49:00 -0800 | [diff] [blame] | 1099 | endif |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1100 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1101 | ######################## |
| 1102 | |
| 1103 | include $(CLEAR_VARS) |
| 1104 | LOCAL_MODULE := hostapd_cli |
Po-Chien Hsueh | 2051e4b | 2017-02-10 11:34:58 +0800 | [diff] [blame] | 1105 | LOCAL_PROPRIETARY_MODULE := true |
Ying Wang | e93dd11 | 2013-04-09 21:53:29 -0700 | [diff] [blame] | 1106 | LOCAL_SHARED_LIBRARIES := libc libcutils liblog |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1107 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1108 | LOCAL_SRC_FILES := $(OBJS_c) |
| 1109 | LOCAL_C_INCLUDES := $(INCLUDES) |
| 1110 | include $(BUILD_EXECUTABLE) |
| 1111 | |
| 1112 | ######################## |
| 1113 | include $(CLEAR_VARS) |
| 1114 | LOCAL_MODULE := hostapd |
| 1115 | LOCAL_MODULE_TAGS := optional |
Po-Chien Hsueh | 2051e4b | 2017-02-10 11:34:58 +0800 | [diff] [blame] | 1116 | LOCAL_PROPRIETARY_MODULE := true |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1117 | LOCAL_MODULE_RELATIVE_PATH := hw |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1118 | ifdef CONFIG_DRIVER_CUSTOM |
| 1119 | LOCAL_STATIC_LIBRARIES := libCustomWifi |
| 1120 | endif |
| 1121 | ifneq ($(BOARD_HOSTAPD_PRIVATE_LIB),) |
| 1122 | LOCAL_STATIC_LIBRARIES += $(BOARD_HOSTAPD_PRIVATE_LIB) |
| 1123 | endif |
Ying Wang | e93dd11 | 2013-04-09 21:53:29 -0700 | [diff] [blame] | 1124 | LOCAL_SHARED_LIBRARIES := libc libcutils liblog libcrypto libssl |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1125 | ifdef CONFIG_DRIVER_NL80211 |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 1126 | ifneq ($(wildcard external/libnl),) |
Dmitry Shmidt | d620e6d | 2014-02-18 11:07:59 -0800 | [diff] [blame] | 1127 | LOCAL_SHARED_LIBRARIES += libnl |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 1128 | else |
| 1129 | LOCAL_STATIC_LIBRARIES += libnl_2 |
| 1130 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1131 | endif |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1132 | ifeq ($(HOSTAPD_USE_HIDL), y) |
| 1133 | LOCAL_SHARED_LIBRARIES += android.hardware.wifi.hostapd@1.0 |
Roshan Pius | e2d2101 | 2018-08-17 11:22:06 -0700 | [diff] [blame] | 1134 | LOCAL_SHARED_LIBRARIES += android.hardware.wifi.hostapd@1.1 |
Steven Moreland | 423bc96 | 2019-10-04 10:29:53 -0700 | [diff] [blame] | 1135 | LOCAL_SHARED_LIBRARIES += libbase libhidlbase libutils |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1136 | LOCAL_STATIC_LIBRARIES += libhostapd_hidl |
| 1137 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1138 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1139 | LOCAL_SRC_FILES := $(OBJS) |
| 1140 | LOCAL_C_INCLUDES := $(INCLUDES) |
Christopher Wiley | 5ec9510 | 2016-07-13 10:34:47 -0700 | [diff] [blame] | 1141 | LOCAL_INIT_RC := hostapd.android.rc |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1142 | include $(BUILD_EXECUTABLE) |
| 1143 | |
Bjoern Johansson | 05c7f27 | 2018-05-15 14:58:52 -0700 | [diff] [blame] | 1144 | ######################## |
| 1145 | include $(CLEAR_VARS) |
| 1146 | LOCAL_MODULE := hostapd_nohidl |
| 1147 | LOCAL_MODULE_TAGS := optional |
| 1148 | LOCAL_PROPRIETARY_MODULE := true |
| 1149 | ifdef CONFIG_DRIVER_CUSTOM |
| 1150 | LOCAL_STATIC_LIBRARIES := libCustomWifi |
| 1151 | endif |
| 1152 | ifneq ($(BOARD_HOSTAPD_PRIVATE_LIB),) |
| 1153 | LOCAL_STATIC_LIBRARIES += $(BOARD_HOSTAPD_PRIVATE_LIB) |
| 1154 | endif |
| 1155 | LOCAL_SHARED_LIBRARIES := libc libcutils liblog libcrypto libssl |
| 1156 | ifdef CONFIG_DRIVER_NL80211 |
| 1157 | ifneq ($(wildcard external/libnl),) |
| 1158 | LOCAL_SHARED_LIBRARIES += libnl |
| 1159 | else |
| 1160 | LOCAL_STATIC_LIBRARIES += libnl_2 |
| 1161 | endif |
| 1162 | endif |
| 1163 | LOCAL_CFLAGS := $(patsubst -DCONFIG_CTRL_IFACE_HIDL,,$(L_CFLAGS)) |
| 1164 | LOCAL_SRC_FILES := $(OBJS) |
| 1165 | LOCAL_C_INCLUDES := $(INCLUDES) |
| 1166 | include $(BUILD_EXECUTABLE) |
| 1167 | |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1168 | ifeq ($(HOSTAPD_USE_HIDL), y) |
| 1169 | ### Hidl service library ### |
| 1170 | ######################## |
| 1171 | include $(CLEAR_VARS) |
| 1172 | LOCAL_MODULE := libhostapd_hidl |
| 1173 | LOCAL_VENDOR_MODULE := true |
| 1174 | LOCAL_CPPFLAGS := $(L_CPPFLAGS) |
| 1175 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1176 | LOCAL_C_INCLUDES := $(INCLUDES) |
Roshan Pius | e2d2101 | 2018-08-17 11:22:06 -0700 | [diff] [blame] | 1177 | HIDL_INTERFACE_VERSION = 1.1 |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1178 | LOCAL_SRC_FILES := \ |
| 1179 | hidl/$(HIDL_INTERFACE_VERSION)/hidl.cpp \ |
| 1180 | hidl/$(HIDL_INTERFACE_VERSION)/hostapd.cpp |
| 1181 | LOCAL_SHARED_LIBRARIES := \ |
| 1182 | android.hardware.wifi.hostapd@1.0 \ |
Roshan Pius | e2d2101 | 2018-08-17 11:22:06 -0700 | [diff] [blame] | 1183 | android.hardware.wifi.hostapd@1.1 \ |
Roshan Pius | 30b452e | 2017-12-27 13:36:21 -0800 | [diff] [blame] | 1184 | libbase \ |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1185 | libhidlbase \ |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1186 | libutils \ |
| 1187 | liblog |
| 1188 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 1189 | $(LOCAL_PATH)/hidl/$(HIDL_INTERFACE_VERSION) |
| 1190 | include $(BUILD_STATIC_LIBRARY) |
| 1191 | endif # HOSTAPD_USE_HIDL == y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1192 | endif # ifeq ($(WPA_BUILD_HOSTAPD),true) |