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 |
Sunil Ravi | 876a49b | 2025-02-03 19:18:32 +0000 | [diff] [blame] | 119 | CFLAGS += -DPACKAGE="hostapd" -DWPA_TRACE_BFD -fno-inline -fno-optimize-sibling-calls |
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 |
Sunil Ravi | 79e6c4f | 2025-01-04 00:47:06 +0000 | [diff] [blame] | 302 | NEED_BASE64=y |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 303 | OBJS += ../src/common/sae_pk.o |
| 304 | endif |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 305 | NEED_ECC=y |
| 306 | NEED_DH_GROUPS=y |
Hai Shalom | b755a2a | 2020-04-23 21:49:02 -0700 | [diff] [blame] | 307 | NEED_HMAC_SHA256_KDF=y |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 308 | NEED_AP_MLME=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 309 | NEED_DRAGONFLY=y |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 310 | endif |
| 311 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 312 | ifdef CONFIG_OWE |
| 313 | CFLAGS += -DCONFIG_OWE |
| 314 | NEED_ECC=y |
| 315 | NEED_HMAC_SHA256_KDF=y |
| 316 | NEED_HMAC_SHA384_KDF=y |
| 317 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 318 | NEED_SHA384=y |
| 319 | NEED_SHA512=y |
| 320 | endif |
| 321 | |
Jimmy Chen | caaac07 | 2019-09-16 16:36:06 +0800 | [diff] [blame] | 322 | ifdef CONFIG_WAPI_INTERFACE |
| 323 | L_CFLAGS += -DCONFIG_WAPI_INTERFACE |
| 324 | endif |
| 325 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 326 | ifdef CONFIG_AIRTIME_POLICY |
| 327 | CFLAGS += -DCONFIG_AIRTIME_POLICY |
| 328 | OBJS += ../src/ap/airtime_policy.o |
| 329 | endif |
| 330 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 331 | ifdef CONFIG_FILS |
| 332 | CFLAGS += -DCONFIG_FILS |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 333 | OBJS += ../src/ap/fils_hlp.o |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 334 | NEED_SHA384=y |
| 335 | NEED_AES_SIV=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 336 | ifdef CONFIG_FILS_SK_PFS |
| 337 | CFLAGS += -DCONFIG_FILS_SK_PFS |
| 338 | NEED_ECC=y |
| 339 | endif |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 340 | endif |
| 341 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 342 | ifdef CONFIG_WNM |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 343 | CFLAGS += -DCONFIG_WNM -DCONFIG_WNM_AP |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 344 | OBJS += ../src/ap/wnm_ap.o |
| 345 | endif |
| 346 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 347 | ifdef CONFIG_IEEE80211AC |
| 348 | CFLAGS += -DCONFIG_IEEE80211AC |
| 349 | endif |
| 350 | |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 351 | ifdef CONFIG_IEEE80211BE |
| 352 | CONFIG_IEEE80211AX=y |
| 353 | CFLAGS += -DCONFIG_IEEE80211BE |
| 354 | OBJS += ../src/ap/ieee802_11_eht.o |
| 355 | endif |
| 356 | |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 357 | ifdef CONFIG_IEEE80211AX |
| 358 | CFLAGS += -DCONFIG_IEEE80211AX |
| 359 | OBJS += ../src/ap/ieee802_11_he.o |
| 360 | endif |
| 361 | |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 362 | ifdef CONFIG_MBO |
| 363 | CFLAGS += -DCONFIG_MBO |
| 364 | OBJS += ../src/ap/mbo_ap.o |
| 365 | endif |
| 366 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 367 | include ../src/drivers/drivers.mak |
| 368 | OBJS += $(DRV_AP_OBJS) |
| 369 | CFLAGS += $(DRV_AP_CFLAGS) |
| 370 | LDFLAGS += $(DRV_AP_LDFLAGS) |
| 371 | LIBS += $(DRV_AP_LIBS) |
| 372 | |
| 373 | ifdef CONFIG_L2_PACKET |
| 374 | ifdef CONFIG_DNET_PCAP |
| 375 | ifdef CONFIG_L2_FREEBSD |
| 376 | LIBS += -lpcap |
| 377 | OBJS += ../src/l2_packet/l2_packet_freebsd.o |
| 378 | else |
| 379 | LIBS += -ldnet -lpcap |
| 380 | OBJS += ../src/l2_packet/l2_packet_pcap.o |
| 381 | endif |
| 382 | else |
| 383 | OBJS += ../src/l2_packet/l2_packet_linux.o |
| 384 | endif |
| 385 | else |
| 386 | OBJS += ../src/l2_packet/l2_packet_none.o |
| 387 | endif |
| 388 | |
| 389 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 390 | ifdef CONFIG_ERP |
| 391 | CFLAGS += -DCONFIG_ERP |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 392 | NEED_HMAC_SHA256_KDF=y |
| 393 | endif |
| 394 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 395 | ifdef CONFIG_EAP_MD5 |
| 396 | CFLAGS += -DEAP_SERVER_MD5 |
| 397 | OBJS += ../src/eap_server/eap_server_md5.o |
| 398 | CHAP=y |
| 399 | endif |
| 400 | |
| 401 | ifdef CONFIG_EAP_TLS |
| 402 | CFLAGS += -DEAP_SERVER_TLS |
| 403 | OBJS += ../src/eap_server/eap_server_tls.o |
| 404 | TLS_FUNCS=y |
| 405 | endif |
| 406 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 407 | ifdef CONFIG_EAP_UNAUTH_TLS |
| 408 | CFLAGS += -DEAP_SERVER_UNAUTH_TLS |
| 409 | ifndef CONFIG_EAP_TLS |
| 410 | OBJS += ../src/eap_server/eap_server_tls.o |
| 411 | TLS_FUNCS=y |
| 412 | endif |
| 413 | endif |
| 414 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 415 | ifdef CONFIG_EAP_PEAP |
| 416 | CFLAGS += -DEAP_SERVER_PEAP |
| 417 | OBJS += ../src/eap_server/eap_server_peap.o |
| 418 | OBJS += ../src/eap_common/eap_peap_common.o |
| 419 | TLS_FUNCS=y |
| 420 | CONFIG_EAP_MSCHAPV2=y |
| 421 | endif |
| 422 | |
| 423 | ifdef CONFIG_EAP_TTLS |
| 424 | CFLAGS += -DEAP_SERVER_TTLS |
| 425 | OBJS += ../src/eap_server/eap_server_ttls.o |
| 426 | TLS_FUNCS=y |
| 427 | CHAP=y |
| 428 | endif |
| 429 | |
| 430 | ifdef CONFIG_EAP_MSCHAPV2 |
| 431 | CFLAGS += -DEAP_SERVER_MSCHAPV2 |
| 432 | OBJS += ../src/eap_server/eap_server_mschapv2.o |
| 433 | MS_FUNCS=y |
| 434 | endif |
| 435 | |
| 436 | ifdef CONFIG_EAP_GTC |
| 437 | CFLAGS += -DEAP_SERVER_GTC |
| 438 | OBJS += ../src/eap_server/eap_server_gtc.o |
| 439 | endif |
| 440 | |
| 441 | ifdef CONFIG_EAP_SIM |
| 442 | CFLAGS += -DEAP_SERVER_SIM |
| 443 | OBJS += ../src/eap_server/eap_server_sim.o |
| 444 | CONFIG_EAP_SIM_COMMON=y |
| 445 | NEED_AES_CBC=y |
| 446 | endif |
| 447 | |
| 448 | ifdef CONFIG_EAP_AKA |
| 449 | CFLAGS += -DEAP_SERVER_AKA |
| 450 | OBJS += ../src/eap_server/eap_server_aka.o |
| 451 | CONFIG_EAP_SIM_COMMON=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 452 | NEED_AES_CBC=y |
| 453 | endif |
| 454 | |
| 455 | ifdef CONFIG_EAP_AKA_PRIME |
| 456 | CFLAGS += -DEAP_SERVER_AKA_PRIME |
| 457 | endif |
| 458 | |
| 459 | ifdef CONFIG_EAP_SIM_COMMON |
| 460 | OBJS += ../src/eap_common/eap_sim_common.o |
| 461 | # Example EAP-SIM/AKA interface for GSM/UMTS authentication. This can be |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 462 | # replaced with another file implementing the interface specified in |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 463 | # eap_sim_db.h. |
| 464 | OBJS += ../src/eap_server/eap_sim_db.o |
| 465 | NEED_FIPS186_2_PRF=y |
| 466 | endif |
| 467 | |
| 468 | ifdef CONFIG_EAP_PAX |
| 469 | CFLAGS += -DEAP_SERVER_PAX |
| 470 | OBJS += ../src/eap_server/eap_server_pax.o ../src/eap_common/eap_pax_common.o |
| 471 | endif |
| 472 | |
| 473 | ifdef CONFIG_EAP_PSK |
| 474 | CFLAGS += -DEAP_SERVER_PSK |
| 475 | 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] | 476 | NEED_AES_ENCBLOCK=y |
| 477 | NEED_AES_EAX=y |
| 478 | endif |
| 479 | |
| 480 | ifdef CONFIG_EAP_SAKE |
| 481 | CFLAGS += -DEAP_SERVER_SAKE |
| 482 | OBJS += ../src/eap_server/eap_server_sake.o ../src/eap_common/eap_sake_common.o |
| 483 | endif |
| 484 | |
| 485 | ifdef CONFIG_EAP_GPSK |
| 486 | CFLAGS += -DEAP_SERVER_GPSK |
| 487 | OBJS += ../src/eap_server/eap_server_gpsk.o ../src/eap_common/eap_gpsk_common.o |
| 488 | ifdef CONFIG_EAP_GPSK_SHA256 |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 489 | CFLAGS += -DEAP_GPSK_SHA256 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 490 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 491 | endif |
| 492 | |
| 493 | ifdef CONFIG_EAP_PWD |
| 494 | CFLAGS += -DEAP_SERVER_PWD |
| 495 | 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] | 496 | NEED_ECC=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 497 | NEED_DRAGONFLY=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 498 | endif |
| 499 | |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 500 | ifdef CONFIG_EAP_EKE |
| 501 | CFLAGS += -DEAP_SERVER_EKE |
| 502 | OBJS += ../src/eap_server/eap_server_eke.o ../src/eap_common/eap_eke_common.o |
| 503 | NEED_DH_GROUPS=y |
| 504 | NEED_DH_GROUPS_ALL=y |
| 505 | endif |
| 506 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 507 | ifdef CONFIG_EAP_VENDOR_TEST |
| 508 | CFLAGS += -DEAP_SERVER_VENDOR_TEST |
| 509 | OBJS += ../src/eap_server/eap_server_vendor_test.o |
| 510 | endif |
| 511 | |
| 512 | ifdef CONFIG_EAP_FAST |
| 513 | CFLAGS += -DEAP_SERVER_FAST |
| 514 | OBJS += ../src/eap_server/eap_server_fast.o |
| 515 | OBJS += ../src/eap_common/eap_fast_common.o |
| 516 | TLS_FUNCS=y |
| 517 | NEED_T_PRF=y |
| 518 | NEED_AES_UNWRAP=y |
| 519 | endif |
| 520 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 521 | ifdef CONFIG_EAP_TEAP |
| 522 | CFLAGS += -DEAP_SERVER_TEAP |
| 523 | OBJS += ../src/eap_server/eap_server_teap.o |
| 524 | OBJS += ../src/eap_common/eap_teap_common.o |
| 525 | TLS_FUNCS=y |
| 526 | NEED_T_PRF=y |
| 527 | NEED_SHA384=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 528 | NEED_TLS_PRF_SHA256=y |
| 529 | NEED_TLS_PRF_SHA384=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 530 | NEED_AES_UNWRAP=y |
| 531 | endif |
| 532 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 533 | ifdef CONFIG_WPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 534 | CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC |
| 535 | OBJS += ../src/utils/uuid.o |
| 536 | OBJS += ../src/ap/wps_hostapd.o |
| 537 | OBJS += ../src/eap_server/eap_server_wsc.o ../src/eap_common/eap_wsc_common.o |
| 538 | OBJS += ../src/wps/wps.o |
| 539 | OBJS += ../src/wps/wps_common.o |
| 540 | OBJS += ../src/wps/wps_attr_parse.o |
| 541 | OBJS += ../src/wps/wps_attr_build.o |
| 542 | OBJS += ../src/wps/wps_attr_process.o |
| 543 | OBJS += ../src/wps/wps_dev_attr.o |
| 544 | OBJS += ../src/wps/wps_enrollee.o |
| 545 | OBJS += ../src/wps/wps_registrar.o |
| 546 | NEED_DH_GROUPS=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 547 | NEED_BASE64=y |
| 548 | NEED_AES_CBC=y |
| 549 | NEED_MODEXP=y |
| 550 | CONFIG_EAP=y |
| 551 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 552 | ifdef CONFIG_WPS_NFC |
| 553 | CFLAGS += -DCONFIG_WPS_NFC |
| 554 | OBJS += ../src/wps/ndef.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 555 | NEED_WPS_OOB=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 556 | endif |
| 557 | |
| 558 | ifdef NEED_WPS_OOB |
| 559 | CFLAGS += -DCONFIG_WPS_OOB |
| 560 | endif |
| 561 | |
| 562 | ifdef CONFIG_WPS_UPNP |
| 563 | CFLAGS += -DCONFIG_WPS_UPNP |
| 564 | OBJS += ../src/wps/wps_upnp.o |
| 565 | OBJS += ../src/wps/wps_upnp_ssdp.o |
| 566 | OBJS += ../src/wps/wps_upnp_web.o |
| 567 | OBJS += ../src/wps/wps_upnp_event.o |
| 568 | OBJS += ../src/wps/wps_upnp_ap.o |
| 569 | OBJS += ../src/wps/upnp_xml.o |
| 570 | OBJS += ../src/wps/httpread.o |
| 571 | OBJS += ../src/wps/http_client.o |
| 572 | OBJS += ../src/wps/http_server.o |
| 573 | endif |
| 574 | |
| 575 | ifdef CONFIG_WPS_STRICT |
| 576 | CFLAGS += -DCONFIG_WPS_STRICT |
| 577 | OBJS += ../src/wps/wps_validate.o |
| 578 | endif |
| 579 | |
| 580 | ifdef CONFIG_WPS_TESTING |
| 581 | CFLAGS += -DCONFIG_WPS_TESTING |
| 582 | endif |
| 583 | |
| 584 | endif |
| 585 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 586 | ifdef CONFIG_DPP |
| 587 | CFLAGS += -DCONFIG_DPP |
| 588 | OBJS += ../src/common/dpp.o |
Hai Shalom | 4fbc08f | 2020-05-18 12:37:00 -0700 | [diff] [blame] | 589 | OBJS += ../src/common/dpp_auth.o |
| 590 | OBJS += ../src/common/dpp_backup.o |
| 591 | OBJS += ../src/common/dpp_crypto.o |
| 592 | OBJS += ../src/common/dpp_pkex.o |
| 593 | OBJS += ../src/common/dpp_reconfig.o |
| 594 | OBJS += ../src/common/dpp_tcp.o |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 595 | OBJS += ../src/ap/dpp_hostapd.o |
| 596 | OBJS += ../src/ap/gas_query_ap.o |
| 597 | NEED_AES_SIV=y |
| 598 | NEED_HMAC_SHA256_KDF=y |
| 599 | NEED_HMAC_SHA384_KDF=y |
| 600 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 601 | NEED_SHA384=y |
| 602 | NEED_SHA512=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 603 | NEED_ECC=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 604 | NEED_JSON=y |
| 605 | NEED_GAS=y |
| 606 | NEED_BASE64=y |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 607 | NEED_ASN1=y |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 608 | ifdef CONFIG_DPP2 |
| 609 | CFLAGS += -DCONFIG_DPP2 |
| 610 | endif |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 611 | ifdef CONFIG_DPP3 |
| 612 | CFLAGS += -DCONFIG_DPP3 |
| 613 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 614 | endif |
| 615 | |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 616 | ifdef CONFIG_NAN_USD |
| 617 | OBJS += ../src/common/nan_de.o |
| 618 | OBJS += ../src/ap/nan_usd_ap.o |
| 619 | CFLAGS += -DCONFIG_NAN_USD |
| 620 | endif |
| 621 | |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame] | 622 | ifdef CONFIG_PASN |
| 623 | CFLAGS += -DCONFIG_PASN |
| 624 | CFLAGS += -DCONFIG_PTKSA_CACHE |
| 625 | NEED_HMAC_SHA256_KDF=y |
| 626 | NEED_HMAC_SHA384_KDF=y |
| 627 | NEED_SHA256=y |
| 628 | NEED_SHA384=y |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame] | 629 | endif |
| 630 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 631 | ifdef CONFIG_EAP_IKEV2 |
| 632 | CFLAGS += -DEAP_SERVER_IKEV2 |
| 633 | OBJS += ../src/eap_server/eap_server_ikev2.o ../src/eap_server/ikev2.o |
| 634 | OBJS += ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o |
| 635 | NEED_DH_GROUPS=y |
| 636 | NEED_DH_GROUPS_ALL=y |
| 637 | NEED_MODEXP=y |
| 638 | NEED_CIPHER=y |
| 639 | endif |
| 640 | |
| 641 | ifdef CONFIG_EAP_TNC |
| 642 | CFLAGS += -DEAP_SERVER_TNC |
| 643 | OBJS += ../src/eap_server/eap_server_tnc.o |
| 644 | OBJS += ../src/eap_server/tncs.o |
| 645 | NEED_BASE64=y |
| 646 | ifndef CONFIG_DRIVER_BSD |
| 647 | LIBS += -ldl |
| 648 | endif |
| 649 | endif |
| 650 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 651 | ifdef CONFIG_MACSEC |
| 652 | CFLAGS += -DCONFIG_MACSEC |
| 653 | OBJS += ../src/ap/wpa_auth_kay.o |
| 654 | OBJS += ../src/pae/ieee802_1x_cp.o |
| 655 | OBJS += ../src/pae/ieee802_1x_kay.o |
| 656 | OBJS += ../src/pae/ieee802_1x_key.o |
| 657 | OBJS += ../src/pae/ieee802_1x_secy_ops.o |
| 658 | endif |
| 659 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 660 | # Basic EAP functionality is needed for EAPOL |
| 661 | OBJS += eap_register.o |
| 662 | OBJS += ../src/eap_server/eap_server.o |
| 663 | OBJS += ../src/eap_common/eap_common.o |
| 664 | OBJS += ../src/eap_server/eap_server_methods.o |
| 665 | OBJS += ../src/eap_server/eap_server_identity.o |
| 666 | CFLAGS += -DEAP_SERVER_IDENTITY |
| 667 | |
| 668 | ifdef CONFIG_EAP |
| 669 | CFLAGS += -DEAP_SERVER |
| 670 | endif |
| 671 | |
| 672 | ifdef CONFIG_PKCS12 |
| 673 | CFLAGS += -DPKCS12_FUNCS |
| 674 | endif |
| 675 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 676 | ifdef NEED_DRAGONFLY |
| 677 | OBJS += ../src/common/dragonfly.o |
| 678 | endif |
| 679 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 680 | ifdef MS_FUNCS |
| 681 | OBJS += ../src/crypto/ms_funcs.o |
| 682 | NEED_DES=y |
| 683 | NEED_MD4=y |
| 684 | endif |
| 685 | |
| 686 | ifdef CHAP |
| 687 | OBJS += ../src/eap_common/chap.o |
| 688 | endif |
| 689 | |
Sunil Ravi | 99c035e | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 690 | ifdef CONFIG_RADIUS_TLS |
| 691 | TLS_FUNCS=y |
| 692 | CFLAGS += -DCONFIG_RADIUS_TLS |
| 693 | endif |
| 694 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 695 | ifdef TLS_FUNCS |
| 696 | NEED_DES=y |
| 697 | # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS) |
| 698 | CFLAGS += -DEAP_TLS_FUNCS |
| 699 | OBJS += ../src/eap_server/eap_server_tls_common.o |
| 700 | NEED_TLS_PRF=y |
| 701 | endif |
| 702 | |
| 703 | ifndef CONFIG_TLS |
| 704 | CONFIG_TLS=openssl |
| 705 | endif |
| 706 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 707 | ifdef CONFIG_TLSV11 |
| 708 | CFLAGS += -DCONFIG_TLSV11 |
| 709 | endif |
| 710 | |
| 711 | ifdef CONFIG_TLSV12 |
| 712 | CFLAGS += -DCONFIG_TLSV12 |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 713 | endif |
| 714 | |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 715 | ifeq ($(CONFIG_TLS), wolfssl) |
Sunil Ravi | 876a49b | 2025-02-03 19:18:32 +0000 | [diff] [blame] | 716 | CFLAGS += -DCRYPTO_RSA_OAEP_SHA256 |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 717 | CONFIG_CRYPTO=wolfssl |
| 718 | ifdef TLS_FUNCS |
| 719 | OBJS += ../src/crypto/tls_wolfssl.o |
| 720 | LIBS += -lwolfssl -lm |
| 721 | endif |
| 722 | OBJS += ../src/crypto/crypto_wolfssl.o |
| 723 | HOBJS += ../src/crypto/crypto_wolfssl.o |
| 724 | ifdef NEED_FIPS186_2_PRF |
| 725 | OBJS += ../src/crypto/fips_prf_wolfssl.o |
| 726 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 727 | NEED_TLS_PRF_SHA256=y |
| 728 | LIBS += -lwolfssl -lm |
| 729 | LIBS_h += -lwolfssl -lm |
| 730 | ifdef CONFIG_TLS_ADD_DL |
| 731 | LIBS += -ldl |
| 732 | LIBS_h += -ldl |
| 733 | endif |
| 734 | endif |
| 735 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 736 | ifeq ($(CONFIG_TLS), openssl) |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 737 | CFLAGS += -DCRYPTO_RSA_OAEP_SHA256 |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 738 | CONFIG_CRYPTO=openssl |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 739 | ifdef TLS_FUNCS |
| 740 | OBJS += ../src/crypto/tls_openssl.o |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 741 | OBJS += ../src/crypto/tls_openssl_ocsp.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 742 | LIBS += -lssl |
| 743 | endif |
| 744 | OBJS += ../src/crypto/crypto_openssl.o |
| 745 | HOBJS += ../src/crypto/crypto_openssl.o |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 746 | SOBJS += ../src/crypto/crypto_openssl.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 747 | ifdef NEED_FIPS186_2_PRF |
| 748 | OBJS += ../src/crypto/fips_prf_openssl.o |
| 749 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 750 | NEED_TLS_PRF_SHA256=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 751 | LIBS += -lcrypto |
| 752 | LIBS_h += -lcrypto |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 753 | LIBS_n += -lcrypto |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 754 | LIBS_s += -lcrypto |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 755 | ifdef CONFIG_TLS_ADD_DL |
| 756 | LIBS += -ldl |
| 757 | LIBS_h += -ldl |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 758 | LIBS_s += -ldl |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 759 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 760 | ifndef CONFIG_TLS_DEFAULT_CIPHERS |
| 761 | CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW" |
| 762 | endif |
| 763 | CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 764 | endif |
| 765 | |
| 766 | ifeq ($(CONFIG_TLS), gnutls) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 767 | ifndef CONFIG_CRYPTO |
| 768 | # default to libgcrypt |
| 769 | CONFIG_CRYPTO=gnutls |
| 770 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 771 | ifdef TLS_FUNCS |
| 772 | OBJS += ../src/crypto/tls_gnutls.o |
| 773 | LIBS += -lgnutls -lgpg-error |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 774 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 775 | OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
| 776 | HOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 777 | ifdef NEED_FIPS186_2_PRF |
Dmitry Shmidt | 9866086 | 2014-03-11 17:26:21 -0700 | [diff] [blame] | 778 | OBJS += ../src/crypto/fips_prf_internal.o |
| 779 | SHA1OBJS += ../src/crypto/sha1-internal.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 780 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 781 | ifeq ($(CONFIG_CRYPTO), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 782 | LIBS += -lgcrypt |
| 783 | LIBS_h += -lgcrypt |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 784 | LIBS_n += -lgcrypt |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 785 | CONFIG_INTERNAL_RC4=y |
| 786 | CONFIG_INTERNAL_DH_GROUP5=y |
| 787 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 788 | ifeq ($(CONFIG_CRYPTO), nettle) |
| 789 | LIBS += -lnettle -lgmp |
| 790 | LIBS_p += -lnettle -lgmp |
| 791 | CONFIG_INTERNAL_RC4=y |
| 792 | CONFIG_INTERNAL_DH_GROUP5=y |
| 793 | endif |
| 794 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 795 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 796 | ifeq ($(CONFIG_TLS), internal) |
| 797 | ifndef CONFIG_CRYPTO |
| 798 | CONFIG_CRYPTO=internal |
| 799 | endif |
| 800 | ifdef TLS_FUNCS |
| 801 | OBJS += ../src/crypto/crypto_internal-rsa.o |
| 802 | OBJS += ../src/crypto/tls_internal.o |
| 803 | OBJS += ../src/tls/tlsv1_common.o |
| 804 | OBJS += ../src/tls/tlsv1_record.o |
| 805 | OBJS += ../src/tls/tlsv1_cred.o |
| 806 | OBJS += ../src/tls/tlsv1_server.o |
| 807 | OBJS += ../src/tls/tlsv1_server_write.o |
| 808 | OBJS += ../src/tls/tlsv1_server_read.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 809 | OBJS += ../src/tls/rsa.o |
| 810 | OBJS += ../src/tls/x509v3.o |
| 811 | OBJS += ../src/tls/pkcs1.o |
| 812 | OBJS += ../src/tls/pkcs5.o |
| 813 | OBJS += ../src/tls/pkcs8.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 814 | NEED_ASN1=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 815 | NEED_BASE64=y |
| 816 | NEED_TLS_PRF=y |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 817 | ifdef CONFIG_TLSV12 |
| 818 | NEED_TLS_PRF_SHA256=y |
| 819 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 820 | NEED_MODEXP=y |
| 821 | NEED_CIPHER=y |
| 822 | CFLAGS += -DCONFIG_TLS_INTERNAL |
| 823 | CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER |
| 824 | endif |
| 825 | ifdef NEED_CIPHER |
| 826 | NEED_DES=y |
| 827 | OBJS += ../src/crypto/crypto_internal-cipher.o |
| 828 | endif |
| 829 | ifdef NEED_MODEXP |
| 830 | OBJS += ../src/crypto/crypto_internal-modexp.o |
| 831 | OBJS += ../src/tls/bignum.o |
| 832 | endif |
| 833 | ifeq ($(CONFIG_CRYPTO), libtomcrypt) |
| 834 | OBJS += ../src/crypto/crypto_libtomcrypt.o |
| 835 | LIBS += -ltomcrypt -ltfm |
| 836 | LIBS_h += -ltomcrypt -ltfm |
| 837 | CONFIG_INTERNAL_SHA256=y |
| 838 | CONFIG_INTERNAL_RC4=y |
| 839 | CONFIG_INTERNAL_DH_GROUP5=y |
| 840 | endif |
| 841 | ifeq ($(CONFIG_CRYPTO), internal) |
| 842 | OBJS += ../src/crypto/crypto_internal.o |
| 843 | NEED_AES_DEC=y |
| 844 | CFLAGS += -DCONFIG_CRYPTO_INTERNAL |
| 845 | ifdef CONFIG_INTERNAL_LIBTOMMATH |
| 846 | CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 847 | ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST |
| 848 | CFLAGS += -DLTM_FAST |
| 849 | endif |
| 850 | else |
| 851 | LIBS += -ltommath |
| 852 | LIBS_h += -ltommath |
| 853 | endif |
| 854 | CONFIG_INTERNAL_AES=y |
| 855 | CONFIG_INTERNAL_DES=y |
| 856 | CONFIG_INTERNAL_SHA1=y |
| 857 | CONFIG_INTERNAL_MD4=y |
| 858 | CONFIG_INTERNAL_MD5=y |
| 859 | CONFIG_INTERNAL_SHA256=y |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 860 | CONFIG_INTERNAL_SHA384=y |
| 861 | CONFIG_INTERNAL_SHA512=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 862 | CONFIG_INTERNAL_RC4=y |
| 863 | CONFIG_INTERNAL_DH_GROUP5=y |
| 864 | endif |
| 865 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 866 | OBJS += ../src/crypto/crypto_cryptoapi.o |
| 867 | OBJS_p += ../src/crypto/crypto_cryptoapi.o |
| 868 | CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI |
| 869 | CONFIG_INTERNAL_SHA256=y |
| 870 | CONFIG_INTERNAL_RC4=y |
| 871 | endif |
| 872 | endif |
| 873 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 874 | ifeq ($(CONFIG_TLS), linux) |
| 875 | OBJS += ../src/crypto/crypto_linux.o |
| 876 | ifdef TLS_FUNCS |
| 877 | OBJS += ../src/crypto/crypto_internal-rsa.o |
| 878 | OBJS += ../src/crypto/tls_internal.o |
| 879 | OBJS += ../src/tls/tlsv1_common.o |
| 880 | OBJS += ../src/tls/tlsv1_record.o |
| 881 | OBJS += ../src/tls/tlsv1_cred.o |
| 882 | OBJS += ../src/tls/tlsv1_server.o |
| 883 | OBJS += ../src/tls/tlsv1_server_write.o |
| 884 | OBJS += ../src/tls/tlsv1_server_read.o |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 885 | OBJS += ../src/tls/rsa.o |
| 886 | OBJS += ../src/tls/x509v3.o |
| 887 | OBJS += ../src/tls/pkcs1.o |
| 888 | OBJS += ../src/tls/pkcs5.o |
| 889 | OBJS += ../src/tls/pkcs8.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 890 | NEED_ASN1=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 891 | NEED_BASE64=y |
| 892 | NEED_TLS_PRF=y |
| 893 | ifdef CONFIG_TLSV12 |
| 894 | NEED_TLS_PRF_SHA256=y |
| 895 | endif |
| 896 | NEED_MODEXP=y |
| 897 | NEED_CIPHER=y |
| 898 | CFLAGS += -DCONFIG_TLS_INTERNAL |
| 899 | CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER |
| 900 | endif |
| 901 | ifdef NEED_MODEXP |
| 902 | OBJS += ../src/crypto/crypto_internal-modexp.o |
| 903 | OBJS += ../src/tls/bignum.o |
| 904 | CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 905 | CFLAGS += -DLTM_FAST |
| 906 | endif |
| 907 | CONFIG_INTERNAL_DH_GROUP5=y |
| 908 | ifdef NEED_FIPS186_2_PRF |
| 909 | OBJS += ../src/crypto/fips_prf_internal.o |
| 910 | OBJS += ../src/crypto/sha1-internal.o |
| 911 | endif |
| 912 | endif |
| 913 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 914 | ifeq ($(CONFIG_TLS), none) |
| 915 | ifdef TLS_FUNCS |
| 916 | OBJS += ../src/crypto/tls_none.o |
| 917 | CFLAGS += -DEAP_TLS_NONE |
| 918 | CONFIG_INTERNAL_AES=y |
| 919 | CONFIG_INTERNAL_SHA1=y |
| 920 | CONFIG_INTERNAL_MD5=y |
| 921 | endif |
| 922 | OBJS += ../src/crypto/crypto_none.o |
| 923 | OBJS_p += ../src/crypto/crypto_none.o |
| 924 | CONFIG_INTERNAL_SHA256=y |
| 925 | CONFIG_INTERNAL_RC4=y |
| 926 | endif |
| 927 | |
| 928 | ifndef TLS_FUNCS |
| 929 | OBJS += ../src/crypto/tls_none.o |
| 930 | ifeq ($(CONFIG_TLS), internal) |
| 931 | CONFIG_INTERNAL_AES=y |
| 932 | CONFIG_INTERNAL_SHA1=y |
| 933 | CONFIG_INTERNAL_MD5=y |
| 934 | CONFIG_INTERNAL_RC4=y |
| 935 | endif |
| 936 | endif |
| 937 | |
| 938 | AESOBJS = # none so far |
| 939 | ifdef CONFIG_INTERNAL_AES |
| 940 | AESOBJS += ../src/crypto/aes-internal.o ../src/crypto/aes-internal-enc.o |
| 941 | endif |
| 942 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 943 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 944 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 945 | AESOBJS += ../src/crypto/aes-wrap.o |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 946 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 947 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 948 | ifdef NEED_AES_EAX |
| 949 | AESOBJS += ../src/crypto/aes-eax.o |
| 950 | NEED_AES_CTR=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 951 | endif |
| 952 | ifdef NEED_AES_SIV |
| 953 | AESOBJS += ../src/crypto/aes-siv.o |
| 954 | NEED_AES_CTR=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 955 | endif |
| 956 | ifdef NEED_AES_CTR |
| 957 | AESOBJS += ../src/crypto/aes-ctr.o |
| 958 | endif |
| 959 | ifdef NEED_AES_ENCBLOCK |
| 960 | AESOBJS += ../src/crypto/aes-encblock.o |
| 961 | endif |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 962 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 963 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 964 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 965 | AESOBJS += ../src/crypto/aes-omac1.o |
| 966 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 967 | endif |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 968 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 969 | ifdef NEED_AES_UNWRAP |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 970 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 971 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 972 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 973 | NEED_AES_DEC=y |
| 974 | AESOBJS += ../src/crypto/aes-unwrap.o |
| 975 | endif |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 976 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 977 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 978 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 979 | ifdef NEED_AES_CBC |
| 980 | NEED_AES_DEC=y |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 981 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 982 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 983 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 984 | AESOBJS += ../src/crypto/aes-cbc.o |
| 985 | endif |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 986 | endif |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 987 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 988 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 989 | ifdef NEED_AES_DEC |
| 990 | ifdef CONFIG_INTERNAL_AES |
| 991 | AESOBJS += ../src/crypto/aes-internal-dec.o |
| 992 | endif |
| 993 | endif |
| 994 | ifdef NEED_AES |
| 995 | OBJS += $(AESOBJS) |
| 996 | endif |
| 997 | |
| 998 | ifdef NEED_SHA1 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 999 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1000 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1001 | ifneq ($(CONFIG_TLS), gnutls) |
| 1002 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1003 | SHA1OBJS += ../src/crypto/sha1.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1004 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1005 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1006 | endif |
| 1007 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1008 | SHA1OBJS += ../src/crypto/sha1-prf.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1009 | ifdef CONFIG_INTERNAL_SHA1 |
| 1010 | SHA1OBJS += ../src/crypto/sha1-internal.o |
| 1011 | ifdef NEED_FIPS186_2_PRF |
| 1012 | SHA1OBJS += ../src/crypto/fips_prf_internal.o |
| 1013 | endif |
| 1014 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1015 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1016 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1017 | SHA1OBJS += ../src/crypto/sha1-pbkdf2.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1018 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1019 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1020 | ifdef NEED_T_PRF |
| 1021 | SHA1OBJS += ../src/crypto/sha1-tprf.o |
| 1022 | endif |
| 1023 | ifdef NEED_TLS_PRF |
| 1024 | SHA1OBJS += ../src/crypto/sha1-tlsprf.o |
| 1025 | endif |
| 1026 | endif |
| 1027 | |
| 1028 | ifdef NEED_SHA1 |
| 1029 | OBJS += $(SHA1OBJS) |
| 1030 | endif |
| 1031 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1032 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1033 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1034 | ifneq ($(CONFIG_TLS), gnutls) |
| 1035 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1036 | OBJS += ../src/crypto/md5.o |
| 1037 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1038 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1039 | endif |
| 1040 | endif |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1041 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1042 | ifdef NEED_MD5 |
| 1043 | ifdef CONFIG_INTERNAL_MD5 |
| 1044 | OBJS += ../src/crypto/md5-internal.o |
| 1045 | HOBJS += ../src/crypto/md5-internal.o |
| 1046 | endif |
| 1047 | endif |
| 1048 | |
| 1049 | ifdef NEED_MD4 |
| 1050 | ifdef CONFIG_INTERNAL_MD4 |
| 1051 | OBJS += ../src/crypto/md4-internal.o |
| 1052 | endif |
| 1053 | endif |
| 1054 | |
| 1055 | ifdef NEED_DES |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1056 | CFLAGS += -DCONFIG_DES |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1057 | ifdef CONFIG_INTERNAL_DES |
| 1058 | OBJS += ../src/crypto/des-internal.o |
| 1059 | endif |
| 1060 | endif |
| 1061 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1062 | ifdef CONFIG_NO_RC4 |
| 1063 | CFLAGS += -DCONFIG_NO_RC4 |
| 1064 | endif |
| 1065 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1066 | ifdef NEED_RC4 |
| 1067 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1068 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1069 | OBJS += ../src/crypto/rc4.o |
| 1070 | endif |
| 1071 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1072 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1073 | |
Sunil Ravi | 79e6c4f | 2025-01-04 00:47:06 +0000 | [diff] [blame] | 1074 | ifdef CONFIG_SAE |
| 1075 | ifdef NEED_SHA384 |
| 1076 | # Need to add HMAC-SHA384 KDF as well, if SHA384 was enabled. |
| 1077 | NEED_HMAC_SHA384_KDF=y |
| 1078 | endif |
| 1079 | ifdef NEED_SHA512 |
| 1080 | # Need to add HMAC-SHA512 KDF as well, if SHA512 was enabled. |
| 1081 | NEED_HMAC_SHA512_KDF=y |
| 1082 | endif |
| 1083 | endif |
| 1084 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1085 | CFLAGS += -DCONFIG_SHA256 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1086 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1087 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1088 | ifneq ($(CONFIG_TLS), gnutls) |
| 1089 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1090 | OBJS += ../src/crypto/sha256.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1091 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1092 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1093 | endif |
| 1094 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1095 | OBJS += ../src/crypto/sha256-prf.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1096 | ifdef CONFIG_INTERNAL_SHA256 |
| 1097 | OBJS += ../src/crypto/sha256-internal.o |
| 1098 | endif |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1099 | ifdef NEED_TLS_PRF_SHA256 |
| 1100 | OBJS += ../src/crypto/sha256-tlsprf.o |
| 1101 | endif |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 1102 | ifdef NEED_TLS_PRF_SHA384 |
| 1103 | OBJS += ../src/crypto/sha384-tlsprf.o |
| 1104 | endif |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1105 | ifdef NEED_HMAC_SHA256_KDF |
| 1106 | OBJS += ../src/crypto/sha256-kdf.o |
| 1107 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1108 | ifdef NEED_HMAC_SHA384_KDF |
| 1109 | OBJS += ../src/crypto/sha384-kdf.o |
| 1110 | endif |
| 1111 | ifdef NEED_HMAC_SHA512_KDF |
| 1112 | OBJS += ../src/crypto/sha512-kdf.o |
| 1113 | endif |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1114 | ifdef NEED_SHA384 |
| 1115 | CFLAGS += -DCONFIG_SHA384 |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1116 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 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 | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1120 | OBJS += ../src/crypto/sha384.o |
| 1121 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1122 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1123 | endif |
| 1124 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1125 | OBJS += ../src/crypto/sha384-prf.o |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1126 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1127 | ifdef NEED_SHA512 |
| 1128 | CFLAGS += -DCONFIG_SHA512 |
| 1129 | ifneq ($(CONFIG_TLS), openssl) |
| 1130 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1131 | ifneq ($(CONFIG_TLS), gnutls) |
| 1132 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1133 | OBJS += ../src/crypto/sha512.o |
| 1134 | endif |
| 1135 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1136 | endif |
| 1137 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1138 | OBJS += ../src/crypto/sha512-prf.o |
| 1139 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1140 | |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1141 | ifdef CONFIG_INTERNAL_SHA384 |
| 1142 | CFLAGS += -DCONFIG_INTERNAL_SHA384 |
| 1143 | OBJS += ../src/crypto/sha384-internal.o |
| 1144 | endif |
| 1145 | |
| 1146 | ifdef CONFIG_INTERNAL_SHA512 |
| 1147 | CFLAGS += -DCONFIG_INTERNAL_SHA512 |
| 1148 | OBJS += ../src/crypto/sha512-internal.o |
| 1149 | endif |
| 1150 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1151 | ifdef NEED_ASN1 |
| 1152 | OBJS += ../src/tls/asn1.o |
| 1153 | endif |
| 1154 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1155 | ifdef NEED_DH_GROUPS |
| 1156 | OBJS += ../src/crypto/dh_groups.o |
| 1157 | endif |
| 1158 | ifdef NEED_DH_GROUPS_ALL |
| 1159 | CFLAGS += -DALL_DH_GROUPS |
| 1160 | endif |
| 1161 | ifdef CONFIG_INTERNAL_DH_GROUP5 |
| 1162 | ifdef NEED_DH_GROUPS |
| 1163 | OBJS += ../src/crypto/dh_group5.o |
| 1164 | endif |
| 1165 | endif |
| 1166 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1167 | ifdef NEED_ECC |
| 1168 | CFLAGS += -DCONFIG_ECC |
| 1169 | endif |
| 1170 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1171 | ifdef CONFIG_NO_RANDOM_POOL |
| 1172 | CFLAGS += -DCONFIG_NO_RANDOM_POOL |
| 1173 | else |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 1174 | ifdef CONFIG_GETRANDOM |
| 1175 | CFLAGS += -DCONFIG_GETRANDOM |
| 1176 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1177 | OBJS += ../src/crypto/random.o |
| 1178 | HOBJS += ../src/crypto/random.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1179 | HOBJS += ../src/utils/eloop.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1180 | HOBJS += $(SHA1OBJS) |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 1181 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1182 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1183 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1184 | HOBJS += ../src/crypto/md5.o |
| 1185 | endif |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 1186 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1187 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1188 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1189 | |
| 1190 | ifdef CONFIG_RADIUS_SERVER |
| 1191 | CFLAGS += -DRADIUS_SERVER |
| 1192 | OBJS += ../src/radius/radius_server.o |
| 1193 | endif |
| 1194 | |
| 1195 | ifdef CONFIG_IPV6 |
| 1196 | CFLAGS += -DCONFIG_IPV6 |
| 1197 | endif |
| 1198 | |
| 1199 | ifdef CONFIG_DRIVER_RADIUS_ACL |
| 1200 | CFLAGS += -DCONFIG_DRIVER_RADIUS_ACL |
| 1201 | endif |
| 1202 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1203 | ifdef NEED_BASE64 |
| 1204 | OBJS += ../src/utils/base64.o |
| 1205 | endif |
| 1206 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1207 | ifdef NEED_JSON |
| 1208 | OBJS += ../src/utils/json.o |
| 1209 | CFLAGS += -DCONFIG_JSON |
| 1210 | endif |
| 1211 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1212 | ifdef NEED_AP_MLME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1213 | OBJS += ../src/ap/wmm.o |
| 1214 | OBJS += ../src/ap/ap_list.o |
Sunil Ravi | 38ad1ed | 2023-01-17 23:58:31 +0000 | [diff] [blame] | 1215 | OBJS += ../src/ap/comeback_token.o |
| 1216 | OBJS += ../src/pasn/pasn_responder.o |
Sunil Ravi | 99c035e | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 1217 | OBJS += ../src/pasn/pasn_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1218 | OBJS += ../src/ap/ieee802_11.o |
| 1219 | OBJS += ../src/ap/hw_features.o |
Dmitry Shmidt | 051af73 | 2013-10-22 13:52:46 -0700 | [diff] [blame] | 1220 | OBJS += ../src/ap/dfs.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1221 | CFLAGS += -DNEED_AP_MLME |
| 1222 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1223 | OBJS += ../src/ap/ieee802_11_ht.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1224 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1225 | ifdef CONFIG_IEEE80211AC |
| 1226 | OBJS += ../src/ap/ieee802_11_vht.o |
| 1227 | endif |
| 1228 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1229 | ifdef CONFIG_P2P_MANAGER |
| 1230 | CFLAGS += -DCONFIG_P2P_MANAGER |
| 1231 | OBJS += ../src/ap/p2p_hostapd.o |
| 1232 | endif |
| 1233 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1234 | ifdef CONFIG_HS20 |
| 1235 | CFLAGS += -DCONFIG_HS20 |
| 1236 | OBJS += ../src/ap/hs20.o |
| 1237 | CONFIG_INTERWORKING=y |
| 1238 | endif |
| 1239 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1240 | ifdef CONFIG_INTERWORKING |
| 1241 | CFLAGS += -DCONFIG_INTERWORKING |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1242 | NEED_GAS=y |
| 1243 | endif |
| 1244 | |
| 1245 | ifdef NEED_GAS |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1246 | OBJS += ../src/common/gas.o |
| 1247 | OBJS += ../src/ap/gas_serv.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1248 | endif |
| 1249 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1250 | ifdef CONFIG_PROXYARP |
| 1251 | CFLAGS += -DCONFIG_PROXYARP |
| 1252 | OBJS += ../src/ap/x_snoop.o |
| 1253 | OBJS += ../src/ap/dhcp_snoop.o |
| 1254 | ifdef CONFIG_IPV6 |
| 1255 | OBJS += ../src/ap/ndisc_snoop.o |
| 1256 | endif |
| 1257 | endif |
| 1258 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1259 | OBJS += ../src/drivers/driver_common.o |
| 1260 | |
| 1261 | ifdef CONFIG_WPA_CLI_EDIT |
| 1262 | OBJS_c += ../src/utils/edit.o |
| 1263 | else |
| 1264 | OBJS_c += ../src/utils/edit_simple.o |
| 1265 | endif |
| 1266 | |
Dmitry Shmidt | 391c59f | 2013-09-03 12:16:28 -0700 | [diff] [blame] | 1267 | ifdef CONFIG_ACS |
| 1268 | CFLAGS += -DCONFIG_ACS |
| 1269 | OBJS += ../src/ap/acs.o |
| 1270 | LIBS += -lm |
| 1271 | endif |
| 1272 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1273 | ifdef CONFIG_NO_STDOUT_DEBUG |
| 1274 | CFLAGS += -DCONFIG_NO_STDOUT_DEBUG |
| 1275 | endif |
| 1276 | |
Paul Stewart | 092955c | 2017-02-06 09:13:09 -0800 | [diff] [blame] | 1277 | ifdef CONFIG_DEBUG_SYSLOG |
| 1278 | CFLAGS += -DCONFIG_DEBUG_SYSLOG |
| 1279 | endif |
| 1280 | |
Dmitry Shmidt | cce0666 | 2013-11-04 18:44:24 -0800 | [diff] [blame] | 1281 | ifdef CONFIG_DEBUG_LINUX_TRACING |
| 1282 | CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING |
| 1283 | endif |
| 1284 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1285 | ifdef CONFIG_DEBUG_FILE |
| 1286 | CFLAGS += -DCONFIG_DEBUG_FILE |
| 1287 | endif |
| 1288 | |
Dmitry Shmidt | 4530cfd | 2012-09-09 15:20:40 -0700 | [diff] [blame] | 1289 | ifdef CONFIG_SQLITE |
| 1290 | CFLAGS += -DCONFIG_SQLITE |
| 1291 | LIBS += -lsqlite3 |
| 1292 | LIBS_h += -lsqlite3 |
| 1293 | endif |
| 1294 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1295 | ifdef CONFIG_FST |
| 1296 | CFLAGS += -DCONFIG_FST |
| 1297 | OBJS += ../src/fst/fst.o |
| 1298 | OBJS += ../src/fst/fst_group.o |
| 1299 | OBJS += ../src/fst/fst_iface.o |
| 1300 | OBJS += ../src/fst/fst_session.o |
| 1301 | OBJS += ../src/fst/fst_ctrl_aux.o |
| 1302 | ifdef CONFIG_FST_TEST |
| 1303 | CFLAGS += -DCONFIG_FST_TEST |
| 1304 | endif |
| 1305 | ifndef CONFIG_NO_CTRL_IFACE |
| 1306 | OBJS += ../src/fst/fst_ctrl_iface.o |
| 1307 | endif |
| 1308 | endif |
| 1309 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1310 | ifdef CONFIG_WEP |
| 1311 | CFLAGS += -DCONFIG_WEP |
| 1312 | endif |
| 1313 | |
Hai Shalom | b755a2a | 2020-04-23 21:49:02 -0700 | [diff] [blame] | 1314 | ifdef CONFIG_NO_TKIP |
| 1315 | CFLAGS += -DCONFIG_NO_TKIP |
| 1316 | endif |
| 1317 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1318 | $(DESTDIR)$(BINDIR)/%: % |
| 1319 | install -D $(<) $(@) |
| 1320 | |
| 1321 | install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL)) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1322 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1323 | _OBJS_VAR := OBJS |
| 1324 | include ../src/objs.mk |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1325 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1326 | hostapd: $(OBJS) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1327 | $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS) |
| 1328 | @$(E) " LD " $@ |
| 1329 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1330 | ifdef CONFIG_WPA_TRACE |
| 1331 | OBJS_c += ../src/utils/trace.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1332 | endif |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1333 | |
| 1334 | _OBJS_VAR := OBJS_c |
| 1335 | include ../src/objs.mk |
| 1336 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1337 | hostapd_cli: $(OBJS_c) |
| 1338 | $(Q)$(CC) $(LDFLAGS) -o hostapd_cli $(OBJS_c) $(LIBS_c) |
| 1339 | @$(E) " LD " $@ |
| 1340 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1341 | NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS) |
Dmitry Shmidt | ff787d5 | 2015-01-12 13:01:47 -0800 | [diff] [blame] | 1342 | NOBJS += ../src/utils/common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1343 | ifdef NEED_RC4 |
| 1344 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1345 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1346 | NOBJS += ../src/crypto/rc4.o |
| 1347 | endif |
| 1348 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1349 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1350 | ifdef CONFIG_INTERNAL_MD5 |
| 1351 | NOBJS += ../src/crypto/md5-internal.o |
| 1352 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1353 | NOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
| 1354 | NOBJS += ../src/utils/os_$(CONFIG_OS).o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1355 | NOBJS += ../src/utils/wpa_debug.o |
| 1356 | NOBJS += ../src/utils/wpabuf.o |
| 1357 | ifdef CONFIG_WPA_TRACE |
| 1358 | NOBJS += ../src/utils/trace.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1359 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1360 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1361 | 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 |
| 1362 | HOBJS += ../src/crypto/aes-encblock.o |
| 1363 | ifdef CONFIG_INTERNAL_AES |
| 1364 | HOBJS += ../src/crypto/aes-internal.o |
| 1365 | HOBJS += ../src/crypto/aes-internal-enc.o |
| 1366 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1367 | ifeq ($(CONFIG_TLS), linux) |
| 1368 | HOBJS += ../src/crypto/crypto_linux.o |
| 1369 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1370 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1371 | SOBJS += sae_pk_gen.o |
| 1372 | SOBJS += ../src/utils/common.o |
| 1373 | SOBJS += ../src/utils/os_$(CONFIG_OS).o |
| 1374 | SOBJS += ../src/utils/base64.o |
| 1375 | SOBJS += ../src/utils/wpa_debug.o |
| 1376 | SOBJS += ../src/utils/wpabuf.o |
| 1377 | ifdef CONFIG_WPA_TRACE |
| 1378 | SOBJS += ../src/utils/trace.o |
| 1379 | endif |
| 1380 | SOBJS += ../src/common/ieee802_11_common.o |
| 1381 | SOBJS += ../src/common/sae.o |
| 1382 | SOBJS += ../src/common/sae_pk.o |
| 1383 | SOBJS += ../src/common/dragonfly.o |
| 1384 | SOBJS += $(AESOBJS) |
Sunil Ravi | 79e6c4f | 2025-01-04 00:47:06 +0000 | [diff] [blame] | 1385 | SOBJS += ../src/crypto/sha384.o |
| 1386 | SOBJS += ../src/crypto/sha512.o |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1387 | SOBJS += ../src/crypto/sha256-prf.o |
| 1388 | SOBJS += ../src/crypto/sha384-prf.o |
| 1389 | SOBJS += ../src/crypto/sha512-prf.o |
| 1390 | SOBJS += ../src/crypto/dh_groups.o |
| 1391 | SOBJS += ../src/crypto/sha256-kdf.o |
| 1392 | SOBJS += ../src/crypto/sha384-kdf.o |
| 1393 | SOBJS += ../src/crypto/sha512-kdf.o |
Sunil Ravi | 79e6c4f | 2025-01-04 00:47:06 +0000 | [diff] [blame] | 1394 | SOBJS += ../src/common/wpa_common.o |
| 1395 | SOBJS += ../src/crypto/random.o |
| 1396 | SOBJS += ../src/crypto/sha1-prf.o |
| 1397 | SOBJS += ../src/utils/eloop.o |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1398 | |
| 1399 | _OBJS_VAR := NOBJS |
| 1400 | include ../src/objs.mk |
| 1401 | _OBJS_VAR := HOBJS |
| 1402 | include ../src/objs.mk |
| 1403 | _OBJS_VAR := SOBJS |
| 1404 | include ../src/objs.mk |
| 1405 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1406 | nt_password_hash: $(NOBJS) |
| 1407 | $(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n) |
| 1408 | @$(E) " LD " $@ |
| 1409 | |
| 1410 | hlr_auc_gw: $(HOBJS) |
| 1411 | $(Q)$(CC) $(LDFLAGS) -o hlr_auc_gw $(HOBJS) $(LIBS_h) |
| 1412 | @$(E) " LD " $@ |
| 1413 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1414 | sae_pk_gen: $(SOBJS) |
| 1415 | $(Q)$(CC) $(LDFLAGS) -o sae_pk_gen $(SOBJS) $(LIBS_s) |
| 1416 | @$(E) " LD " $@ |
| 1417 | |
| 1418 | .PHONY: lcov-html |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 1419 | lcov-html: |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1420 | lcov -c -d $(BUILDDIR) > lcov.info |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 1421 | genhtml lcov.info --output-directory lcov-html |
| 1422 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1423 | clean: common-clean |
| 1424 | rm -f core *~ nt_password_hash hlr_auc_gw |
| 1425 | rm -f sae_pk_gen |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 1426 | rm -f lcov.info |
| 1427 | rm -rf lcov-html |