Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1 | ALL=hostapd hostapd_cli |
| 2 | CONFIG_FILE = .config |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 3 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 4 | include ../src/build.rules |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 5 | |
Dmitry Shmidt | 014a3ff | 2015-12-28 13:27:49 -0800 | [diff] [blame] | 6 | ifdef LIBS |
| 7 | # If LIBS is set with some global build system defaults, clone those for |
| 8 | # LIBS_c, LIBS_h, and LIBS_n to cover hostapd_cli, hlr_auc_gw, and |
| 9 | # nt_password_hash as well. |
| 10 | ifndef LIBS_c |
| 11 | LIBS_c := $(LIBS) |
| 12 | endif |
| 13 | ifndef LIBS_h |
| 14 | LIBS_h := $(LIBS) |
| 15 | endif |
| 16 | ifndef LIBS_n |
| 17 | LIBS_n := $(LIBS) |
| 18 | endif |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 19 | ifndef LIBS_s |
| 20 | LIBS_s := $(LIBS) |
| 21 | endif |
Dmitry Shmidt | 014a3ff | 2015-12-28 13:27:49 -0800 | [diff] [blame] | 22 | endif |
| 23 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 24 | CFLAGS += $(EXTRA_CFLAGS) |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 25 | CFLAGS += -I$(abspath ../src) |
| 26 | CFLAGS += -I$(abspath ../src/utils) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 27 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 28 | export BINDIR ?= /usr/local/bin/ |
| 29 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 30 | ifndef CONFIG_NO_GITVER |
| 31 | # Add VERSION_STR postfix for builds from a git repository |
| 32 | ifeq ($(wildcard ../.git),../.git) |
| 33 | GITVER := $(shell git describe --dirty=+) |
| 34 | ifneq ($(GITVER),) |
| 35 | CFLAGS += -DGIT_VERSION_STR_POSTFIX=\"-$(GITVER)\" |
| 36 | endif |
| 37 | endif |
| 38 | endif |
| 39 | |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 40 | ifdef CONFIG_TESTING_OPTIONS |
| 41 | CFLAGS += -DCONFIG_TESTING_OPTIONS |
| 42 | CONFIG_WPS_TESTING=y |
| 43 | endif |
| 44 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 45 | ifndef CONFIG_OS |
| 46 | ifdef CONFIG_NATIVE_WINDOWS |
| 47 | CONFIG_OS=win32 |
| 48 | else |
| 49 | CONFIG_OS=unix |
| 50 | endif |
| 51 | endif |
| 52 | |
| 53 | ifeq ($(CONFIG_OS), internal) |
| 54 | CFLAGS += -DOS_NO_C_LIB_DEFINES |
| 55 | endif |
| 56 | |
| 57 | ifdef CONFIG_NATIVE_WINDOWS |
| 58 | CFLAGS += -DCONFIG_NATIVE_WINDOWS |
| 59 | LIBS += -lws2_32 |
| 60 | endif |
| 61 | |
| 62 | OBJS += main.o |
| 63 | OBJS += config_file.o |
| 64 | |
| 65 | OBJS += ../src/ap/hostapd.o |
| 66 | OBJS += ../src/ap/wpa_auth_glue.o |
| 67 | OBJS += ../src/ap/drv_callbacks.o |
| 68 | OBJS += ../src/ap/ap_drv_ops.o |
| 69 | OBJS += ../src/ap/utils.o |
| 70 | OBJS += ../src/ap/authsrv.o |
| 71 | OBJS += ../src/ap/ieee802_1x.o |
| 72 | OBJS += ../src/ap/ap_config.o |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 73 | OBJS += ../src/ap/eap_user_db.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 74 | OBJS += ../src/ap/ieee802_11_auth.o |
| 75 | OBJS += ../src/ap/sta_info.o |
| 76 | OBJS += ../src/ap/wpa_auth.o |
| 77 | OBJS += ../src/ap/tkip_countermeasures.o |
| 78 | OBJS += ../src/ap/ap_mlme.o |
| 79 | OBJS += ../src/ap/wpa_auth_ie.o |
| 80 | OBJS += ../src/ap/preauth_auth.o |
| 81 | OBJS += ../src/ap/pmksa_cache_auth.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 82 | OBJS += ../src/ap/ieee802_11_shared.o |
| 83 | OBJS += ../src/ap/beacon.o |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 84 | OBJS += ../src/ap/bss_load.o |
Dmitry Shmidt | 849734c | 2016-05-27 09:59:01 -0700 | [diff] [blame] | 85 | OBJS += ../src/ap/neighbor_db.o |
| 86 | OBJS += ../src/ap/rrm.o |
Sunil Ravi | 99c035e | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 87 | OBJS += ../src/common/ptksa_cache.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 88 | |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 89 | OBJS_c = hostapd_cli.o |
| 90 | OBJS_c += ../src/common/wpa_ctrl.o |
| 91 | OBJS_c += ../src/utils/os_$(CONFIG_OS).o |
| 92 | OBJS_c += ../src/common/cli.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 93 | |
| 94 | NEED_RC4=y |
| 95 | NEED_AES=y |
| 96 | NEED_MD5=y |
| 97 | NEED_SHA1=y |
| 98 | |
| 99 | OBJS += ../src/drivers/drivers.o |
| 100 | CFLAGS += -DHOSTAPD |
| 101 | |
Dmitry Shmidt | aca489e | 2016-09-28 15:44:14 -0700 | [diff] [blame] | 102 | ifdef CONFIG_TAXONOMY |
| 103 | CFLAGS += -DCONFIG_TAXONOMY |
| 104 | OBJS += ../src/ap/taxonomy.o |
| 105 | endif |
| 106 | |
Dmitry Shmidt | 7f93d6f | 2014-02-21 11:22:49 -0800 | [diff] [blame] | 107 | ifdef CONFIG_MODULE_TESTS |
| 108 | CFLAGS += -DCONFIG_MODULE_TESTS |
| 109 | OBJS += hapd_module_tests.o |
| 110 | endif |
| 111 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 112 | ifdef CONFIG_WPA_TRACE |
| 113 | CFLAGS += -DWPA_TRACE |
| 114 | OBJS += ../src/utils/trace.o |
| 115 | HOBJS += ../src/utils/trace.o |
| 116 | LDFLAGS += -rdynamic |
| 117 | CFLAGS += -funwind-tables |
| 118 | ifdef CONFIG_WPA_TRACE_BFD |
Dmitry Shmidt | ec58b16 | 2014-02-19 12:44:18 -0800 | [diff] [blame] | 119 | CFLAGS += -DPACKAGE="hostapd" -DWPA_TRACE_BFD |
Dmitry Shmidt | 13ca8d8 | 2014-02-20 10:18:40 -0800 | [diff] [blame] | 120 | LIBS += -lbfd -ldl -liberty -lz |
| 121 | LIBS_c += -lbfd -ldl -liberty -lz |
| 122 | LIBS_h += -lbfd -ldl -liberty -lz |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 123 | LIBS_n += -lbfd -ldl -liberty -lz |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 124 | LIBS_s += -lbfd -ldl -liberty -lz |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 125 | endif |
| 126 | endif |
| 127 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 128 | ifndef CONFIG_ELOOP |
| 129 | CONFIG_ELOOP=eloop |
| 130 | endif |
| 131 | OBJS += ../src/utils/$(CONFIG_ELOOP).o |
| 132 | OBJS_c += ../src/utils/$(CONFIG_ELOOP).o |
Dmitry Shmidt | fa3fc4a | 2013-11-21 13:34:38 -0800 | [diff] [blame] | 133 | |
| 134 | ifeq ($(CONFIG_ELOOP), eloop) |
| 135 | # Using glibc < 2.17 requires -lrt for clock_gettime() |
| 136 | LIBS += -lrt |
| 137 | LIBS_c += -lrt |
| 138 | LIBS_h += -lrt |
Dmitry Shmidt | bd14a57 | 2014-02-18 10:33:49 -0800 | [diff] [blame] | 139 | LIBS_n += -lrt |
Dmitry Shmidt | fa3fc4a | 2013-11-21 13:34:38 -0800 | [diff] [blame] | 140 | endif |
| 141 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 142 | ifdef CONFIG_ELOOP_POLL |
| 143 | CFLAGS += -DCONFIG_ELOOP_POLL |
| 144 | endif |
| 145 | |
| 146 | ifdef CONFIG_ELOOP_EPOLL |
| 147 | CFLAGS += -DCONFIG_ELOOP_EPOLL |
| 148 | endif |
| 149 | |
Dmitry Shmidt | b97e428 | 2016-02-08 10:16:07 -0800 | [diff] [blame] | 150 | ifdef CONFIG_ELOOP_KQUEUE |
| 151 | CFLAGS += -DCONFIG_ELOOP_KQUEUE |
| 152 | endif |
| 153 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 154 | OBJS += ../src/utils/common.o |
Dmitry Shmidt | a3dc309 | 2015-06-23 11:21:28 -0700 | [diff] [blame] | 155 | OBJS_c += ../src/utils/common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 156 | OBJS += ../src/utils/wpa_debug.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 157 | OBJS_c += ../src/utils/wpa_debug.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 158 | OBJS += ../src/utils/wpabuf.o |
| 159 | OBJS += ../src/utils/os_$(CONFIG_OS).o |
| 160 | OBJS += ../src/utils/ip_addr.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 161 | OBJS += ../src/utils/crc32.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 162 | |
| 163 | OBJS += ../src/common/ieee802_11_common.o |
| 164 | OBJS += ../src/common/wpa_common.o |
Dmitry Shmidt | ff787d5 | 2015-01-12 13:01:47 -0800 | [diff] [blame] | 165 | OBJS += ../src/common/hw_features_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 166 | |
| 167 | OBJS += ../src/eapol_auth/eapol_auth_sm.o |
| 168 | |
| 169 | |
Dmitry Shmidt | 01904cf | 2013-12-05 11:08:35 -0800 | [diff] [blame] | 170 | ifdef CONFIG_CODE_COVERAGE |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 171 | CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE |
Dmitry Shmidt | 01904cf | 2013-12-05 11:08:35 -0800 | [diff] [blame] | 172 | LIBS += -lgcov |
| 173 | LIBS_c += -lgcov |
| 174 | LIBS_h += -lgcov |
| 175 | LIBS_n += -lgcov |
| 176 | endif |
| 177 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 178 | ifndef CONFIG_NO_DUMP_STATE |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 179 | # define HOSTAPD_DUMP_STATE to include support for dumping internal state |
| 180 | # through control interface commands (undefine it, if you want to save in |
| 181 | # binary size) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 182 | CFLAGS += -DHOSTAPD_DUMP_STATE |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 183 | OBJS += ../src/eapol_auth/eapol_auth_dump.o |
| 184 | endif |
| 185 | |
| 186 | ifdef CONFIG_NO_RADIUS |
| 187 | CFLAGS += -DCONFIG_NO_RADIUS |
| 188 | CONFIG_NO_ACCOUNTING=y |
| 189 | else |
| 190 | OBJS += ../src/radius/radius.o |
| 191 | OBJS += ../src/radius/radius_client.o |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 192 | OBJS += ../src/radius/radius_das.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 193 | endif |
| 194 | |
| 195 | ifdef CONFIG_NO_ACCOUNTING |
| 196 | CFLAGS += -DCONFIG_NO_ACCOUNTING |
| 197 | else |
| 198 | OBJS += ../src/ap/accounting.o |
| 199 | endif |
| 200 | |
| 201 | ifdef CONFIG_NO_VLAN |
| 202 | CFLAGS += -DCONFIG_NO_VLAN |
| 203 | else |
| 204 | OBJS += ../src/ap/vlan_init.o |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 205 | OBJS += ../src/ap/vlan_ifconfig.o |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 206 | OBJS += ../src/ap/vlan.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 207 | ifdef CONFIG_FULL_DYNAMIC_VLAN |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 208 | # Define CONFIG_FULL_DYNAMIC_VLAN to have hostapd manipulate bridges |
| 209 | # and VLAN interfaces for the VLAN feature. |
| 210 | CFLAGS += -DCONFIG_FULL_DYNAMIC_VLAN |
| 211 | OBJS += ../src/ap/vlan_full.o |
| 212 | ifdef CONFIG_VLAN_NETLINK |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 213 | OBJS += ../src/ap/vlan_util.o |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 214 | else |
| 215 | OBJS += ../src/ap/vlan_ioctl.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 216 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 217 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 218 | endif |
| 219 | |
| 220 | ifdef CONFIG_NO_CTRL_IFACE |
| 221 | CFLAGS += -DCONFIG_NO_CTRL_IFACE |
| 222 | else |
Dmitry Shmidt | 31a29cc | 2016-03-09 15:58:17 -0800 | [diff] [blame] | 223 | ifeq ($(CONFIG_CTRL_IFACE), udp) |
| 224 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 225 | else |
| 226 | ifeq ($(CONFIG_CTRL_IFACE), udp6) |
| 227 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 228 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_IPV6 |
| 229 | else |
| 230 | ifeq ($(CONFIG_CTRL_IFACE), udp-remote) |
| 231 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 232 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE |
| 233 | else |
| 234 | ifeq ($(CONFIG_CTRL_IFACE), udp6-remote) |
| 235 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 236 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE |
| 237 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_IPV6 |
| 238 | else |
| 239 | CFLAGS += -DCONFIG_CTRL_IFACE_UNIX |
| 240 | endif |
| 241 | endif |
| 242 | endif |
| 243 | endif |
| 244 | OBJS += ../src/common/ctrl_iface_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 245 | OBJS += ctrl_iface.o |
| 246 | OBJS += ../src/ap/ctrl_iface_ap.o |
| 247 | endif |
| 248 | |
Dmitry Shmidt | 31a29cc | 2016-03-09 15:58:17 -0800 | [diff] [blame] | 249 | ifndef CONFIG_NO_CTRL_IFACE |
| 250 | CFLAGS += -DCONFIG_CTRL_IFACE |
| 251 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 252 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 253 | ifdef CONFIG_RSN_PREAUTH |
| 254 | CFLAGS += -DCONFIG_RSN_PREAUTH |
| 255 | CONFIG_L2_PACKET=y |
| 256 | endif |
| 257 | |
Dmitry Shmidt | f21452a | 2014-02-26 10:55:25 -0800 | [diff] [blame] | 258 | ifdef CONFIG_HS20 |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 259 | CONFIG_PROXYARP=y |
| 260 | endif |
| 261 | |
| 262 | ifdef CONFIG_PROXYARP |
| 263 | CONFIG_L2_PACKET=y |
| 264 | endif |
| 265 | |
| 266 | ifdef CONFIG_SUITEB |
| 267 | CFLAGS += -DCONFIG_SUITEB |
Dmitry Shmidt | f21452a | 2014-02-26 10:55:25 -0800 | [diff] [blame] | 268 | endif |
| 269 | |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 270 | ifdef CONFIG_SUITEB192 |
| 271 | CFLAGS += -DCONFIG_SUITEB192 |
| 272 | NEED_SHA384=y |
| 273 | endif |
| 274 | |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 275 | ifdef CONFIG_OCV |
| 276 | CFLAGS += -DCONFIG_OCV |
| 277 | OBJS += ../src/common/ocv.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 278 | endif |
| 279 | |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 280 | NEED_AES_UNWRAP=y |
| 281 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 282 | ifdef CONFIG_IEEE80211R |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 283 | CFLAGS += -DCONFIG_IEEE80211R -DCONFIG_IEEE80211R_AP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 284 | OBJS += ../src/ap/wpa_auth_ft.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 285 | NEED_AES_UNWRAP=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 286 | NEED_AES_SIV=y |
| 287 | NEED_ETH_P_OUI=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 288 | NEED_HMAC_SHA256_KDF=y |
| 289 | endif |
| 290 | |
| 291 | ifdef NEED_ETH_P_OUI |
| 292 | CFLAGS += -DCONFIG_ETH_P_OUI |
| 293 | OBJS += ../src/ap/eth_p_oui.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 294 | endif |
| 295 | |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 296 | ifdef CONFIG_SAE |
| 297 | CFLAGS += -DCONFIG_SAE |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 298 | OBJS += ../src/common/sae.o |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 299 | ifdef CONFIG_SAE_PK |
| 300 | CFLAGS += -DCONFIG_SAE_PK |
Sunil | 8cd6f4d | 2022-06-28 18:40:46 +0000 | [diff] [blame] | 301 | NEED_AES_SIV=y |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 302 | OBJS += ../src/common/sae_pk.o |
| 303 | endif |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 304 | NEED_ECC=y |
| 305 | NEED_DH_GROUPS=y |
Hai Shalom | b755a2a | 2020-04-23 21:49:02 -0700 | [diff] [blame] | 306 | NEED_HMAC_SHA256_KDF=y |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 307 | NEED_AP_MLME=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 308 | NEED_DRAGONFLY=y |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 309 | endif |
| 310 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 311 | ifdef CONFIG_OWE |
| 312 | CFLAGS += -DCONFIG_OWE |
| 313 | NEED_ECC=y |
| 314 | NEED_HMAC_SHA256_KDF=y |
| 315 | NEED_HMAC_SHA384_KDF=y |
| 316 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 317 | NEED_SHA384=y |
| 318 | NEED_SHA512=y |
| 319 | endif |
| 320 | |
Jimmy Chen | caaac07 | 2019-09-16 16:36:06 +0800 | [diff] [blame] | 321 | ifdef CONFIG_WAPI_INTERFACE |
| 322 | L_CFLAGS += -DCONFIG_WAPI_INTERFACE |
| 323 | endif |
| 324 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 325 | ifdef CONFIG_AIRTIME_POLICY |
| 326 | CFLAGS += -DCONFIG_AIRTIME_POLICY |
| 327 | OBJS += ../src/ap/airtime_policy.o |
| 328 | endif |
| 329 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 330 | ifdef CONFIG_FILS |
| 331 | CFLAGS += -DCONFIG_FILS |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 332 | OBJS += ../src/ap/fils_hlp.o |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 333 | NEED_SHA384=y |
| 334 | NEED_AES_SIV=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 335 | ifdef CONFIG_FILS_SK_PFS |
| 336 | CFLAGS += -DCONFIG_FILS_SK_PFS |
| 337 | NEED_ECC=y |
| 338 | endif |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 339 | endif |
| 340 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 341 | ifdef CONFIG_WNM |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 342 | CFLAGS += -DCONFIG_WNM -DCONFIG_WNM_AP |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 343 | OBJS += ../src/ap/wnm_ap.o |
| 344 | endif |
| 345 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 346 | ifdef CONFIG_IEEE80211AC |
| 347 | CFLAGS += -DCONFIG_IEEE80211AC |
| 348 | endif |
| 349 | |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 350 | ifdef CONFIG_IEEE80211BE |
| 351 | CONFIG_IEEE80211AX=y |
| 352 | CFLAGS += -DCONFIG_IEEE80211BE |
| 353 | OBJS += ../src/ap/ieee802_11_eht.o |
| 354 | endif |
| 355 | |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 356 | ifdef CONFIG_IEEE80211AX |
| 357 | CFLAGS += -DCONFIG_IEEE80211AX |
| 358 | OBJS += ../src/ap/ieee802_11_he.o |
| 359 | endif |
| 360 | |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 361 | ifdef CONFIG_MBO |
| 362 | CFLAGS += -DCONFIG_MBO |
| 363 | OBJS += ../src/ap/mbo_ap.o |
| 364 | endif |
| 365 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 366 | include ../src/drivers/drivers.mak |
| 367 | OBJS += $(DRV_AP_OBJS) |
| 368 | CFLAGS += $(DRV_AP_CFLAGS) |
| 369 | LDFLAGS += $(DRV_AP_LDFLAGS) |
| 370 | LIBS += $(DRV_AP_LIBS) |
| 371 | |
| 372 | ifdef CONFIG_L2_PACKET |
| 373 | ifdef CONFIG_DNET_PCAP |
| 374 | ifdef CONFIG_L2_FREEBSD |
| 375 | LIBS += -lpcap |
| 376 | OBJS += ../src/l2_packet/l2_packet_freebsd.o |
| 377 | else |
| 378 | LIBS += -ldnet -lpcap |
| 379 | OBJS += ../src/l2_packet/l2_packet_pcap.o |
| 380 | endif |
| 381 | else |
| 382 | OBJS += ../src/l2_packet/l2_packet_linux.o |
| 383 | endif |
| 384 | else |
| 385 | OBJS += ../src/l2_packet/l2_packet_none.o |
| 386 | endif |
| 387 | |
| 388 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 389 | ifdef CONFIG_ERP |
| 390 | CFLAGS += -DCONFIG_ERP |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 391 | NEED_HMAC_SHA256_KDF=y |
| 392 | endif |
| 393 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 394 | ifdef CONFIG_EAP_MD5 |
| 395 | CFLAGS += -DEAP_SERVER_MD5 |
| 396 | OBJS += ../src/eap_server/eap_server_md5.o |
| 397 | CHAP=y |
| 398 | endif |
| 399 | |
| 400 | ifdef CONFIG_EAP_TLS |
| 401 | CFLAGS += -DEAP_SERVER_TLS |
| 402 | OBJS += ../src/eap_server/eap_server_tls.o |
| 403 | TLS_FUNCS=y |
| 404 | endif |
| 405 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 406 | ifdef CONFIG_EAP_UNAUTH_TLS |
| 407 | CFLAGS += -DEAP_SERVER_UNAUTH_TLS |
| 408 | ifndef CONFIG_EAP_TLS |
| 409 | OBJS += ../src/eap_server/eap_server_tls.o |
| 410 | TLS_FUNCS=y |
| 411 | endif |
| 412 | endif |
| 413 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 414 | ifdef CONFIG_EAP_PEAP |
| 415 | CFLAGS += -DEAP_SERVER_PEAP |
| 416 | OBJS += ../src/eap_server/eap_server_peap.o |
| 417 | OBJS += ../src/eap_common/eap_peap_common.o |
| 418 | TLS_FUNCS=y |
| 419 | CONFIG_EAP_MSCHAPV2=y |
| 420 | endif |
| 421 | |
| 422 | ifdef CONFIG_EAP_TTLS |
| 423 | CFLAGS += -DEAP_SERVER_TTLS |
| 424 | OBJS += ../src/eap_server/eap_server_ttls.o |
| 425 | TLS_FUNCS=y |
| 426 | CHAP=y |
| 427 | endif |
| 428 | |
| 429 | ifdef CONFIG_EAP_MSCHAPV2 |
| 430 | CFLAGS += -DEAP_SERVER_MSCHAPV2 |
| 431 | OBJS += ../src/eap_server/eap_server_mschapv2.o |
| 432 | MS_FUNCS=y |
| 433 | endif |
| 434 | |
| 435 | ifdef CONFIG_EAP_GTC |
| 436 | CFLAGS += -DEAP_SERVER_GTC |
| 437 | OBJS += ../src/eap_server/eap_server_gtc.o |
| 438 | endif |
| 439 | |
| 440 | ifdef CONFIG_EAP_SIM |
| 441 | CFLAGS += -DEAP_SERVER_SIM |
| 442 | OBJS += ../src/eap_server/eap_server_sim.o |
| 443 | CONFIG_EAP_SIM_COMMON=y |
| 444 | NEED_AES_CBC=y |
| 445 | endif |
| 446 | |
| 447 | ifdef CONFIG_EAP_AKA |
| 448 | CFLAGS += -DEAP_SERVER_AKA |
| 449 | OBJS += ../src/eap_server/eap_server_aka.o |
| 450 | CONFIG_EAP_SIM_COMMON=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 451 | NEED_AES_CBC=y |
| 452 | endif |
| 453 | |
| 454 | ifdef CONFIG_EAP_AKA_PRIME |
| 455 | CFLAGS += -DEAP_SERVER_AKA_PRIME |
| 456 | endif |
| 457 | |
| 458 | ifdef CONFIG_EAP_SIM_COMMON |
| 459 | OBJS += ../src/eap_common/eap_sim_common.o |
| 460 | # Example EAP-SIM/AKA interface for GSM/UMTS authentication. This can be |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 461 | # replaced with another file implementing the interface specified in |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 462 | # eap_sim_db.h. |
| 463 | OBJS += ../src/eap_server/eap_sim_db.o |
| 464 | NEED_FIPS186_2_PRF=y |
| 465 | endif |
| 466 | |
| 467 | ifdef CONFIG_EAP_PAX |
| 468 | CFLAGS += -DEAP_SERVER_PAX |
| 469 | OBJS += ../src/eap_server/eap_server_pax.o ../src/eap_common/eap_pax_common.o |
| 470 | endif |
| 471 | |
| 472 | ifdef CONFIG_EAP_PSK |
| 473 | CFLAGS += -DEAP_SERVER_PSK |
| 474 | OBJS += ../src/eap_server/eap_server_psk.o ../src/eap_common/eap_psk_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 475 | NEED_AES_ENCBLOCK=y |
| 476 | NEED_AES_EAX=y |
| 477 | endif |
| 478 | |
| 479 | ifdef CONFIG_EAP_SAKE |
| 480 | CFLAGS += -DEAP_SERVER_SAKE |
| 481 | OBJS += ../src/eap_server/eap_server_sake.o ../src/eap_common/eap_sake_common.o |
| 482 | endif |
| 483 | |
| 484 | ifdef CONFIG_EAP_GPSK |
| 485 | CFLAGS += -DEAP_SERVER_GPSK |
| 486 | OBJS += ../src/eap_server/eap_server_gpsk.o ../src/eap_common/eap_gpsk_common.o |
| 487 | ifdef CONFIG_EAP_GPSK_SHA256 |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 488 | CFLAGS += -DEAP_GPSK_SHA256 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 489 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 490 | endif |
| 491 | |
| 492 | ifdef CONFIG_EAP_PWD |
| 493 | CFLAGS += -DEAP_SERVER_PWD |
| 494 | OBJS += ../src/eap_server/eap_server_pwd.o ../src/eap_common/eap_pwd_common.o |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 495 | NEED_ECC=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 496 | NEED_DRAGONFLY=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 497 | endif |
| 498 | |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 499 | ifdef CONFIG_EAP_EKE |
| 500 | CFLAGS += -DEAP_SERVER_EKE |
| 501 | OBJS += ../src/eap_server/eap_server_eke.o ../src/eap_common/eap_eke_common.o |
| 502 | NEED_DH_GROUPS=y |
| 503 | NEED_DH_GROUPS_ALL=y |
| 504 | endif |
| 505 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 506 | ifdef CONFIG_EAP_VENDOR_TEST |
| 507 | CFLAGS += -DEAP_SERVER_VENDOR_TEST |
| 508 | OBJS += ../src/eap_server/eap_server_vendor_test.o |
| 509 | endif |
| 510 | |
| 511 | ifdef CONFIG_EAP_FAST |
| 512 | CFLAGS += -DEAP_SERVER_FAST |
| 513 | OBJS += ../src/eap_server/eap_server_fast.o |
| 514 | OBJS += ../src/eap_common/eap_fast_common.o |
| 515 | TLS_FUNCS=y |
| 516 | NEED_T_PRF=y |
| 517 | NEED_AES_UNWRAP=y |
| 518 | endif |
| 519 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 520 | ifdef CONFIG_EAP_TEAP |
| 521 | CFLAGS += -DEAP_SERVER_TEAP |
| 522 | OBJS += ../src/eap_server/eap_server_teap.o |
| 523 | OBJS += ../src/eap_common/eap_teap_common.o |
| 524 | TLS_FUNCS=y |
| 525 | NEED_T_PRF=y |
| 526 | NEED_SHA384=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 527 | NEED_TLS_PRF_SHA256=y |
| 528 | NEED_TLS_PRF_SHA384=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 529 | NEED_AES_UNWRAP=y |
| 530 | endif |
| 531 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 532 | ifdef CONFIG_WPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 533 | CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC |
| 534 | OBJS += ../src/utils/uuid.o |
| 535 | OBJS += ../src/ap/wps_hostapd.o |
| 536 | OBJS += ../src/eap_server/eap_server_wsc.o ../src/eap_common/eap_wsc_common.o |
| 537 | OBJS += ../src/wps/wps.o |
| 538 | OBJS += ../src/wps/wps_common.o |
| 539 | OBJS += ../src/wps/wps_attr_parse.o |
| 540 | OBJS += ../src/wps/wps_attr_build.o |
| 541 | OBJS += ../src/wps/wps_attr_process.o |
| 542 | OBJS += ../src/wps/wps_dev_attr.o |
| 543 | OBJS += ../src/wps/wps_enrollee.o |
| 544 | OBJS += ../src/wps/wps_registrar.o |
| 545 | NEED_DH_GROUPS=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 546 | NEED_BASE64=y |
| 547 | NEED_AES_CBC=y |
| 548 | NEED_MODEXP=y |
| 549 | CONFIG_EAP=y |
| 550 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 551 | ifdef CONFIG_WPS_NFC |
| 552 | CFLAGS += -DCONFIG_WPS_NFC |
| 553 | OBJS += ../src/wps/ndef.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 554 | NEED_WPS_OOB=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 555 | endif |
| 556 | |
| 557 | ifdef NEED_WPS_OOB |
| 558 | CFLAGS += -DCONFIG_WPS_OOB |
| 559 | endif |
| 560 | |
| 561 | ifdef CONFIG_WPS_UPNP |
| 562 | CFLAGS += -DCONFIG_WPS_UPNP |
| 563 | OBJS += ../src/wps/wps_upnp.o |
| 564 | OBJS += ../src/wps/wps_upnp_ssdp.o |
| 565 | OBJS += ../src/wps/wps_upnp_web.o |
| 566 | OBJS += ../src/wps/wps_upnp_event.o |
| 567 | OBJS += ../src/wps/wps_upnp_ap.o |
| 568 | OBJS += ../src/wps/upnp_xml.o |
| 569 | OBJS += ../src/wps/httpread.o |
| 570 | OBJS += ../src/wps/http_client.o |
| 571 | OBJS += ../src/wps/http_server.o |
| 572 | endif |
| 573 | |
| 574 | ifdef CONFIG_WPS_STRICT |
| 575 | CFLAGS += -DCONFIG_WPS_STRICT |
| 576 | OBJS += ../src/wps/wps_validate.o |
| 577 | endif |
| 578 | |
| 579 | ifdef CONFIG_WPS_TESTING |
| 580 | CFLAGS += -DCONFIG_WPS_TESTING |
| 581 | endif |
| 582 | |
| 583 | endif |
| 584 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 585 | ifdef CONFIG_DPP |
| 586 | CFLAGS += -DCONFIG_DPP |
| 587 | OBJS += ../src/common/dpp.o |
Hai Shalom | 4fbc08f | 2020-05-18 12:37:00 -0700 | [diff] [blame] | 588 | OBJS += ../src/common/dpp_auth.o |
| 589 | OBJS += ../src/common/dpp_backup.o |
| 590 | OBJS += ../src/common/dpp_crypto.o |
| 591 | OBJS += ../src/common/dpp_pkex.o |
| 592 | OBJS += ../src/common/dpp_reconfig.o |
| 593 | OBJS += ../src/common/dpp_tcp.o |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 594 | OBJS += ../src/ap/dpp_hostapd.o |
| 595 | OBJS += ../src/ap/gas_query_ap.o |
| 596 | NEED_AES_SIV=y |
| 597 | NEED_HMAC_SHA256_KDF=y |
| 598 | NEED_HMAC_SHA384_KDF=y |
| 599 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 600 | NEED_SHA384=y |
| 601 | NEED_SHA512=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 602 | NEED_ECC=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 603 | NEED_JSON=y |
| 604 | NEED_GAS=y |
| 605 | NEED_BASE64=y |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 606 | NEED_ASN1=y |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 607 | ifdef CONFIG_DPP2 |
| 608 | CFLAGS += -DCONFIG_DPP2 |
| 609 | endif |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 610 | ifdef CONFIG_DPP3 |
| 611 | CFLAGS += -DCONFIG_DPP3 |
| 612 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 613 | endif |
| 614 | |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 615 | ifdef CONFIG_NAN_USD |
| 616 | OBJS += ../src/common/nan_de.o |
| 617 | OBJS += ../src/ap/nan_usd_ap.o |
| 618 | CFLAGS += -DCONFIG_NAN_USD |
| 619 | endif |
| 620 | |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame] | 621 | ifdef CONFIG_PASN |
| 622 | CFLAGS += -DCONFIG_PASN |
| 623 | CFLAGS += -DCONFIG_PTKSA_CACHE |
| 624 | NEED_HMAC_SHA256_KDF=y |
| 625 | NEED_HMAC_SHA384_KDF=y |
| 626 | NEED_SHA256=y |
| 627 | NEED_SHA384=y |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame] | 628 | endif |
| 629 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 630 | ifdef CONFIG_EAP_IKEV2 |
| 631 | CFLAGS += -DEAP_SERVER_IKEV2 |
| 632 | OBJS += ../src/eap_server/eap_server_ikev2.o ../src/eap_server/ikev2.o |
| 633 | OBJS += ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o |
| 634 | NEED_DH_GROUPS=y |
| 635 | NEED_DH_GROUPS_ALL=y |
| 636 | NEED_MODEXP=y |
| 637 | NEED_CIPHER=y |
| 638 | endif |
| 639 | |
| 640 | ifdef CONFIG_EAP_TNC |
| 641 | CFLAGS += -DEAP_SERVER_TNC |
| 642 | OBJS += ../src/eap_server/eap_server_tnc.o |
| 643 | OBJS += ../src/eap_server/tncs.o |
| 644 | NEED_BASE64=y |
| 645 | ifndef CONFIG_DRIVER_BSD |
| 646 | LIBS += -ldl |
| 647 | endif |
| 648 | endif |
| 649 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 650 | ifdef CONFIG_MACSEC |
| 651 | CFLAGS += -DCONFIG_MACSEC |
| 652 | OBJS += ../src/ap/wpa_auth_kay.o |
| 653 | OBJS += ../src/pae/ieee802_1x_cp.o |
| 654 | OBJS += ../src/pae/ieee802_1x_kay.o |
| 655 | OBJS += ../src/pae/ieee802_1x_key.o |
| 656 | OBJS += ../src/pae/ieee802_1x_secy_ops.o |
| 657 | endif |
| 658 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 659 | # Basic EAP functionality is needed for EAPOL |
| 660 | OBJS += eap_register.o |
| 661 | OBJS += ../src/eap_server/eap_server.o |
| 662 | OBJS += ../src/eap_common/eap_common.o |
| 663 | OBJS += ../src/eap_server/eap_server_methods.o |
| 664 | OBJS += ../src/eap_server/eap_server_identity.o |
| 665 | CFLAGS += -DEAP_SERVER_IDENTITY |
| 666 | |
| 667 | ifdef CONFIG_EAP |
| 668 | CFLAGS += -DEAP_SERVER |
| 669 | endif |
| 670 | |
| 671 | ifdef CONFIG_PKCS12 |
| 672 | CFLAGS += -DPKCS12_FUNCS |
| 673 | endif |
| 674 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 675 | ifdef NEED_DRAGONFLY |
| 676 | OBJS += ../src/common/dragonfly.o |
| 677 | endif |
| 678 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 679 | ifdef MS_FUNCS |
| 680 | OBJS += ../src/crypto/ms_funcs.o |
| 681 | NEED_DES=y |
| 682 | NEED_MD4=y |
| 683 | endif |
| 684 | |
| 685 | ifdef CHAP |
| 686 | OBJS += ../src/eap_common/chap.o |
| 687 | endif |
| 688 | |
Sunil Ravi | 99c035e | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 689 | ifdef CONFIG_RADIUS_TLS |
| 690 | TLS_FUNCS=y |
| 691 | CFLAGS += -DCONFIG_RADIUS_TLS |
| 692 | endif |
| 693 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 694 | ifdef TLS_FUNCS |
| 695 | NEED_DES=y |
| 696 | # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS) |
| 697 | CFLAGS += -DEAP_TLS_FUNCS |
| 698 | OBJS += ../src/eap_server/eap_server_tls_common.o |
| 699 | NEED_TLS_PRF=y |
| 700 | endif |
| 701 | |
| 702 | ifndef CONFIG_TLS |
| 703 | CONFIG_TLS=openssl |
| 704 | endif |
| 705 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 706 | ifdef CONFIG_TLSV11 |
| 707 | CFLAGS += -DCONFIG_TLSV11 |
| 708 | endif |
| 709 | |
| 710 | ifdef CONFIG_TLSV12 |
| 711 | CFLAGS += -DCONFIG_TLSV12 |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 712 | endif |
| 713 | |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 714 | ifeq ($(CONFIG_TLS), wolfssl) |
| 715 | CONFIG_CRYPTO=wolfssl |
| 716 | ifdef TLS_FUNCS |
| 717 | OBJS += ../src/crypto/tls_wolfssl.o |
| 718 | LIBS += -lwolfssl -lm |
| 719 | endif |
| 720 | OBJS += ../src/crypto/crypto_wolfssl.o |
| 721 | HOBJS += ../src/crypto/crypto_wolfssl.o |
| 722 | ifdef NEED_FIPS186_2_PRF |
| 723 | OBJS += ../src/crypto/fips_prf_wolfssl.o |
| 724 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 725 | NEED_TLS_PRF_SHA256=y |
| 726 | LIBS += -lwolfssl -lm |
| 727 | LIBS_h += -lwolfssl -lm |
| 728 | ifdef CONFIG_TLS_ADD_DL |
| 729 | LIBS += -ldl |
| 730 | LIBS_h += -ldl |
| 731 | endif |
| 732 | endif |
| 733 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 734 | ifeq ($(CONFIG_TLS), openssl) |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 735 | CFLAGS += -DCRYPTO_RSA_OAEP_SHA256 |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 736 | CONFIG_CRYPTO=openssl |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 737 | ifdef TLS_FUNCS |
| 738 | OBJS += ../src/crypto/tls_openssl.o |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 739 | OBJS += ../src/crypto/tls_openssl_ocsp.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 740 | LIBS += -lssl |
| 741 | endif |
| 742 | OBJS += ../src/crypto/crypto_openssl.o |
| 743 | HOBJS += ../src/crypto/crypto_openssl.o |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 744 | SOBJS += ../src/crypto/crypto_openssl.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 745 | ifdef NEED_FIPS186_2_PRF |
| 746 | OBJS += ../src/crypto/fips_prf_openssl.o |
| 747 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 748 | NEED_TLS_PRF_SHA256=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 749 | LIBS += -lcrypto |
| 750 | LIBS_h += -lcrypto |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 751 | LIBS_n += -lcrypto |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 752 | LIBS_s += -lcrypto |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 753 | ifdef CONFIG_TLS_ADD_DL |
| 754 | LIBS += -ldl |
| 755 | LIBS_h += -ldl |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 756 | LIBS_s += -ldl |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 757 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 758 | ifndef CONFIG_TLS_DEFAULT_CIPHERS |
| 759 | CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW" |
| 760 | endif |
| 761 | CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 762 | endif |
| 763 | |
| 764 | ifeq ($(CONFIG_TLS), gnutls) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 765 | ifndef CONFIG_CRYPTO |
| 766 | # default to libgcrypt |
| 767 | CONFIG_CRYPTO=gnutls |
| 768 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 769 | ifdef TLS_FUNCS |
| 770 | OBJS += ../src/crypto/tls_gnutls.o |
| 771 | LIBS += -lgnutls -lgpg-error |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 772 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 773 | OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
| 774 | HOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 775 | ifdef NEED_FIPS186_2_PRF |
Dmitry Shmidt | 9866086 | 2014-03-11 17:26:21 -0700 | [diff] [blame] | 776 | OBJS += ../src/crypto/fips_prf_internal.o |
| 777 | SHA1OBJS += ../src/crypto/sha1-internal.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 778 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 779 | ifeq ($(CONFIG_CRYPTO), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 780 | LIBS += -lgcrypt |
| 781 | LIBS_h += -lgcrypt |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 782 | LIBS_n += -lgcrypt |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 783 | CONFIG_INTERNAL_RC4=y |
| 784 | CONFIG_INTERNAL_DH_GROUP5=y |
| 785 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 786 | ifeq ($(CONFIG_CRYPTO), nettle) |
| 787 | LIBS += -lnettle -lgmp |
| 788 | LIBS_p += -lnettle -lgmp |
| 789 | CONFIG_INTERNAL_RC4=y |
| 790 | CONFIG_INTERNAL_DH_GROUP5=y |
| 791 | endif |
| 792 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 793 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 794 | ifeq ($(CONFIG_TLS), internal) |
| 795 | ifndef CONFIG_CRYPTO |
| 796 | CONFIG_CRYPTO=internal |
| 797 | endif |
| 798 | ifdef TLS_FUNCS |
| 799 | OBJS += ../src/crypto/crypto_internal-rsa.o |
| 800 | OBJS += ../src/crypto/tls_internal.o |
| 801 | OBJS += ../src/tls/tlsv1_common.o |
| 802 | OBJS += ../src/tls/tlsv1_record.o |
| 803 | OBJS += ../src/tls/tlsv1_cred.o |
| 804 | OBJS += ../src/tls/tlsv1_server.o |
| 805 | OBJS += ../src/tls/tlsv1_server_write.o |
| 806 | OBJS += ../src/tls/tlsv1_server_read.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 807 | OBJS += ../src/tls/rsa.o |
| 808 | OBJS += ../src/tls/x509v3.o |
| 809 | OBJS += ../src/tls/pkcs1.o |
| 810 | OBJS += ../src/tls/pkcs5.o |
| 811 | OBJS += ../src/tls/pkcs8.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 812 | NEED_ASN1=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 813 | NEED_BASE64=y |
| 814 | NEED_TLS_PRF=y |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 815 | ifdef CONFIG_TLSV12 |
| 816 | NEED_TLS_PRF_SHA256=y |
| 817 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 818 | NEED_MODEXP=y |
| 819 | NEED_CIPHER=y |
| 820 | CFLAGS += -DCONFIG_TLS_INTERNAL |
| 821 | CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER |
| 822 | endif |
| 823 | ifdef NEED_CIPHER |
| 824 | NEED_DES=y |
| 825 | OBJS += ../src/crypto/crypto_internal-cipher.o |
| 826 | endif |
| 827 | ifdef NEED_MODEXP |
| 828 | OBJS += ../src/crypto/crypto_internal-modexp.o |
| 829 | OBJS += ../src/tls/bignum.o |
| 830 | endif |
| 831 | ifeq ($(CONFIG_CRYPTO), libtomcrypt) |
| 832 | OBJS += ../src/crypto/crypto_libtomcrypt.o |
| 833 | LIBS += -ltomcrypt -ltfm |
| 834 | LIBS_h += -ltomcrypt -ltfm |
| 835 | CONFIG_INTERNAL_SHA256=y |
| 836 | CONFIG_INTERNAL_RC4=y |
| 837 | CONFIG_INTERNAL_DH_GROUP5=y |
| 838 | endif |
| 839 | ifeq ($(CONFIG_CRYPTO), internal) |
| 840 | OBJS += ../src/crypto/crypto_internal.o |
| 841 | NEED_AES_DEC=y |
| 842 | CFLAGS += -DCONFIG_CRYPTO_INTERNAL |
| 843 | ifdef CONFIG_INTERNAL_LIBTOMMATH |
| 844 | CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 845 | ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST |
| 846 | CFLAGS += -DLTM_FAST |
| 847 | endif |
| 848 | else |
| 849 | LIBS += -ltommath |
| 850 | LIBS_h += -ltommath |
| 851 | endif |
| 852 | CONFIG_INTERNAL_AES=y |
| 853 | CONFIG_INTERNAL_DES=y |
| 854 | CONFIG_INTERNAL_SHA1=y |
| 855 | CONFIG_INTERNAL_MD4=y |
| 856 | CONFIG_INTERNAL_MD5=y |
| 857 | CONFIG_INTERNAL_SHA256=y |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 858 | CONFIG_INTERNAL_SHA384=y |
| 859 | CONFIG_INTERNAL_SHA512=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 860 | CONFIG_INTERNAL_RC4=y |
| 861 | CONFIG_INTERNAL_DH_GROUP5=y |
| 862 | endif |
| 863 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 864 | OBJS += ../src/crypto/crypto_cryptoapi.o |
| 865 | OBJS_p += ../src/crypto/crypto_cryptoapi.o |
| 866 | CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI |
| 867 | CONFIG_INTERNAL_SHA256=y |
| 868 | CONFIG_INTERNAL_RC4=y |
| 869 | endif |
| 870 | endif |
| 871 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 872 | ifeq ($(CONFIG_TLS), linux) |
| 873 | OBJS += ../src/crypto/crypto_linux.o |
| 874 | ifdef TLS_FUNCS |
| 875 | OBJS += ../src/crypto/crypto_internal-rsa.o |
| 876 | OBJS += ../src/crypto/tls_internal.o |
| 877 | OBJS += ../src/tls/tlsv1_common.o |
| 878 | OBJS += ../src/tls/tlsv1_record.o |
| 879 | OBJS += ../src/tls/tlsv1_cred.o |
| 880 | OBJS += ../src/tls/tlsv1_server.o |
| 881 | OBJS += ../src/tls/tlsv1_server_write.o |
| 882 | OBJS += ../src/tls/tlsv1_server_read.o |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 883 | OBJS += ../src/tls/rsa.o |
| 884 | OBJS += ../src/tls/x509v3.o |
| 885 | OBJS += ../src/tls/pkcs1.o |
| 886 | OBJS += ../src/tls/pkcs5.o |
| 887 | OBJS += ../src/tls/pkcs8.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 888 | NEED_ASN1=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 889 | NEED_BASE64=y |
| 890 | NEED_TLS_PRF=y |
| 891 | ifdef CONFIG_TLSV12 |
| 892 | NEED_TLS_PRF_SHA256=y |
| 893 | endif |
| 894 | NEED_MODEXP=y |
| 895 | NEED_CIPHER=y |
| 896 | CFLAGS += -DCONFIG_TLS_INTERNAL |
| 897 | CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER |
| 898 | endif |
| 899 | ifdef NEED_MODEXP |
| 900 | OBJS += ../src/crypto/crypto_internal-modexp.o |
| 901 | OBJS += ../src/tls/bignum.o |
| 902 | CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 903 | CFLAGS += -DLTM_FAST |
| 904 | endif |
| 905 | CONFIG_INTERNAL_DH_GROUP5=y |
| 906 | ifdef NEED_FIPS186_2_PRF |
| 907 | OBJS += ../src/crypto/fips_prf_internal.o |
| 908 | OBJS += ../src/crypto/sha1-internal.o |
| 909 | endif |
| 910 | endif |
| 911 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 912 | ifeq ($(CONFIG_TLS), none) |
| 913 | ifdef TLS_FUNCS |
| 914 | OBJS += ../src/crypto/tls_none.o |
| 915 | CFLAGS += -DEAP_TLS_NONE |
| 916 | CONFIG_INTERNAL_AES=y |
| 917 | CONFIG_INTERNAL_SHA1=y |
| 918 | CONFIG_INTERNAL_MD5=y |
| 919 | endif |
| 920 | OBJS += ../src/crypto/crypto_none.o |
| 921 | OBJS_p += ../src/crypto/crypto_none.o |
| 922 | CONFIG_INTERNAL_SHA256=y |
| 923 | CONFIG_INTERNAL_RC4=y |
| 924 | endif |
| 925 | |
| 926 | ifndef TLS_FUNCS |
| 927 | OBJS += ../src/crypto/tls_none.o |
| 928 | ifeq ($(CONFIG_TLS), internal) |
| 929 | CONFIG_INTERNAL_AES=y |
| 930 | CONFIG_INTERNAL_SHA1=y |
| 931 | CONFIG_INTERNAL_MD5=y |
| 932 | CONFIG_INTERNAL_RC4=y |
| 933 | endif |
| 934 | endif |
| 935 | |
| 936 | AESOBJS = # none so far |
| 937 | ifdef CONFIG_INTERNAL_AES |
| 938 | AESOBJS += ../src/crypto/aes-internal.o ../src/crypto/aes-internal-enc.o |
| 939 | endif |
| 940 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 941 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 942 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 943 | AESOBJS += ../src/crypto/aes-wrap.o |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 944 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 945 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 946 | ifdef NEED_AES_EAX |
| 947 | AESOBJS += ../src/crypto/aes-eax.o |
| 948 | NEED_AES_CTR=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 949 | endif |
| 950 | ifdef NEED_AES_SIV |
| 951 | AESOBJS += ../src/crypto/aes-siv.o |
| 952 | NEED_AES_CTR=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 953 | endif |
| 954 | ifdef NEED_AES_CTR |
| 955 | AESOBJS += ../src/crypto/aes-ctr.o |
| 956 | endif |
| 957 | ifdef NEED_AES_ENCBLOCK |
| 958 | AESOBJS += ../src/crypto/aes-encblock.o |
| 959 | endif |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 960 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 961 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 962 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 963 | AESOBJS += ../src/crypto/aes-omac1.o |
| 964 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 965 | endif |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 966 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 967 | ifdef NEED_AES_UNWRAP |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 968 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 969 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 970 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 971 | NEED_AES_DEC=y |
| 972 | AESOBJS += ../src/crypto/aes-unwrap.o |
| 973 | endif |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 974 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 975 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 976 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 977 | ifdef NEED_AES_CBC |
| 978 | NEED_AES_DEC=y |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 979 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 980 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 981 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 982 | AESOBJS += ../src/crypto/aes-cbc.o |
| 983 | endif |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 984 | endif |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 985 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 986 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 987 | ifdef NEED_AES_DEC |
| 988 | ifdef CONFIG_INTERNAL_AES |
| 989 | AESOBJS += ../src/crypto/aes-internal-dec.o |
| 990 | endif |
| 991 | endif |
| 992 | ifdef NEED_AES |
| 993 | OBJS += $(AESOBJS) |
| 994 | endif |
| 995 | |
| 996 | ifdef NEED_SHA1 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 997 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 998 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 999 | ifneq ($(CONFIG_TLS), gnutls) |
| 1000 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1001 | SHA1OBJS += ../src/crypto/sha1.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1002 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1003 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1004 | endif |
| 1005 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1006 | SHA1OBJS += ../src/crypto/sha1-prf.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1007 | ifdef CONFIG_INTERNAL_SHA1 |
| 1008 | SHA1OBJS += ../src/crypto/sha1-internal.o |
| 1009 | ifdef NEED_FIPS186_2_PRF |
| 1010 | SHA1OBJS += ../src/crypto/fips_prf_internal.o |
| 1011 | endif |
| 1012 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1013 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1014 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1015 | SHA1OBJS += ../src/crypto/sha1-pbkdf2.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1016 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1017 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1018 | ifdef NEED_T_PRF |
| 1019 | SHA1OBJS += ../src/crypto/sha1-tprf.o |
| 1020 | endif |
| 1021 | ifdef NEED_TLS_PRF |
| 1022 | SHA1OBJS += ../src/crypto/sha1-tlsprf.o |
| 1023 | endif |
| 1024 | endif |
| 1025 | |
| 1026 | ifdef NEED_SHA1 |
| 1027 | OBJS += $(SHA1OBJS) |
| 1028 | endif |
| 1029 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1030 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1031 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1032 | ifneq ($(CONFIG_TLS), gnutls) |
| 1033 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1034 | OBJS += ../src/crypto/md5.o |
| 1035 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1036 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1037 | endif |
| 1038 | endif |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1039 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1040 | ifdef NEED_MD5 |
| 1041 | ifdef CONFIG_INTERNAL_MD5 |
| 1042 | OBJS += ../src/crypto/md5-internal.o |
| 1043 | HOBJS += ../src/crypto/md5-internal.o |
| 1044 | endif |
| 1045 | endif |
| 1046 | |
| 1047 | ifdef NEED_MD4 |
| 1048 | ifdef CONFIG_INTERNAL_MD4 |
| 1049 | OBJS += ../src/crypto/md4-internal.o |
| 1050 | endif |
| 1051 | endif |
| 1052 | |
| 1053 | ifdef NEED_DES |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1054 | CFLAGS += -DCONFIG_DES |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1055 | ifdef CONFIG_INTERNAL_DES |
| 1056 | OBJS += ../src/crypto/des-internal.o |
| 1057 | endif |
| 1058 | endif |
| 1059 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1060 | ifdef CONFIG_NO_RC4 |
| 1061 | CFLAGS += -DCONFIG_NO_RC4 |
| 1062 | endif |
| 1063 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1064 | ifdef NEED_RC4 |
| 1065 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1066 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1067 | OBJS += ../src/crypto/rc4.o |
| 1068 | endif |
| 1069 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1070 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1071 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1072 | CFLAGS += -DCONFIG_SHA256 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1073 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1074 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1075 | ifneq ($(CONFIG_TLS), gnutls) |
| 1076 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1077 | OBJS += ../src/crypto/sha256.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1078 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1079 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1080 | endif |
| 1081 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1082 | OBJS += ../src/crypto/sha256-prf.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1083 | ifdef CONFIG_INTERNAL_SHA256 |
| 1084 | OBJS += ../src/crypto/sha256-internal.o |
| 1085 | endif |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1086 | ifdef NEED_TLS_PRF_SHA256 |
| 1087 | OBJS += ../src/crypto/sha256-tlsprf.o |
| 1088 | endif |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 1089 | ifdef NEED_TLS_PRF_SHA384 |
| 1090 | OBJS += ../src/crypto/sha384-tlsprf.o |
| 1091 | endif |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1092 | ifdef NEED_HMAC_SHA256_KDF |
| 1093 | OBJS += ../src/crypto/sha256-kdf.o |
| 1094 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1095 | ifdef NEED_HMAC_SHA384_KDF |
| 1096 | OBJS += ../src/crypto/sha384-kdf.o |
| 1097 | endif |
| 1098 | ifdef NEED_HMAC_SHA512_KDF |
| 1099 | OBJS += ../src/crypto/sha512-kdf.o |
| 1100 | endif |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1101 | ifdef NEED_SHA384 |
| 1102 | CFLAGS += -DCONFIG_SHA384 |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1103 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1104 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1105 | ifneq ($(CONFIG_TLS), gnutls) |
| 1106 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1107 | OBJS += ../src/crypto/sha384.o |
| 1108 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1109 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1110 | endif |
| 1111 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1112 | OBJS += ../src/crypto/sha384-prf.o |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1113 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1114 | ifdef NEED_SHA512 |
| 1115 | CFLAGS += -DCONFIG_SHA512 |
| 1116 | ifneq ($(CONFIG_TLS), openssl) |
| 1117 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1118 | ifneq ($(CONFIG_TLS), gnutls) |
| 1119 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1120 | OBJS += ../src/crypto/sha512.o |
| 1121 | endif |
| 1122 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1123 | endif |
| 1124 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1125 | OBJS += ../src/crypto/sha512-prf.o |
| 1126 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1127 | |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1128 | ifdef CONFIG_INTERNAL_SHA384 |
| 1129 | CFLAGS += -DCONFIG_INTERNAL_SHA384 |
| 1130 | OBJS += ../src/crypto/sha384-internal.o |
| 1131 | endif |
| 1132 | |
| 1133 | ifdef CONFIG_INTERNAL_SHA512 |
| 1134 | CFLAGS += -DCONFIG_INTERNAL_SHA512 |
| 1135 | OBJS += ../src/crypto/sha512-internal.o |
| 1136 | endif |
| 1137 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1138 | ifdef NEED_ASN1 |
| 1139 | OBJS += ../src/tls/asn1.o |
| 1140 | endif |
| 1141 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1142 | ifdef NEED_DH_GROUPS |
| 1143 | OBJS += ../src/crypto/dh_groups.o |
| 1144 | endif |
| 1145 | ifdef NEED_DH_GROUPS_ALL |
| 1146 | CFLAGS += -DALL_DH_GROUPS |
| 1147 | endif |
| 1148 | ifdef CONFIG_INTERNAL_DH_GROUP5 |
| 1149 | ifdef NEED_DH_GROUPS |
| 1150 | OBJS += ../src/crypto/dh_group5.o |
| 1151 | endif |
| 1152 | endif |
| 1153 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1154 | ifdef NEED_ECC |
| 1155 | CFLAGS += -DCONFIG_ECC |
| 1156 | endif |
| 1157 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1158 | ifdef CONFIG_NO_RANDOM_POOL |
| 1159 | CFLAGS += -DCONFIG_NO_RANDOM_POOL |
| 1160 | else |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 1161 | ifdef CONFIG_GETRANDOM |
| 1162 | CFLAGS += -DCONFIG_GETRANDOM |
| 1163 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1164 | OBJS += ../src/crypto/random.o |
| 1165 | HOBJS += ../src/crypto/random.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1166 | HOBJS += ../src/utils/eloop.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1167 | HOBJS += $(SHA1OBJS) |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 1168 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1169 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1170 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1171 | HOBJS += ../src/crypto/md5.o |
| 1172 | endif |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 1173 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1174 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1175 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1176 | |
| 1177 | ifdef CONFIG_RADIUS_SERVER |
| 1178 | CFLAGS += -DRADIUS_SERVER |
| 1179 | OBJS += ../src/radius/radius_server.o |
| 1180 | endif |
| 1181 | |
| 1182 | ifdef CONFIG_IPV6 |
| 1183 | CFLAGS += -DCONFIG_IPV6 |
| 1184 | endif |
| 1185 | |
| 1186 | ifdef CONFIG_DRIVER_RADIUS_ACL |
| 1187 | CFLAGS += -DCONFIG_DRIVER_RADIUS_ACL |
| 1188 | endif |
| 1189 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1190 | ifdef NEED_BASE64 |
| 1191 | OBJS += ../src/utils/base64.o |
| 1192 | endif |
| 1193 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1194 | ifdef NEED_JSON |
| 1195 | OBJS += ../src/utils/json.o |
| 1196 | CFLAGS += -DCONFIG_JSON |
| 1197 | endif |
| 1198 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1199 | ifdef NEED_AP_MLME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1200 | OBJS += ../src/ap/wmm.o |
| 1201 | OBJS += ../src/ap/ap_list.o |
Sunil Ravi | 38ad1ed | 2023-01-17 23:58:31 +0000 | [diff] [blame] | 1202 | OBJS += ../src/ap/comeback_token.o |
| 1203 | OBJS += ../src/pasn/pasn_responder.o |
Sunil Ravi | 99c035e | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 1204 | OBJS += ../src/pasn/pasn_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1205 | OBJS += ../src/ap/ieee802_11.o |
| 1206 | OBJS += ../src/ap/hw_features.o |
Dmitry Shmidt | 051af73 | 2013-10-22 13:52:46 -0700 | [diff] [blame] | 1207 | OBJS += ../src/ap/dfs.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1208 | CFLAGS += -DNEED_AP_MLME |
| 1209 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1210 | OBJS += ../src/ap/ieee802_11_ht.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1211 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1212 | ifdef CONFIG_IEEE80211AC |
| 1213 | OBJS += ../src/ap/ieee802_11_vht.o |
| 1214 | endif |
| 1215 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1216 | ifdef CONFIG_P2P_MANAGER |
| 1217 | CFLAGS += -DCONFIG_P2P_MANAGER |
| 1218 | OBJS += ../src/ap/p2p_hostapd.o |
| 1219 | endif |
| 1220 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1221 | ifdef CONFIG_HS20 |
| 1222 | CFLAGS += -DCONFIG_HS20 |
| 1223 | OBJS += ../src/ap/hs20.o |
| 1224 | CONFIG_INTERWORKING=y |
| 1225 | endif |
| 1226 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1227 | ifdef CONFIG_INTERWORKING |
| 1228 | CFLAGS += -DCONFIG_INTERWORKING |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1229 | NEED_GAS=y |
| 1230 | endif |
| 1231 | |
| 1232 | ifdef NEED_GAS |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1233 | OBJS += ../src/common/gas.o |
| 1234 | OBJS += ../src/ap/gas_serv.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1235 | endif |
| 1236 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1237 | ifdef CONFIG_PROXYARP |
| 1238 | CFLAGS += -DCONFIG_PROXYARP |
| 1239 | OBJS += ../src/ap/x_snoop.o |
| 1240 | OBJS += ../src/ap/dhcp_snoop.o |
| 1241 | ifdef CONFIG_IPV6 |
| 1242 | OBJS += ../src/ap/ndisc_snoop.o |
| 1243 | endif |
| 1244 | endif |
| 1245 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1246 | OBJS += ../src/drivers/driver_common.o |
| 1247 | |
| 1248 | ifdef CONFIG_WPA_CLI_EDIT |
| 1249 | OBJS_c += ../src/utils/edit.o |
| 1250 | else |
| 1251 | OBJS_c += ../src/utils/edit_simple.o |
| 1252 | endif |
| 1253 | |
Dmitry Shmidt | 391c59f | 2013-09-03 12:16:28 -0700 | [diff] [blame] | 1254 | ifdef CONFIG_ACS |
| 1255 | CFLAGS += -DCONFIG_ACS |
| 1256 | OBJS += ../src/ap/acs.o |
| 1257 | LIBS += -lm |
| 1258 | endif |
| 1259 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1260 | ifdef CONFIG_NO_STDOUT_DEBUG |
| 1261 | CFLAGS += -DCONFIG_NO_STDOUT_DEBUG |
| 1262 | endif |
| 1263 | |
Paul Stewart | 092955c | 2017-02-06 09:13:09 -0800 | [diff] [blame] | 1264 | ifdef CONFIG_DEBUG_SYSLOG |
| 1265 | CFLAGS += -DCONFIG_DEBUG_SYSLOG |
| 1266 | endif |
| 1267 | |
Dmitry Shmidt | cce0666 | 2013-11-04 18:44:24 -0800 | [diff] [blame] | 1268 | ifdef CONFIG_DEBUG_LINUX_TRACING |
| 1269 | CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING |
| 1270 | endif |
| 1271 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1272 | ifdef CONFIG_DEBUG_FILE |
| 1273 | CFLAGS += -DCONFIG_DEBUG_FILE |
| 1274 | endif |
| 1275 | |
Dmitry Shmidt | 4530cfd | 2012-09-09 15:20:40 -0700 | [diff] [blame] | 1276 | ifdef CONFIG_SQLITE |
| 1277 | CFLAGS += -DCONFIG_SQLITE |
| 1278 | LIBS += -lsqlite3 |
| 1279 | LIBS_h += -lsqlite3 |
| 1280 | endif |
| 1281 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1282 | ifdef CONFIG_FST |
| 1283 | CFLAGS += -DCONFIG_FST |
| 1284 | OBJS += ../src/fst/fst.o |
| 1285 | OBJS += ../src/fst/fst_group.o |
| 1286 | OBJS += ../src/fst/fst_iface.o |
| 1287 | OBJS += ../src/fst/fst_session.o |
| 1288 | OBJS += ../src/fst/fst_ctrl_aux.o |
| 1289 | ifdef CONFIG_FST_TEST |
| 1290 | CFLAGS += -DCONFIG_FST_TEST |
| 1291 | endif |
| 1292 | ifndef CONFIG_NO_CTRL_IFACE |
| 1293 | OBJS += ../src/fst/fst_ctrl_iface.o |
| 1294 | endif |
| 1295 | endif |
| 1296 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1297 | ifdef CONFIG_WEP |
| 1298 | CFLAGS += -DCONFIG_WEP |
| 1299 | endif |
| 1300 | |
Hai Shalom | b755a2a | 2020-04-23 21:49:02 -0700 | [diff] [blame] | 1301 | ifdef CONFIG_NO_TKIP |
| 1302 | CFLAGS += -DCONFIG_NO_TKIP |
| 1303 | endif |
| 1304 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1305 | $(DESTDIR)$(BINDIR)/%: % |
| 1306 | install -D $(<) $(@) |
| 1307 | |
| 1308 | install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL)) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1309 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1310 | _OBJS_VAR := OBJS |
| 1311 | include ../src/objs.mk |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1312 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1313 | hostapd: $(OBJS) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1314 | $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS) |
| 1315 | @$(E) " LD " $@ |
| 1316 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1317 | ifdef CONFIG_WPA_TRACE |
| 1318 | OBJS_c += ../src/utils/trace.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1319 | endif |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1320 | |
| 1321 | _OBJS_VAR := OBJS_c |
| 1322 | include ../src/objs.mk |
| 1323 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1324 | hostapd_cli: $(OBJS_c) |
| 1325 | $(Q)$(CC) $(LDFLAGS) -o hostapd_cli $(OBJS_c) $(LIBS_c) |
| 1326 | @$(E) " LD " $@ |
| 1327 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1328 | NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS) |
Dmitry Shmidt | ff787d5 | 2015-01-12 13:01:47 -0800 | [diff] [blame] | 1329 | NOBJS += ../src/utils/common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1330 | ifdef NEED_RC4 |
| 1331 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1332 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1333 | NOBJS += ../src/crypto/rc4.o |
| 1334 | endif |
| 1335 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1336 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1337 | ifdef CONFIG_INTERNAL_MD5 |
| 1338 | NOBJS += ../src/crypto/md5-internal.o |
| 1339 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1340 | NOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
| 1341 | NOBJS += ../src/utils/os_$(CONFIG_OS).o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1342 | NOBJS += ../src/utils/wpa_debug.o |
| 1343 | NOBJS += ../src/utils/wpabuf.o |
| 1344 | ifdef CONFIG_WPA_TRACE |
| 1345 | NOBJS += ../src/utils/trace.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1346 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1347 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1348 | HOBJS += hlr_auc_gw.o ../src/utils/common.o ../src/utils/wpa_debug.o ../src/utils/os_$(CONFIG_OS).o ../src/utils/wpabuf.o ../src/crypto/milenage.o |
| 1349 | HOBJS += ../src/crypto/aes-encblock.o |
| 1350 | ifdef CONFIG_INTERNAL_AES |
| 1351 | HOBJS += ../src/crypto/aes-internal.o |
| 1352 | HOBJS += ../src/crypto/aes-internal-enc.o |
| 1353 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1354 | ifeq ($(CONFIG_TLS), linux) |
| 1355 | HOBJS += ../src/crypto/crypto_linux.o |
| 1356 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1357 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1358 | SOBJS += sae_pk_gen.o |
| 1359 | SOBJS += ../src/utils/common.o |
| 1360 | SOBJS += ../src/utils/os_$(CONFIG_OS).o |
| 1361 | SOBJS += ../src/utils/base64.o |
| 1362 | SOBJS += ../src/utils/wpa_debug.o |
| 1363 | SOBJS += ../src/utils/wpabuf.o |
| 1364 | ifdef CONFIG_WPA_TRACE |
| 1365 | SOBJS += ../src/utils/trace.o |
| 1366 | endif |
| 1367 | SOBJS += ../src/common/ieee802_11_common.o |
| 1368 | SOBJS += ../src/common/sae.o |
| 1369 | SOBJS += ../src/common/sae_pk.o |
| 1370 | SOBJS += ../src/common/dragonfly.o |
| 1371 | SOBJS += $(AESOBJS) |
| 1372 | SOBJS += ../src/crypto/sha256-prf.o |
| 1373 | SOBJS += ../src/crypto/sha384-prf.o |
| 1374 | SOBJS += ../src/crypto/sha512-prf.o |
| 1375 | SOBJS += ../src/crypto/dh_groups.o |
| 1376 | SOBJS += ../src/crypto/sha256-kdf.o |
| 1377 | SOBJS += ../src/crypto/sha384-kdf.o |
| 1378 | SOBJS += ../src/crypto/sha512-kdf.o |
| 1379 | |
| 1380 | _OBJS_VAR := NOBJS |
| 1381 | include ../src/objs.mk |
| 1382 | _OBJS_VAR := HOBJS |
| 1383 | include ../src/objs.mk |
| 1384 | _OBJS_VAR := SOBJS |
| 1385 | include ../src/objs.mk |
| 1386 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1387 | nt_password_hash: $(NOBJS) |
| 1388 | $(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n) |
| 1389 | @$(E) " LD " $@ |
| 1390 | |
| 1391 | hlr_auc_gw: $(HOBJS) |
| 1392 | $(Q)$(CC) $(LDFLAGS) -o hlr_auc_gw $(HOBJS) $(LIBS_h) |
| 1393 | @$(E) " LD " $@ |
| 1394 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1395 | sae_pk_gen: $(SOBJS) |
| 1396 | $(Q)$(CC) $(LDFLAGS) -o sae_pk_gen $(SOBJS) $(LIBS_s) |
| 1397 | @$(E) " LD " $@ |
| 1398 | |
| 1399 | .PHONY: lcov-html |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 1400 | lcov-html: |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1401 | lcov -c -d $(BUILDDIR) > lcov.info |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 1402 | genhtml lcov.info --output-directory lcov-html |
| 1403 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1404 | clean: common-clean |
| 1405 | rm -f core *~ nt_password_hash hlr_auc_gw |
| 1406 | rm -f sae_pk_gen |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 1407 | rm -f lcov.info |
| 1408 | rm -rf lcov-html |