Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1 | BINALL=wpa_supplicant wpa_cli |
| 2 | |
| 3 | ifndef CONFIG_NO_WPA_PASSPHRASE |
| 4 | BINALL += wpa_passphrase |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 5 | endif |
| 6 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 7 | ALL = $(BINALL) |
| 8 | ALL += systemd/wpa_supplicant.service |
| 9 | ALL += systemd/wpa_supplicant@.service |
| 10 | ALL += systemd/wpa_supplicant-nl80211@.service |
| 11 | ALL += systemd/wpa_supplicant-wired@.service |
| 12 | ALL += dbus/fi.w1.wpa_supplicant1.service |
| 13 | ifdef CONFIG_BUILD_WPA_CLIENT_SO |
| 14 | ALL += libwpa_client.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 15 | endif |
| 16 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 17 | EXTRA_TARGETS=dynamic_eap_methods |
| 18 | |
| 19 | CONFIG_FILE=.config |
| 20 | include ../src/build.rules |
| 21 | |
Dmitry Shmidt | 014a3ff | 2015-12-28 13:27:49 -0800 | [diff] [blame] | 22 | ifdef LIBS |
| 23 | # If LIBS is set with some global build system defaults, clone those for |
| 24 | # LIBS_c and LIBS_p to cover wpa_passphrase and wpa_cli as well. |
| 25 | ifndef LIBS_c |
| 26 | LIBS_c := $(LIBS) |
| 27 | endif |
| 28 | ifndef LIBS_p |
| 29 | LIBS_p := $(LIBS) |
| 30 | endif |
| 31 | endif |
| 32 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 33 | export LIBDIR ?= /usr/local/lib/ |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 34 | export INCDIR ?= /usr/local/include/ |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 35 | export BINDIR ?= /usr/local/sbin/ |
Dmitry Shmidt | c55524a | 2011-07-07 11:18:38 -0700 | [diff] [blame] | 36 | PKG_CONFIG ?= pkg-config |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 37 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 38 | CFLAGS += $(EXTRA_CFLAGS) |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 39 | CFLAGS += -I$(abspath ../src) |
| 40 | CFLAGS += -I$(abspath ../src/utils) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 41 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 42 | ifndef CONFIG_NO_GITVER |
| 43 | # Add VERSION_STR postfix for builds from a git repository |
| 44 | ifeq ($(wildcard ../.git),../.git) |
| 45 | GITVER := $(shell git describe --dirty=+) |
| 46 | ifneq ($(GITVER),) |
| 47 | CFLAGS += -DGIT_VERSION_STR_POSTFIX=\"-$(GITVER)\" |
| 48 | endif |
| 49 | endif |
| 50 | endif |
| 51 | |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 52 | ifdef CONFIG_TESTING_OPTIONS |
| 53 | CFLAGS += -DCONFIG_TESTING_OPTIONS |
| 54 | CONFIG_WPS_TESTING=y |
| 55 | CONFIG_TDLS_TESTING=y |
| 56 | endif |
| 57 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 58 | mkconfig: |
| 59 | @if [ -f .config ]; then \ |
| 60 | echo '.config exists - did not replace it'; \ |
| 61 | exit 1; \ |
| 62 | fi |
| 63 | echo CONFIG_DRIVER_HOSTAP=y >> .config |
| 64 | echo CONFIG_DRIVER_WEXT=y >> .config |
| 65 | |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 66 | $(DESTDIR)$(BINDIR)/%: % |
| 67 | install -D $(<) $(@) |
| 68 | |
| 69 | install: $(addprefix $(DESTDIR)$(BINDIR)/,$(BINALL)) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 70 | $(MAKE) -C ../src install |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 71 | ifdef CONFIG_BUILD_WPA_CLIENT_SO |
| 72 | install -m 0644 -D libwpa_client.so $(DESTDIR)/$(LIBDIR)/libwpa_client.so |
| 73 | install -m 0644 -D ../src/common/wpa_ctrl.h $(DESTDIR)/$(INCDIR)/wpa_ctrl.h |
| 74 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 75 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 76 | ifdef CONFIG_FIPS |
| 77 | CONFIG_NO_RANDOM_POOL= |
| 78 | CONFIG_OPENSSL_CMAC=y |
| 79 | endif |
| 80 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 81 | OBJS = config.o |
| 82 | OBJS += notify.o |
| 83 | OBJS += bss.o |
| 84 | OBJS += eap_register.o |
| 85 | OBJS += ../src/utils/common.o |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame^] | 86 | OBJS += ../src/utils/config.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 87 | OBJS += ../src/utils/wpa_debug.o |
| 88 | OBJS += ../src/utils/wpabuf.o |
Dmitry Shmidt | 2933359 | 2017-01-09 12:27:11 -0800 | [diff] [blame] | 89 | OBJS += ../src/utils/bitfield.o |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 90 | OBJS += ../src/utils/ip_addr.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 91 | OBJS += ../src/utils/crc32.o |
Dmitry Shmidt | 2933359 | 2017-01-09 12:27:11 -0800 | [diff] [blame] | 92 | OBJS += op_classes.o |
| 93 | OBJS += rrm.o |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 94 | OBJS += robust_av.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 95 | OBJS_p = wpa_passphrase.o |
| 96 | OBJS_p += ../src/utils/common.o |
| 97 | OBJS_p += ../src/utils/wpa_debug.o |
| 98 | OBJS_p += ../src/utils/wpabuf.o |
| 99 | OBJS_c = wpa_cli.o ../src/common/wpa_ctrl.o |
| 100 | OBJS_c += ../src/utils/wpa_debug.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 101 | OBJS_c += ../src/utils/common.o |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 102 | OBJS_c += ../src/common/cli.o |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 103 | OBJS += wmm_ac.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 104 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 105 | ifndef CONFIG_OS |
| 106 | ifdef CONFIG_NATIVE_WINDOWS |
| 107 | CONFIG_OS=win32 |
| 108 | else |
| 109 | CONFIG_OS=unix |
| 110 | endif |
| 111 | endif |
| 112 | |
| 113 | ifeq ($(CONFIG_OS), internal) |
| 114 | CFLAGS += -DOS_NO_C_LIB_DEFINES |
| 115 | endif |
| 116 | |
| 117 | OBJS += ../src/utils/os_$(CONFIG_OS).o |
| 118 | OBJS_p += ../src/utils/os_$(CONFIG_OS).o |
| 119 | OBJS_c += ../src/utils/os_$(CONFIG_OS).o |
| 120 | |
| 121 | ifdef CONFIG_WPA_TRACE |
| 122 | CFLAGS += -DWPA_TRACE |
| 123 | OBJS += ../src/utils/trace.o |
| 124 | OBJS_p += ../src/utils/trace.o |
| 125 | OBJS_c += ../src/utils/trace.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 126 | OBJS_priv += ../src/utils/trace.o |
Dmitry Shmidt | 7f65602 | 2015-02-25 14:36:37 -0800 | [diff] [blame] | 127 | LIBCTRL += ../src/utils/trace.o |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 128 | LIBCTRLSO += ../src/utils/trace.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 129 | LDFLAGS += -rdynamic |
| 130 | CFLAGS += -funwind-tables |
| 131 | ifdef CONFIG_WPA_TRACE_BFD |
Dmitry Shmidt | ec58b16 | 2014-02-19 12:44:18 -0800 | [diff] [blame] | 132 | CFLAGS += -DPACKAGE="wpa_supplicant" -DWPA_TRACE_BFD |
Dmitry Shmidt | 13ca8d8 | 2014-02-20 10:18:40 -0800 | [diff] [blame] | 133 | LIBS += -lbfd -ldl -liberty -lz |
| 134 | LIBS_p += -lbfd -ldl -liberty -lz |
| 135 | LIBS_c += -lbfd -ldl -liberty -lz |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 136 | endif |
| 137 | endif |
| 138 | |
| 139 | ifndef CONFIG_ELOOP |
| 140 | CONFIG_ELOOP=eloop |
| 141 | endif |
| 142 | OBJS += ../src/utils/$(CONFIG_ELOOP).o |
| 143 | OBJS_c += ../src/utils/$(CONFIG_ELOOP).o |
| 144 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 145 | ifndef CONFIG_OSX |
Dmitry Shmidt | fa3fc4a | 2013-11-21 13:34:38 -0800 | [diff] [blame] | 146 | ifeq ($(CONFIG_ELOOP), eloop) |
| 147 | # Using glibc < 2.17 requires -lrt for clock_gettime() |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 148 | # OS X has an alternate implementation |
Dmitry Shmidt | fa3fc4a | 2013-11-21 13:34:38 -0800 | [diff] [blame] | 149 | LIBS += -lrt |
| 150 | LIBS_c += -lrt |
| 151 | LIBS_p += -lrt |
| 152 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 153 | endif |
Dmitry Shmidt | fa3fc4a | 2013-11-21 13:34:38 -0800 | [diff] [blame] | 154 | |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 155 | ifdef CONFIG_ELOOP_POLL |
| 156 | CFLAGS += -DCONFIG_ELOOP_POLL |
| 157 | endif |
| 158 | |
Dmitry Shmidt | 50b691d | 2014-05-21 14:01:45 -0700 | [diff] [blame] | 159 | ifdef CONFIG_ELOOP_EPOLL |
| 160 | CFLAGS += -DCONFIG_ELOOP_EPOLL |
| 161 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 162 | |
Dmitry Shmidt | b97e428 | 2016-02-08 10:16:07 -0800 | [diff] [blame] | 163 | ifdef CONFIG_ELOOP_KQUEUE |
| 164 | CFLAGS += -DCONFIG_ELOOP_KQUEUE |
| 165 | endif |
| 166 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 167 | ifdef CONFIG_EAPOL_TEST |
| 168 | CFLAGS += -Werror -DEAPOL_TEST |
| 169 | endif |
| 170 | |
Dmitry Shmidt | 01904cf | 2013-12-05 11:08:35 -0800 | [diff] [blame] | 171 | ifdef CONFIG_CODE_COVERAGE |
| 172 | CFLAGS += -O0 -fprofile-arcs -ftest-coverage |
| 173 | LIBS += -lgcov |
| 174 | LIBS_c += -lgcov |
| 175 | LIBS_p += -lgcov |
| 176 | endif |
| 177 | |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 178 | ifdef CONFIG_HT_OVERRIDES |
| 179 | CFLAGS += -DCONFIG_HT_OVERRIDES |
| 180 | endif |
| 181 | |
Dmitry Shmidt | 2f02319 | 2013-03-12 12:44:17 -0700 | [diff] [blame] | 182 | ifdef CONFIG_VHT_OVERRIDES |
| 183 | CFLAGS += -DCONFIG_VHT_OVERRIDES |
| 184 | endif |
| 185 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 186 | ifdef CONFIG_HE_OVERRIDES |
| 187 | CFLAGS += -DCONFIG_HE_OVERRIDES |
| 188 | endif |
| 189 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 190 | ifndef CONFIG_BACKEND |
| 191 | CONFIG_BACKEND=file |
| 192 | endif |
| 193 | |
| 194 | ifeq ($(CONFIG_BACKEND), file) |
| 195 | OBJS += config_file.o |
| 196 | ifndef CONFIG_NO_CONFIG_BLOBS |
| 197 | NEED_BASE64=y |
| 198 | endif |
| 199 | CFLAGS += -DCONFIG_BACKEND_FILE |
| 200 | endif |
| 201 | |
| 202 | ifeq ($(CONFIG_BACKEND), winreg) |
| 203 | OBJS += config_winreg.o |
| 204 | endif |
| 205 | |
| 206 | ifeq ($(CONFIG_BACKEND), none) |
| 207 | OBJS += config_none.o |
| 208 | endif |
| 209 | |
| 210 | ifdef CONFIG_NO_CONFIG_WRITE |
| 211 | CFLAGS += -DCONFIG_NO_CONFIG_WRITE |
| 212 | endif |
| 213 | |
| 214 | ifdef CONFIG_NO_CONFIG_BLOBS |
| 215 | CFLAGS += -DCONFIG_NO_CONFIG_BLOBS |
| 216 | endif |
| 217 | |
| 218 | ifdef CONFIG_NO_SCAN_PROCESSING |
| 219 | CFLAGS += -DCONFIG_NO_SCAN_PROCESSING |
| 220 | endif |
| 221 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 222 | ifdef CONFIG_SUITEB |
| 223 | CFLAGS += -DCONFIG_SUITEB |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 224 | endif |
| 225 | |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 226 | ifdef CONFIG_SUITEB192 |
| 227 | CFLAGS += -DCONFIG_SUITEB192 |
| 228 | NEED_SHA384=y |
| 229 | endif |
| 230 | |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 231 | ifdef CONFIG_OCV |
| 232 | CFLAGS += -DCONFIG_OCV |
| 233 | OBJS += ../src/common/ocv.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 234 | endif |
| 235 | |
| 236 | ifdef CONFIG_IEEE80211R |
| 237 | CFLAGS += -DCONFIG_IEEE80211R |
| 238 | OBJS += ../src/rsn_supp/wpa_ft.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 239 | endif |
| 240 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 241 | ifdef CONFIG_MESH |
| 242 | NEED_80211_COMMON=y |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 243 | NEED_AES_SIV=y |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 244 | CONFIG_SAE=y |
| 245 | CONFIG_AP=y |
| 246 | CFLAGS += -DCONFIG_MESH |
| 247 | OBJS += mesh.o |
| 248 | OBJS += mesh_mpm.o |
| 249 | OBJS += mesh_rsn.o |
| 250 | endif |
| 251 | |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 252 | ifdef CONFIG_SAE |
| 253 | CFLAGS += -DCONFIG_SAE |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 254 | OBJS += ../src/common/sae.o |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 255 | ifdef CONFIG_SAE_PK |
| 256 | CFLAGS += -DCONFIG_SAE_PK |
| 257 | OBJS += ../src/common/sae_pk.o |
| 258 | endif |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 259 | NEED_ECC=y |
| 260 | NEED_DH_GROUPS=y |
Hai Shalom | b755a2a | 2020-04-23 21:49:02 -0700 | [diff] [blame] | 261 | NEED_HMAC_SHA256_KDF=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 262 | NEED_DRAGONFLY=y |
Ahmed ElArabawy | 0ff61c5 | 2019-12-26 12:38:39 -0800 | [diff] [blame] | 263 | ifdef CONFIG_TESTING_OPTIONS |
| 264 | NEED_DH_GROUPS_ALL=y |
| 265 | endif |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 266 | endif |
| 267 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 268 | ifdef CONFIG_DPP |
| 269 | CFLAGS += -DCONFIG_DPP |
| 270 | OBJS += ../src/common/dpp.o |
Hai Shalom | 4fbc08f | 2020-05-18 12:37:00 -0700 | [diff] [blame] | 271 | OBJS += ../src/common/dpp_auth.o |
| 272 | OBJS += ../src/common/dpp_backup.o |
| 273 | OBJS += ../src/common/dpp_crypto.o |
| 274 | OBJS += ../src/common/dpp_pkex.o |
| 275 | OBJS += ../src/common/dpp_reconfig.o |
| 276 | OBJS += ../src/common/dpp_tcp.o |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 277 | OBJS += dpp_supplicant.o |
| 278 | NEED_AES_SIV=y |
| 279 | NEED_HMAC_SHA256_KDF=y |
| 280 | NEED_HMAC_SHA384_KDF=y |
| 281 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 282 | NEED_SHA384=y |
| 283 | NEED_SHA512=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 284 | NEED_ECC=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 285 | NEED_JSON=y |
| 286 | NEED_GAS_SERVER=y |
| 287 | NEED_BASE64=y |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 288 | NEED_ASN1=y |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 289 | ifdef CONFIG_DPP2 |
| 290 | CFLAGS += -DCONFIG_DPP2 |
| 291 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 292 | endif |
| 293 | |
| 294 | ifdef CONFIG_OWE |
| 295 | CFLAGS += -DCONFIG_OWE |
| 296 | NEED_ECC=y |
| 297 | NEED_HMAC_SHA256_KDF=y |
| 298 | NEED_HMAC_SHA384_KDF=y |
| 299 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 300 | NEED_SHA384=y |
| 301 | NEED_SHA512=y |
| 302 | endif |
| 303 | |
Jimmy Chen | caaac07 | 2019-09-16 16:36:06 +0800 | [diff] [blame] | 304 | ifdef CONFIG_WAPI_INTERFACE |
| 305 | L_CFLAGS += -DCONFIG_WAPI_INTERFACE |
| 306 | endif |
| 307 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 308 | ifdef CONFIG_FILS |
| 309 | CFLAGS += -DCONFIG_FILS |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 310 | NEED_SHA384=y |
| 311 | NEED_AES_SIV=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 312 | ifdef CONFIG_FILS_SK_PFS |
| 313 | CFLAGS += -DCONFIG_FILS_SK_PFS |
| 314 | NEED_ECC=y |
| 315 | endif |
| 316 | endif |
| 317 | |
| 318 | ifdef CONFIG_MBO |
| 319 | CONFIG_WNM=y |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 320 | endif |
| 321 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 322 | ifdef CONFIG_WNM |
| 323 | CFLAGS += -DCONFIG_WNM |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 324 | OBJS += wnm_sta.o |
| 325 | endif |
| 326 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 327 | ifdef CONFIG_TDLS |
| 328 | CFLAGS += -DCONFIG_TDLS |
| 329 | OBJS += ../src/rsn_supp/tdls.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 330 | endif |
| 331 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 332 | ifdef CONFIG_TDLS_TESTING |
| 333 | CFLAGS += -DCONFIG_TDLS_TESTING |
| 334 | endif |
| 335 | |
Dmitry Shmidt | 2933359 | 2017-01-09 12:27:11 -0800 | [diff] [blame] | 336 | ifdef CONFIG_PMKSA_CACHE_EXTERNAL |
| 337 | CFLAGS += -DCONFIG_PMKSA_CACHE_EXTERNAL |
| 338 | endif |
| 339 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 340 | ifndef CONFIG_NO_WPA |
| 341 | OBJS += ../src/rsn_supp/wpa.o |
| 342 | OBJS += ../src/rsn_supp/preauth.o |
| 343 | OBJS += ../src/rsn_supp/pmksa_cache.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 344 | OBJS += ../src/rsn_supp/wpa_ie.o |
| 345 | OBJS += ../src/common/wpa_common.o |
| 346 | NEED_AES=y |
| 347 | NEED_SHA1=y |
| 348 | NEED_MD5=y |
| 349 | NEED_RC4=y |
| 350 | else |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 351 | CFLAGS += -DCONFIG_NO_WPA |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 352 | ifeq ($(CONFIG_TLS), internal) |
| 353 | NEED_SHA1=y |
| 354 | NEED_MD5=y |
| 355 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 356 | endif |
| 357 | |
| 358 | ifdef CONFIG_IBSS_RSN |
| 359 | NEED_RSN_AUTHENTICATOR=y |
| 360 | CFLAGS += -DCONFIG_IBSS_RSN |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 361 | CFLAGS += -DCONFIG_NO_VLAN |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 362 | OBJS += ibss_rsn.o |
| 363 | endif |
| 364 | |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 365 | ifdef CONFIG_MATCH_IFACE |
| 366 | CFLAGS += -DCONFIG_MATCH_IFACE |
| 367 | endif |
| 368 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 369 | ifdef CONFIG_P2P |
| 370 | OBJS += p2p_supplicant.o |
Dmitry Shmidt | f73259c | 2015-03-17 11:00:54 -0700 | [diff] [blame] | 371 | OBJS += p2p_supplicant_sd.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 372 | OBJS += ../src/p2p/p2p.o |
| 373 | OBJS += ../src/p2p/p2p_utils.o |
| 374 | OBJS += ../src/p2p/p2p_parse.o |
| 375 | OBJS += ../src/p2p/p2p_build.o |
| 376 | OBJS += ../src/p2p/p2p_go_neg.o |
| 377 | OBJS += ../src/p2p/p2p_sd.o |
| 378 | OBJS += ../src/p2p/p2p_pd.o |
| 379 | OBJS += ../src/p2p/p2p_invitation.o |
| 380 | OBJS += ../src/p2p/p2p_dev_disc.o |
| 381 | OBJS += ../src/p2p/p2p_group.o |
| 382 | OBJS += ../src/ap/p2p_hostapd.o |
| 383 | CFLAGS += -DCONFIG_P2P |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 384 | NEED_GAS=y |
| 385 | NEED_OFFCHANNEL=y |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 386 | CONFIG_WPS=y |
| 387 | CONFIG_AP=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 388 | ifdef CONFIG_P2P_STRICT |
| 389 | CFLAGS += -DCONFIG_P2P_STRICT |
| 390 | endif |
| 391 | endif |
| 392 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 393 | ifdef CONFIG_WIFI_DISPLAY |
| 394 | CFLAGS += -DCONFIG_WIFI_DISPLAY |
| 395 | OBJS += wifi_display.o |
| 396 | endif |
| 397 | |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame^] | 398 | ifdef CONFIG_PASN |
| 399 | CFLAGS += -DCONFIG_PASN |
| 400 | CFLAGS += -DCONFIG_PTKSA_CACHE |
| 401 | NEED_HMAC_SHA256_KDF=y |
| 402 | NEED_HMAC_SHA384_KDF=y |
| 403 | NEED_SHA256=y |
| 404 | NEED_SHA384=y |
| 405 | OBJS += ../src/common/ptksa_cache.o |
| 406 | OBJS += pasn_supplicant.o |
| 407 | endif |
| 408 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 409 | ifdef CONFIG_HS20 |
| 410 | OBJS += hs20_supplicant.o |
| 411 | CFLAGS += -DCONFIG_HS20 |
| 412 | CONFIG_INTERWORKING=y |
| 413 | endif |
| 414 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 415 | ifdef CONFIG_INTERWORKING |
| 416 | OBJS += interworking.o |
| 417 | CFLAGS += -DCONFIG_INTERWORKING |
| 418 | NEED_GAS=y |
| 419 | endif |
| 420 | |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 421 | ifdef CONFIG_NO_ROAMING |
| 422 | CFLAGS += -DCONFIG_NO_ROAMING |
| 423 | endif |
| 424 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 425 | include ../src/drivers/drivers.mak |
| 426 | ifdef CONFIG_AP |
| 427 | OBJS_d += $(DRV_BOTH_OBJS) |
| 428 | CFLAGS += $(DRV_BOTH_CFLAGS) |
| 429 | LDFLAGS += $(DRV_BOTH_LDFLAGS) |
| 430 | LIBS += $(DRV_BOTH_LIBS) |
| 431 | else |
| 432 | NEED_AP_MLME= |
| 433 | OBJS_d += $(DRV_WPA_OBJS) |
| 434 | CFLAGS += $(DRV_WPA_CFLAGS) |
| 435 | LDFLAGS += $(DRV_WPA_LDFLAGS) |
| 436 | LIBS += $(DRV_WPA_LIBS) |
| 437 | endif |
| 438 | |
| 439 | ifndef CONFIG_L2_PACKET |
| 440 | CONFIG_L2_PACKET=linux |
| 441 | endif |
| 442 | |
| 443 | OBJS_l2 += ../src/l2_packet/l2_packet_$(CONFIG_L2_PACKET).o |
| 444 | |
| 445 | ifeq ($(CONFIG_L2_PACKET), pcap) |
| 446 | ifdef CONFIG_WINPCAP |
| 447 | CFLAGS += -DCONFIG_WINPCAP |
| 448 | LIBS += -lwpcap -lpacket |
| 449 | LIBS_w += -lwpcap |
| 450 | else |
| 451 | LIBS += -ldnet -lpcap |
| 452 | endif |
| 453 | endif |
| 454 | |
| 455 | ifeq ($(CONFIG_L2_PACKET), winpcap) |
| 456 | LIBS += -lwpcap -lpacket |
| 457 | LIBS_w += -lwpcap |
| 458 | endif |
| 459 | |
| 460 | ifeq ($(CONFIG_L2_PACKET), freebsd) |
| 461 | LIBS += -lpcap |
| 462 | endif |
| 463 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 464 | ifdef CONFIG_ERP |
| 465 | CFLAGS += -DCONFIG_ERP |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 466 | NEED_HMAC_SHA256_KDF=y |
| 467 | endif |
| 468 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 469 | ifdef CONFIG_EAP_TLS |
| 470 | # EAP-TLS |
| 471 | ifeq ($(CONFIG_EAP_TLS), dyn) |
| 472 | CFLAGS += -DEAP_TLS_DYNAMIC |
| 473 | EAPDYN += ../src/eap_peer/eap_tls.so |
| 474 | else |
| 475 | CFLAGS += -DEAP_TLS |
| 476 | OBJS += ../src/eap_peer/eap_tls.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 477 | endif |
| 478 | TLS_FUNCS=y |
| 479 | CONFIG_IEEE8021X_EAPOL=y |
| 480 | endif |
| 481 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 482 | ifdef CONFIG_EAP_UNAUTH_TLS |
| 483 | # EAP-UNAUTH-TLS |
| 484 | CFLAGS += -DEAP_UNAUTH_TLS |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 485 | ifndef CONFIG_EAP_TLS |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 486 | OBJS += ../src/eap_peer/eap_tls.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 487 | TLS_FUNCS=y |
| 488 | endif |
| 489 | CONFIG_IEEE8021X_EAPOL=y |
| 490 | endif |
| 491 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 492 | ifdef CONFIG_EAP_PEAP |
| 493 | # EAP-PEAP |
| 494 | ifeq ($(CONFIG_EAP_PEAP), dyn) |
| 495 | CFLAGS += -DEAP_PEAP_DYNAMIC |
| 496 | EAPDYN += ../src/eap_peer/eap_peap.so |
| 497 | else |
| 498 | CFLAGS += -DEAP_PEAP |
| 499 | OBJS += ../src/eap_peer/eap_peap.o |
| 500 | OBJS += ../src/eap_common/eap_peap_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 501 | endif |
| 502 | TLS_FUNCS=y |
| 503 | CONFIG_IEEE8021X_EAPOL=y |
| 504 | endif |
| 505 | |
| 506 | ifdef CONFIG_EAP_TTLS |
| 507 | # EAP-TTLS |
| 508 | ifeq ($(CONFIG_EAP_TTLS), dyn) |
| 509 | CFLAGS += -DEAP_TTLS_DYNAMIC |
| 510 | EAPDYN += ../src/eap_peer/eap_ttls.so |
| 511 | else |
| 512 | CFLAGS += -DEAP_TTLS |
| 513 | OBJS += ../src/eap_peer/eap_ttls.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 514 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 515 | TLS_FUNCS=y |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 516 | ifndef CONFIG_FIPS |
| 517 | MS_FUNCS=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 518 | CHAP=y |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 519 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 520 | CONFIG_IEEE8021X_EAPOL=y |
| 521 | endif |
| 522 | |
| 523 | ifdef CONFIG_EAP_MD5 |
| 524 | # EAP-MD5 |
| 525 | ifeq ($(CONFIG_EAP_MD5), dyn) |
| 526 | CFLAGS += -DEAP_MD5_DYNAMIC |
| 527 | EAPDYN += ../src/eap_peer/eap_md5.so |
| 528 | else |
| 529 | CFLAGS += -DEAP_MD5 |
| 530 | OBJS += ../src/eap_peer/eap_md5.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 531 | endif |
| 532 | CHAP=y |
| 533 | CONFIG_IEEE8021X_EAPOL=y |
| 534 | endif |
| 535 | |
| 536 | # backwards compatibility for old spelling |
| 537 | ifdef CONFIG_MSCHAPV2 |
| 538 | ifndef CONFIG_EAP_MSCHAPV2 |
| 539 | CONFIG_EAP_MSCHAPV2=y |
| 540 | endif |
| 541 | endif |
| 542 | |
| 543 | ifdef CONFIG_EAP_MSCHAPV2 |
| 544 | # EAP-MSCHAPv2 |
| 545 | ifeq ($(CONFIG_EAP_MSCHAPV2), dyn) |
| 546 | CFLAGS += -DEAP_MSCHAPv2_DYNAMIC |
| 547 | EAPDYN += ../src/eap_peer/eap_mschapv2.so |
| 548 | EAPDYN += ../src/eap_peer/mschapv2.so |
| 549 | else |
| 550 | CFLAGS += -DEAP_MSCHAPv2 |
| 551 | OBJS += ../src/eap_peer/eap_mschapv2.o |
| 552 | OBJS += ../src/eap_peer/mschapv2.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 553 | endif |
| 554 | MS_FUNCS=y |
| 555 | CONFIG_IEEE8021X_EAPOL=y |
| 556 | endif |
| 557 | |
| 558 | ifdef CONFIG_EAP_GTC |
| 559 | # EAP-GTC |
| 560 | ifeq ($(CONFIG_EAP_GTC), dyn) |
| 561 | CFLAGS += -DEAP_GTC_DYNAMIC |
| 562 | EAPDYN += ../src/eap_peer/eap_gtc.so |
| 563 | else |
| 564 | CFLAGS += -DEAP_GTC |
| 565 | OBJS += ../src/eap_peer/eap_gtc.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 566 | endif |
| 567 | CONFIG_IEEE8021X_EAPOL=y |
| 568 | endif |
| 569 | |
| 570 | ifdef CONFIG_EAP_OTP |
| 571 | # EAP-OTP |
| 572 | ifeq ($(CONFIG_EAP_OTP), dyn) |
| 573 | CFLAGS += -DEAP_OTP_DYNAMIC |
| 574 | EAPDYN += ../src/eap_peer/eap_otp.so |
| 575 | else |
| 576 | CFLAGS += -DEAP_OTP |
| 577 | OBJS += ../src/eap_peer/eap_otp.o |
| 578 | endif |
| 579 | CONFIG_IEEE8021X_EAPOL=y |
| 580 | endif |
| 581 | |
| 582 | ifdef CONFIG_EAP_SIM |
| 583 | # EAP-SIM |
| 584 | ifeq ($(CONFIG_EAP_SIM), dyn) |
| 585 | CFLAGS += -DEAP_SIM_DYNAMIC |
| 586 | EAPDYN += ../src/eap_peer/eap_sim.so |
| 587 | else |
| 588 | CFLAGS += -DEAP_SIM |
| 589 | OBJS += ../src/eap_peer/eap_sim.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 590 | endif |
| 591 | CONFIG_IEEE8021X_EAPOL=y |
| 592 | CONFIG_EAP_SIM_COMMON=y |
| 593 | NEED_AES_CBC=y |
| 594 | endif |
| 595 | |
| 596 | ifdef CONFIG_EAP_LEAP |
| 597 | # EAP-LEAP |
| 598 | ifeq ($(CONFIG_EAP_LEAP), dyn) |
| 599 | CFLAGS += -DEAP_LEAP_DYNAMIC |
| 600 | EAPDYN += ../src/eap_peer/eap_leap.so |
| 601 | else |
| 602 | CFLAGS += -DEAP_LEAP |
| 603 | OBJS += ../src/eap_peer/eap_leap.o |
| 604 | endif |
| 605 | MS_FUNCS=y |
| 606 | CONFIG_IEEE8021X_EAPOL=y |
| 607 | endif |
| 608 | |
| 609 | ifdef CONFIG_EAP_PSK |
| 610 | # EAP-PSK |
| 611 | ifeq ($(CONFIG_EAP_PSK), dyn) |
| 612 | CFLAGS += -DEAP_PSK_DYNAMIC |
| 613 | EAPDYN += ../src/eap_peer/eap_psk.so |
| 614 | else |
| 615 | CFLAGS += -DEAP_PSK |
| 616 | OBJS += ../src/eap_peer/eap_psk.o ../src/eap_common/eap_psk_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 617 | endif |
| 618 | CONFIG_IEEE8021X_EAPOL=y |
| 619 | NEED_AES=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 620 | NEED_AES_ENCBLOCK=y |
| 621 | NEED_AES_EAX=y |
| 622 | endif |
| 623 | |
| 624 | ifdef CONFIG_EAP_AKA |
| 625 | # EAP-AKA |
| 626 | ifeq ($(CONFIG_EAP_AKA), dyn) |
| 627 | CFLAGS += -DEAP_AKA_DYNAMIC |
| 628 | EAPDYN += ../src/eap_peer/eap_aka.so |
| 629 | else |
| 630 | CFLAGS += -DEAP_AKA |
| 631 | OBJS += ../src/eap_peer/eap_aka.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 632 | endif |
| 633 | CONFIG_IEEE8021X_EAPOL=y |
| 634 | CONFIG_EAP_SIM_COMMON=y |
| 635 | NEED_AES_CBC=y |
| 636 | endif |
| 637 | |
Dmitry Shmidt | f862328 | 2013-02-20 14:34:59 -0800 | [diff] [blame] | 638 | ifdef CONFIG_EAP_PROXY |
| 639 | CFLAGS += -DCONFIG_EAP_PROXY |
| 640 | OBJS += ../src/eap_peer/eap_proxy_$(CONFIG_EAP_PROXY).o |
Dmitry Shmidt | 61593f0 | 2014-04-21 16:27:35 -0700 | [diff] [blame] | 641 | include eap_proxy_$(CONFIG_EAP_PROXY).mak |
Dmitry Shmidt | f862328 | 2013-02-20 14:34:59 -0800 | [diff] [blame] | 642 | CONFIG_IEEE8021X_EAPOL=y |
| 643 | endif |
| 644 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 645 | ifdef CONFIG_EAP_AKA_PRIME |
| 646 | # EAP-AKA' |
| 647 | ifeq ($(CONFIG_EAP_AKA_PRIME), dyn) |
| 648 | CFLAGS += -DEAP_AKA_PRIME_DYNAMIC |
| 649 | else |
| 650 | CFLAGS += -DEAP_AKA_PRIME |
| 651 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 652 | endif |
| 653 | |
| 654 | ifdef CONFIG_EAP_SIM_COMMON |
| 655 | OBJS += ../src/eap_common/eap_sim_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 656 | NEED_AES=y |
| 657 | NEED_FIPS186_2_PRF=y |
| 658 | endif |
| 659 | |
| 660 | ifdef CONFIG_EAP_FAST |
| 661 | # EAP-FAST |
| 662 | ifeq ($(CONFIG_EAP_FAST), dyn) |
| 663 | CFLAGS += -DEAP_FAST_DYNAMIC |
| 664 | EAPDYN += ../src/eap_peer/eap_fast.so |
| 665 | EAPDYN += ../src/eap_common/eap_fast_common.o |
| 666 | else |
| 667 | CFLAGS += -DEAP_FAST |
| 668 | OBJS += ../src/eap_peer/eap_fast.o ../src/eap_peer/eap_fast_pac.o |
| 669 | OBJS += ../src/eap_common/eap_fast_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 670 | endif |
| 671 | TLS_FUNCS=y |
| 672 | CONFIG_IEEE8021X_EAPOL=y |
| 673 | NEED_T_PRF=y |
| 674 | endif |
| 675 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 676 | ifdef CONFIG_EAP_TEAP |
| 677 | # EAP-TEAP |
| 678 | ifeq ($(CONFIG_EAP_TEAP), dyn) |
| 679 | CFLAGS += -DEAP_TEAP_DYNAMIC |
| 680 | EAPDYN += ../src/eap_peer/eap_teap.so |
| 681 | EAPDYN += ../src/eap_common/eap_teap_common.o |
| 682 | else |
| 683 | CFLAGS += -DEAP_TEAP |
| 684 | OBJS += ../src/eap_peer/eap_teap.o ../src/eap_peer/eap_teap_pac.o |
| 685 | OBJS += ../src/eap_common/eap_teap_common.o |
| 686 | endif |
| 687 | TLS_FUNCS=y |
| 688 | CONFIG_IEEE8021X_EAPOL=y |
| 689 | NEED_T_PRF=y |
| 690 | NEED_SHA384=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 691 | NEED_TLS_PRF_SHA256=y |
| 692 | NEED_TLS_PRF_SHA384=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 693 | endif |
| 694 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 695 | ifdef CONFIG_EAP_PAX |
| 696 | # EAP-PAX |
| 697 | ifeq ($(CONFIG_EAP_PAX), dyn) |
| 698 | CFLAGS += -DEAP_PAX_DYNAMIC |
| 699 | EAPDYN += ../src/eap_peer/eap_pax.so |
| 700 | else |
| 701 | CFLAGS += -DEAP_PAX |
| 702 | OBJS += ../src/eap_peer/eap_pax.o ../src/eap_common/eap_pax_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 703 | endif |
| 704 | CONFIG_IEEE8021X_EAPOL=y |
| 705 | endif |
| 706 | |
| 707 | ifdef CONFIG_EAP_SAKE |
| 708 | # EAP-SAKE |
| 709 | ifeq ($(CONFIG_EAP_SAKE), dyn) |
| 710 | CFLAGS += -DEAP_SAKE_DYNAMIC |
| 711 | EAPDYN += ../src/eap_peer/eap_sake.so |
| 712 | else |
| 713 | CFLAGS += -DEAP_SAKE |
| 714 | OBJS += ../src/eap_peer/eap_sake.o ../src/eap_common/eap_sake_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 715 | endif |
| 716 | CONFIG_IEEE8021X_EAPOL=y |
| 717 | endif |
| 718 | |
| 719 | ifdef CONFIG_EAP_GPSK |
| 720 | # EAP-GPSK |
| 721 | ifeq ($(CONFIG_EAP_GPSK), dyn) |
| 722 | CFLAGS += -DEAP_GPSK_DYNAMIC |
| 723 | EAPDYN += ../src/eap_peer/eap_gpsk.so |
| 724 | else |
| 725 | CFLAGS += -DEAP_GPSK |
| 726 | OBJS += ../src/eap_peer/eap_gpsk.o ../src/eap_common/eap_gpsk_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 727 | endif |
| 728 | CONFIG_IEEE8021X_EAPOL=y |
| 729 | ifdef CONFIG_EAP_GPSK_SHA256 |
| 730 | CFLAGS += -DEAP_GPSK_SHA256 |
| 731 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 732 | endif |
| 733 | |
| 734 | ifdef CONFIG_EAP_PWD |
| 735 | CFLAGS += -DEAP_PWD |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 736 | ifeq ($(CONFIG_TLS), wolfssl) |
| 737 | CFLAGS += -DCONFIG_ECC |
| 738 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 739 | OBJS += ../src/eap_peer/eap_pwd.o ../src/eap_common/eap_pwd_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 740 | CONFIG_IEEE8021X_EAPOL=y |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 741 | NEED_ECC=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 742 | NEED_DRAGONFLY=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 743 | endif |
| 744 | |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 745 | ifdef CONFIG_EAP_EKE |
| 746 | # EAP-EKE |
| 747 | ifeq ($(CONFIG_EAP_EKE), dyn) |
| 748 | CFLAGS += -DEAP_EKE_DYNAMIC |
| 749 | EAPDYN += ../src/eap_peer/eap_eke.so |
| 750 | else |
| 751 | CFLAGS += -DEAP_EKE |
| 752 | OBJS += ../src/eap_peer/eap_eke.o ../src/eap_common/eap_eke_common.o |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 753 | endif |
| 754 | CONFIG_IEEE8021X_EAPOL=y |
| 755 | NEED_DH_GROUPS=y |
| 756 | NEED_DH_GROUPS_ALL=y |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 757 | NEED_AES_CBC=y |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 758 | endif |
| 759 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 760 | ifdef CONFIG_WPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 761 | # EAP-WSC |
| 762 | CFLAGS += -DCONFIG_WPS -DEAP_WSC |
| 763 | OBJS += wps_supplicant.o |
| 764 | OBJS += ../src/utils/uuid.o |
| 765 | OBJS += ../src/eap_peer/eap_wsc.o ../src/eap_common/eap_wsc_common.o |
| 766 | OBJS += ../src/wps/wps.o |
| 767 | OBJS += ../src/wps/wps_common.o |
| 768 | OBJS += ../src/wps/wps_attr_parse.o |
| 769 | OBJS += ../src/wps/wps_attr_build.o |
| 770 | OBJS += ../src/wps/wps_attr_process.o |
| 771 | OBJS += ../src/wps/wps_dev_attr.o |
| 772 | OBJS += ../src/wps/wps_enrollee.o |
| 773 | OBJS += ../src/wps/wps_registrar.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 774 | CONFIG_IEEE8021X_EAPOL=y |
| 775 | NEED_DH_GROUPS=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 776 | NEED_BASE64=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 777 | NEED_AES_CBC=y |
| 778 | NEED_MODEXP=y |
| 779 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 780 | ifdef CONFIG_WPS_NFC |
| 781 | CFLAGS += -DCONFIG_WPS_NFC |
| 782 | OBJS += ../src/wps/ndef.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 783 | NEED_WPS_OOB=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 784 | endif |
| 785 | |
| 786 | ifdef NEED_WPS_OOB |
| 787 | CFLAGS += -DCONFIG_WPS_OOB |
| 788 | endif |
| 789 | |
| 790 | ifdef CONFIG_WPS_ER |
| 791 | CONFIG_WPS_UPNP=y |
| 792 | CFLAGS += -DCONFIG_WPS_ER |
| 793 | OBJS += ../src/wps/wps_er.o |
| 794 | OBJS += ../src/wps/wps_er_ssdp.o |
| 795 | endif |
| 796 | |
| 797 | ifdef CONFIG_WPS_UPNP |
| 798 | CFLAGS += -DCONFIG_WPS_UPNP |
| 799 | OBJS += ../src/wps/wps_upnp.o |
| 800 | OBJS += ../src/wps/wps_upnp_ssdp.o |
| 801 | OBJS += ../src/wps/wps_upnp_web.o |
| 802 | OBJS += ../src/wps/wps_upnp_event.o |
| 803 | OBJS += ../src/wps/wps_upnp_ap.o |
| 804 | OBJS += ../src/wps/upnp_xml.o |
| 805 | OBJS += ../src/wps/httpread.o |
| 806 | OBJS += ../src/wps/http_client.o |
| 807 | OBJS += ../src/wps/http_server.o |
| 808 | endif |
| 809 | |
| 810 | ifdef CONFIG_WPS_STRICT |
| 811 | CFLAGS += -DCONFIG_WPS_STRICT |
| 812 | OBJS += ../src/wps/wps_validate.o |
| 813 | endif |
| 814 | |
| 815 | ifdef CONFIG_WPS_TESTING |
| 816 | CFLAGS += -DCONFIG_WPS_TESTING |
| 817 | endif |
| 818 | |
| 819 | ifdef CONFIG_WPS_REG_DISABLE_OPEN |
| 820 | CFLAGS += -DCONFIG_WPS_REG_DISABLE_OPEN |
| 821 | endif |
| 822 | |
| 823 | endif |
| 824 | |
| 825 | ifdef CONFIG_EAP_IKEV2 |
| 826 | # EAP-IKEv2 |
| 827 | ifeq ($(CONFIG_EAP_IKEV2), dyn) |
| 828 | CFLAGS += -DEAP_IKEV2_DYNAMIC |
| 829 | EAPDYN += ../src/eap_peer/eap_ikev2.so ../src/eap_peer/ikev2.o |
| 830 | EAPDYN += ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o |
| 831 | else |
| 832 | CFLAGS += -DEAP_IKEV2 |
| 833 | OBJS += ../src/eap_peer/eap_ikev2.o ../src/eap_peer/ikev2.o |
| 834 | OBJS += ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 835 | endif |
| 836 | CONFIG_IEEE8021X_EAPOL=y |
| 837 | NEED_DH_GROUPS=y |
| 838 | NEED_DH_GROUPS_ALL=y |
| 839 | NEED_MODEXP=y |
| 840 | NEED_CIPHER=y |
| 841 | endif |
| 842 | |
| 843 | ifdef CONFIG_EAP_VENDOR_TEST |
| 844 | ifeq ($(CONFIG_EAP_VENDOR_TEST), dyn) |
| 845 | CFLAGS += -DEAP_VENDOR_TEST_DYNAMIC |
| 846 | EAPDYN += ../src/eap_peer/eap_vendor_test.so |
| 847 | else |
| 848 | CFLAGS += -DEAP_VENDOR_TEST |
| 849 | OBJS += ../src/eap_peer/eap_vendor_test.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 850 | endif |
| 851 | CONFIG_IEEE8021X_EAPOL=y |
| 852 | endif |
| 853 | |
| 854 | ifdef CONFIG_EAP_TNC |
| 855 | # EAP-TNC |
| 856 | CFLAGS += -DEAP_TNC |
| 857 | OBJS += ../src/eap_peer/eap_tnc.o |
| 858 | OBJS += ../src/eap_peer/tncc.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 859 | NEED_BASE64=y |
| 860 | ifndef CONFIG_NATIVE_WINDOWS |
| 861 | ifndef CONFIG_DRIVER_BSD |
| 862 | LIBS += -ldl |
| 863 | endif |
| 864 | endif |
| 865 | endif |
| 866 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 867 | ifdef CONFIG_MACSEC |
| 868 | CFLAGS += -DCONFIG_MACSEC |
| 869 | CONFIG_IEEE8021X_EAPOL=y |
| 870 | NEED_AES_ENCBLOCK=y |
| 871 | NEED_AES_UNWRAP=y |
| 872 | NEED_AES_WRAP=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 873 | OBJS += wpas_kay.o |
| 874 | OBJS += ../src/pae/ieee802_1x_cp.o |
| 875 | OBJS += ../src/pae/ieee802_1x_kay.o |
| 876 | OBJS += ../src/pae/ieee802_1x_key.o |
| 877 | OBJS += ../src/pae/ieee802_1x_secy_ops.o |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 878 | ifdef CONFIG_AP |
| 879 | OBJS += ../src/ap/wpa_auth_kay.o |
| 880 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 881 | endif |
| 882 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 883 | ifdef CONFIG_IEEE8021X_EAPOL |
| 884 | # IEEE 802.1X/EAPOL state machines (e.g., for RADIUS authentication) |
| 885 | CFLAGS += -DIEEE8021X_EAPOL |
| 886 | OBJS += ../src/eapol_supp/eapol_supp_sm.o |
| 887 | OBJS += ../src/eap_peer/eap.o ../src/eap_peer/eap_methods.o |
| 888 | NEED_EAP_COMMON=y |
| 889 | ifdef CONFIG_DYNAMIC_EAP_METHODS |
| 890 | CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS |
| 891 | LIBS += -ldl -rdynamic |
| 892 | endif |
| 893 | endif |
| 894 | |
| 895 | ifdef CONFIG_AP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 896 | NEED_EAP_COMMON=y |
| 897 | NEED_RSN_AUTHENTICATOR=y |
| 898 | CFLAGS += -DCONFIG_AP |
| 899 | OBJS += ap.o |
| 900 | CFLAGS += -DCONFIG_NO_RADIUS |
| 901 | CFLAGS += -DCONFIG_NO_ACCOUNTING |
| 902 | CFLAGS += -DCONFIG_NO_VLAN |
| 903 | OBJS += ../src/ap/hostapd.o |
| 904 | OBJS += ../src/ap/wpa_auth_glue.o |
| 905 | OBJS += ../src/ap/utils.o |
| 906 | OBJS += ../src/ap/authsrv.o |
| 907 | OBJS += ../src/ap/ap_config.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 908 | OBJS += ../src/ap/sta_info.o |
| 909 | OBJS += ../src/ap/tkip_countermeasures.o |
| 910 | OBJS += ../src/ap/ap_mlme.o |
| 911 | OBJS += ../src/ap/ieee802_1x.o |
| 912 | OBJS += ../src/eapol_auth/eapol_auth_sm.o |
| 913 | OBJS += ../src/ap/ieee802_11_auth.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 914 | OBJS += ../src/ap/ieee802_11_shared.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 915 | OBJS += ../src/ap/drv_callbacks.o |
| 916 | OBJS += ../src/ap/ap_drv_ops.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 917 | OBJS += ../src/ap/beacon.o |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 918 | OBJS += ../src/ap/bss_load.o |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 919 | OBJS += ../src/ap/eap_user_db.o |
Dmitry Shmidt | 849734c | 2016-05-27 09:59:01 -0700 | [diff] [blame] | 920 | OBJS += ../src/ap/neighbor_db.o |
| 921 | OBJS += ../src/ap/rrm.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 922 | OBJS += ../src/ap/ieee802_11_ht.o |
Dmitry Shmidt | 68d0e3e | 2013-10-28 17:59:21 -0700 | [diff] [blame] | 923 | ifdef CONFIG_IEEE80211AC |
| 924 | OBJS += ../src/ap/ieee802_11_vht.o |
| 925 | endif |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 926 | ifdef CONFIG_IEEE80211AX |
| 927 | OBJS += ../src/ap/ieee802_11_he.o |
| 928 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 929 | ifdef CONFIG_WNM_AP |
| 930 | CFLAGS += -DCONFIG_WNM_AP |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 931 | OBJS += ../src/ap/wnm_ap.o |
| 932 | endif |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 933 | ifdef CONFIG_MBO |
| 934 | OBJS += ../src/ap/mbo_ap.o |
| 935 | endif |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 936 | ifdef CONFIG_FILS |
| 937 | OBJS += ../src/ap/fils_hlp.o |
| 938 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 939 | ifdef CONFIG_CTRL_IFACE |
| 940 | OBJS += ../src/ap/ctrl_iface_ap.o |
| 941 | endif |
| 942 | |
| 943 | CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY |
| 944 | OBJS += ../src/eap_server/eap_server.o |
| 945 | OBJS += ../src/eap_server/eap_server_identity.o |
| 946 | OBJS += ../src/eap_server/eap_server_methods.o |
| 947 | |
Dmitry Shmidt | 68d0e3e | 2013-10-28 17:59:21 -0700 | [diff] [blame] | 948 | ifdef CONFIG_IEEE80211AC |
| 949 | CFLAGS += -DCONFIG_IEEE80211AC |
| 950 | endif |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 951 | ifdef CONFIG_IEEE80211AX |
| 952 | CFLAGS += -DCONFIG_IEEE80211AX |
| 953 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 954 | |
| 955 | ifdef NEED_AP_MLME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 956 | OBJS += ../src/ap/wmm.o |
| 957 | OBJS += ../src/ap/ap_list.o |
| 958 | OBJS += ../src/ap/ieee802_11.o |
| 959 | OBJS += ../src/ap/hw_features.o |
Dmitry Shmidt | 051af73 | 2013-10-22 13:52:46 -0700 | [diff] [blame] | 960 | OBJS += ../src/ap/dfs.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 961 | CFLAGS += -DNEED_AP_MLME |
| 962 | endif |
| 963 | ifdef CONFIG_WPS |
| 964 | CFLAGS += -DEAP_SERVER_WSC |
| 965 | OBJS += ../src/ap/wps_hostapd.o |
| 966 | OBJS += ../src/eap_server/eap_server_wsc.o |
| 967 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 968 | ifdef CONFIG_DPP |
| 969 | OBJS += ../src/ap/dpp_hostapd.o |
| 970 | OBJS += ../src/ap/gas_query_ap.o |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 971 | NEED_AP_GAS_SERV=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 972 | endif |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 973 | ifdef CONFIG_INTERWORKING |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 974 | NEED_AP_GAS_SERV=y |
| 975 | endif |
| 976 | ifdef NEED_AP_GAS_SERV |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 977 | OBJS += ../src/ap/gas_serv.o |
| 978 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 979 | ifdef CONFIG_HS20 |
| 980 | OBJS += ../src/ap/hs20.o |
| 981 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 982 | endif |
| 983 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 984 | ifdef CONFIG_MBO |
| 985 | OBJS += mbo.o |
| 986 | CFLAGS += -DCONFIG_MBO |
| 987 | endif |
| 988 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 989 | ifdef NEED_RSN_AUTHENTICATOR |
| 990 | CFLAGS += -DCONFIG_NO_RADIUS |
| 991 | NEED_AES_WRAP=y |
| 992 | OBJS += ../src/ap/wpa_auth.o |
| 993 | OBJS += ../src/ap/wpa_auth_ie.o |
| 994 | OBJS += ../src/ap/pmksa_cache_auth.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 995 | endif |
| 996 | |
Dmitry Shmidt | 014a3ff | 2015-12-28 13:27:49 -0800 | [diff] [blame] | 997 | ifdef CONFIG_ACS |
| 998 | CFLAGS += -DCONFIG_ACS |
| 999 | OBJS += ../src/ap/acs.o |
| 1000 | LIBS += -lm |
| 1001 | endif |
| 1002 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1003 | ifdef CONFIG_PCSC |
| 1004 | # PC/SC interface for smartcards (USIM, GSM SIM) |
| 1005 | CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC |
| 1006 | OBJS += ../src/utils/pcsc_funcs.o |
| 1007 | # -lpthread may not be needed depending on how pcsc-lite was configured |
| 1008 | ifdef CONFIG_NATIVE_WINDOWS |
| 1009 | #Once MinGW gets support for WinScard, -lwinscard could be used instead of the |
| 1010 | #dynamic symbol loading that is now used in pcsc_funcs.c |
| 1011 | #LIBS += -lwinscard |
| 1012 | else |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1013 | ifdef CONFIG_OSX |
| 1014 | LIBS += -framework PCSC |
| 1015 | else |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1016 | LIBS += -lpcsclite -lpthread |
| 1017 | endif |
| 1018 | endif |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1019 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1020 | |
| 1021 | ifdef CONFIG_SIM_SIMULATOR |
| 1022 | CFLAGS += -DCONFIG_SIM_SIMULATOR |
| 1023 | NEED_MILENAGE=y |
| 1024 | endif |
| 1025 | |
| 1026 | ifdef CONFIG_USIM_SIMULATOR |
| 1027 | CFLAGS += -DCONFIG_USIM_SIMULATOR |
| 1028 | NEED_MILENAGE=y |
| 1029 | endif |
| 1030 | |
| 1031 | ifdef NEED_MILENAGE |
| 1032 | OBJS += ../src/crypto/milenage.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1033 | NEED_AES_ENCBLOCK=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1034 | endif |
| 1035 | |
| 1036 | ifdef CONFIG_PKCS12 |
| 1037 | CFLAGS += -DPKCS12_FUNCS |
| 1038 | endif |
| 1039 | |
| 1040 | ifdef CONFIG_SMARTCARD |
| 1041 | CFLAGS += -DCONFIG_SMARTCARD |
| 1042 | endif |
| 1043 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 1044 | ifdef NEED_DRAGONFLY |
| 1045 | OBJS += ../src/common/dragonfly.o |
| 1046 | endif |
| 1047 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1048 | ifdef MS_FUNCS |
| 1049 | OBJS += ../src/crypto/ms_funcs.o |
| 1050 | NEED_DES=y |
| 1051 | NEED_MD4=y |
| 1052 | endif |
| 1053 | |
| 1054 | ifdef CHAP |
| 1055 | OBJS += ../src/eap_common/chap.o |
| 1056 | endif |
| 1057 | |
| 1058 | ifdef TLS_FUNCS |
| 1059 | NEED_DES=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 1060 | # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, EAP_TTLS, EAP_FAST, and |
| 1061 | # EAP_TEAP) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1062 | OBJS += ../src/eap_peer/eap_tls_common.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1063 | ifndef CONFIG_FIPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1064 | NEED_TLS_PRF=y |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1065 | NEED_SHA1=y |
| 1066 | NEED_MD5=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1067 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1068 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1069 | |
| 1070 | ifndef CONFIG_TLS |
| 1071 | CONFIG_TLS=openssl |
| 1072 | endif |
| 1073 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1074 | ifdef CONFIG_TLSV11 |
| 1075 | CFLAGS += -DCONFIG_TLSV11 |
| 1076 | endif |
| 1077 | |
| 1078 | ifdef CONFIG_TLSV12 |
| 1079 | CFLAGS += -DCONFIG_TLSV12 |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1080 | endif |
| 1081 | |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1082 | ifeq ($(CONFIG_TLS), wolfssl) |
| 1083 | ifdef TLS_FUNCS |
Hai Shalom | 4fbc08f | 2020-05-18 12:37:00 -0700 | [diff] [blame] | 1084 | CFLAGS += -DWOLFSSL_DER_LOAD |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1085 | OBJS += ../src/crypto/tls_wolfssl.o |
| 1086 | endif |
| 1087 | OBJS += ../src/crypto/crypto_wolfssl.o |
| 1088 | OBJS_p += ../src/crypto/crypto_wolfssl.o |
| 1089 | ifdef NEED_FIPS186_2_PRF |
| 1090 | OBJS += ../src/crypto/fips_prf_wolfssl.o |
| 1091 | endif |
| 1092 | NEED_TLS_PRF_SHA256=y |
| 1093 | LIBS += -lwolfssl -lm |
| 1094 | LIBS_p += -lwolfssl -lm |
| 1095 | endif |
| 1096 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1097 | ifeq ($(CONFIG_TLS), openssl) |
| 1098 | ifdef TLS_FUNCS |
| 1099 | CFLAGS += -DEAP_TLS_OPENSSL |
| 1100 | OBJS += ../src/crypto/tls_openssl.o |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1101 | OBJS += ../src/crypto/tls_openssl_ocsp.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1102 | LIBS += -lssl |
| 1103 | endif |
| 1104 | OBJS += ../src/crypto/crypto_openssl.o |
| 1105 | OBJS_p += ../src/crypto/crypto_openssl.o |
Dmitry Shmidt | 1d755d0 | 2015-04-28 10:34:29 -0700 | [diff] [blame] | 1106 | OBJS_priv += ../src/crypto/crypto_openssl.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1107 | ifdef NEED_FIPS186_2_PRF |
| 1108 | OBJS += ../src/crypto/fips_prf_openssl.o |
| 1109 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1110 | NEED_TLS_PRF_SHA256=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1111 | LIBS += -lcrypto |
| 1112 | LIBS_p += -lcrypto |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1113 | ifdef CONFIG_TLS_ADD_DL |
| 1114 | LIBS += -ldl |
| 1115 | LIBS_p += -ldl |
| 1116 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1117 | ifndef CONFIG_TLS_DEFAULT_CIPHERS |
| 1118 | CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW" |
| 1119 | endif |
| 1120 | CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1121 | endif |
| 1122 | |
| 1123 | ifeq ($(CONFIG_TLS), gnutls) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1124 | ifndef CONFIG_CRYPTO |
| 1125 | # default to libgcrypt |
| 1126 | CONFIG_CRYPTO=gnutls |
| 1127 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1128 | ifdef TLS_FUNCS |
| 1129 | OBJS += ../src/crypto/tls_gnutls.o |
| 1130 | LIBS += -lgnutls -lgpg-error |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1131 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1132 | OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
| 1133 | OBJS_p += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
| 1134 | OBJS_priv += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1135 | ifdef NEED_FIPS186_2_PRF |
Dmitry Shmidt | 9866086 | 2014-03-11 17:26:21 -0700 | [diff] [blame] | 1136 | OBJS += ../src/crypto/fips_prf_internal.o |
| 1137 | SHA1OBJS += ../src/crypto/sha1-internal.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1138 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1139 | ifeq ($(CONFIG_CRYPTO), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1140 | LIBS += -lgcrypt |
| 1141 | LIBS_p += -lgcrypt |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1142 | CONFIG_INTERNAL_RC4=y |
| 1143 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1144 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1145 | ifeq ($(CONFIG_CRYPTO), nettle) |
| 1146 | LIBS += -lnettle -lgmp |
| 1147 | LIBS_p += -lnettle -lgmp |
| 1148 | CONFIG_INTERNAL_RC4=y |
| 1149 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1150 | endif |
| 1151 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1152 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1153 | ifeq ($(CONFIG_TLS), internal) |
| 1154 | ifndef CONFIG_CRYPTO |
| 1155 | CONFIG_CRYPTO=internal |
| 1156 | endif |
| 1157 | ifdef TLS_FUNCS |
| 1158 | OBJS += ../src/crypto/crypto_internal-rsa.o |
| 1159 | OBJS += ../src/crypto/tls_internal.o |
| 1160 | OBJS += ../src/tls/tlsv1_common.o |
| 1161 | OBJS += ../src/tls/tlsv1_record.o |
| 1162 | OBJS += ../src/tls/tlsv1_cred.o |
| 1163 | OBJS += ../src/tls/tlsv1_client.o |
| 1164 | OBJS += ../src/tls/tlsv1_client_write.o |
| 1165 | OBJS += ../src/tls/tlsv1_client_read.o |
Dmitry Shmidt | 55840ad | 2015-12-14 12:45:46 -0800 | [diff] [blame] | 1166 | OBJS += ../src/tls/tlsv1_client_ocsp.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1167 | OBJS += ../src/tls/rsa.o |
| 1168 | OBJS += ../src/tls/x509v3.o |
| 1169 | OBJS += ../src/tls/pkcs1.o |
| 1170 | OBJS += ../src/tls/pkcs5.o |
| 1171 | OBJS += ../src/tls/pkcs8.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1172 | NEED_ASN1=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1173 | NEED_BASE64=y |
| 1174 | NEED_TLS_PRF=y |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1175 | ifdef CONFIG_TLSV12 |
| 1176 | NEED_TLS_PRF_SHA256=y |
| 1177 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1178 | NEED_MODEXP=y |
| 1179 | NEED_CIPHER=y |
| 1180 | CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT |
| 1181 | endif |
| 1182 | ifdef NEED_CIPHER |
| 1183 | NEED_DES=y |
| 1184 | OBJS += ../src/crypto/crypto_internal-cipher.o |
| 1185 | endif |
| 1186 | ifdef NEED_MODEXP |
| 1187 | OBJS += ../src/crypto/crypto_internal-modexp.o |
| 1188 | OBJS += ../src/tls/bignum.o |
| 1189 | endif |
| 1190 | ifeq ($(CONFIG_CRYPTO), libtomcrypt) |
| 1191 | OBJS += ../src/crypto/crypto_libtomcrypt.o |
| 1192 | OBJS_p += ../src/crypto/crypto_libtomcrypt.o |
| 1193 | LIBS += -ltomcrypt -ltfm |
| 1194 | LIBS_p += -ltomcrypt -ltfm |
| 1195 | CONFIG_INTERNAL_SHA256=y |
| 1196 | CONFIG_INTERNAL_RC4=y |
| 1197 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1198 | endif |
| 1199 | ifeq ($(CONFIG_CRYPTO), internal) |
| 1200 | OBJS += ../src/crypto/crypto_internal.o |
| 1201 | OBJS_p += ../src/crypto/crypto_internal.o |
| 1202 | NEED_AES_ENC=y |
| 1203 | CFLAGS += -DCONFIG_CRYPTO_INTERNAL |
| 1204 | ifdef CONFIG_INTERNAL_LIBTOMMATH |
| 1205 | CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 1206 | ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST |
| 1207 | CFLAGS += -DLTM_FAST |
| 1208 | endif |
| 1209 | else |
| 1210 | LIBS += -ltommath |
| 1211 | LIBS_p += -ltommath |
| 1212 | endif |
| 1213 | CONFIG_INTERNAL_AES=y |
| 1214 | CONFIG_INTERNAL_DES=y |
| 1215 | CONFIG_INTERNAL_SHA1=y |
| 1216 | CONFIG_INTERNAL_MD4=y |
| 1217 | CONFIG_INTERNAL_MD5=y |
| 1218 | CONFIG_INTERNAL_SHA256=y |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1219 | CONFIG_INTERNAL_SHA384=y |
| 1220 | CONFIG_INTERNAL_SHA512=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1221 | CONFIG_INTERNAL_RC4=y |
| 1222 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1223 | endif |
| 1224 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 1225 | OBJS += ../src/crypto/crypto_cryptoapi.o |
| 1226 | OBJS_p += ../src/crypto/crypto_cryptoapi.o |
| 1227 | CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI |
| 1228 | CONFIG_INTERNAL_SHA256=y |
| 1229 | CONFIG_INTERNAL_RC4=y |
| 1230 | endif |
| 1231 | endif |
| 1232 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1233 | ifeq ($(CONFIG_TLS), linux) |
| 1234 | OBJS += ../src/crypto/crypto_linux.o |
| 1235 | OBJS_p += ../src/crypto/crypto_linux.o |
| 1236 | ifdef TLS_FUNCS |
| 1237 | OBJS += ../src/crypto/crypto_internal-rsa.o |
| 1238 | OBJS += ../src/crypto/tls_internal.o |
| 1239 | OBJS += ../src/tls/tlsv1_common.o |
| 1240 | OBJS += ../src/tls/tlsv1_record.o |
| 1241 | OBJS += ../src/tls/tlsv1_cred.o |
| 1242 | OBJS += ../src/tls/tlsv1_client.o |
| 1243 | OBJS += ../src/tls/tlsv1_client_write.o |
| 1244 | OBJS += ../src/tls/tlsv1_client_read.o |
| 1245 | OBJS += ../src/tls/tlsv1_client_ocsp.o |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1246 | OBJS += ../src/tls/rsa.o |
| 1247 | OBJS += ../src/tls/x509v3.o |
| 1248 | OBJS += ../src/tls/pkcs1.o |
| 1249 | OBJS += ../src/tls/pkcs5.o |
| 1250 | OBJS += ../src/tls/pkcs8.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1251 | NEED_ASN1=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1252 | NEED_BASE64=y |
| 1253 | NEED_TLS_PRF=y |
| 1254 | ifdef CONFIG_TLSV12 |
| 1255 | NEED_TLS_PRF_SHA256=y |
| 1256 | endif |
| 1257 | NEED_MODEXP=y |
| 1258 | NEED_CIPHER=y |
| 1259 | CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT |
| 1260 | endif |
| 1261 | ifdef NEED_MODEXP |
| 1262 | OBJS += ../src/crypto/crypto_internal-modexp.o |
| 1263 | OBJS += ../src/tls/bignum.o |
| 1264 | CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 1265 | CFLAGS += -DLTM_FAST |
| 1266 | endif |
| 1267 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1268 | ifdef NEED_FIPS186_2_PRF |
| 1269 | OBJS += ../src/crypto/fips_prf_internal.o |
| 1270 | OBJS += ../src/crypto/sha1-internal.o |
| 1271 | endif |
| 1272 | endif |
| 1273 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1274 | ifeq ($(CONFIG_TLS), none) |
| 1275 | ifdef TLS_FUNCS |
| 1276 | OBJS += ../src/crypto/tls_none.o |
| 1277 | CFLAGS += -DEAP_TLS_NONE |
| 1278 | CONFIG_INTERNAL_AES=y |
| 1279 | CONFIG_INTERNAL_SHA1=y |
| 1280 | CONFIG_INTERNAL_MD5=y |
| 1281 | endif |
| 1282 | OBJS += ../src/crypto/crypto_none.o |
| 1283 | OBJS_p += ../src/crypto/crypto_none.o |
| 1284 | CONFIG_INTERNAL_SHA256=y |
| 1285 | CONFIG_INTERNAL_RC4=y |
| 1286 | endif |
| 1287 | |
| 1288 | ifdef TLS_FUNCS |
| 1289 | ifdef CONFIG_SMARTCARD |
| 1290 | ifndef CONFIG_NATIVE_WINDOWS |
| 1291 | ifneq ($(CONFIG_L2_PACKET), freebsd) |
| 1292 | LIBS += -ldl |
| 1293 | endif |
| 1294 | endif |
| 1295 | endif |
| 1296 | endif |
| 1297 | |
| 1298 | ifndef TLS_FUNCS |
| 1299 | OBJS += ../src/crypto/tls_none.o |
| 1300 | ifeq ($(CONFIG_TLS), internal) |
| 1301 | CONFIG_INTERNAL_AES=y |
| 1302 | CONFIG_INTERNAL_SHA1=y |
| 1303 | CONFIG_INTERNAL_MD5=y |
| 1304 | CONFIG_INTERNAL_RC4=y |
| 1305 | endif |
| 1306 | endif |
| 1307 | |
| 1308 | AESOBJS = # none so far (see below) |
| 1309 | ifdef CONFIG_INTERNAL_AES |
| 1310 | AESOBJS += ../src/crypto/aes-internal.o ../src/crypto/aes-internal-dec.o |
| 1311 | endif |
| 1312 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1313 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1314 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1315 | NEED_INTERNAL_AES_WRAP=y |
| 1316 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1317 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1318 | ifdef CONFIG_OPENSSL_INTERNAL_AES_WRAP |
| 1319 | # Seems to be needed at least with BoringSSL |
| 1320 | NEED_INTERNAL_AES_WRAP=y |
| 1321 | CFLAGS += -DCONFIG_OPENSSL_INTERNAL_AES_WRAP |
| 1322 | endif |
| 1323 | ifdef CONFIG_FIPS |
| 1324 | # Have to use internal AES key wrap routines to use OpenSSL EVP since the |
| 1325 | # OpenSSL AES_wrap_key()/AES_unwrap_key() API is not available in FIPS mode. |
| 1326 | NEED_INTERNAL_AES_WRAP=y |
| 1327 | endif |
| 1328 | |
| 1329 | ifdef NEED_INTERNAL_AES_WRAP |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1330 | ifneq ($(CONFIG_TLS), linux) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1331 | AESOBJS += ../src/crypto/aes-unwrap.o |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1332 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1333 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1334 | ifdef NEED_AES_EAX |
| 1335 | AESOBJS += ../src/crypto/aes-eax.o |
| 1336 | NEED_AES_CTR=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1337 | endif |
| 1338 | ifdef NEED_AES_SIV |
| 1339 | AESOBJS += ../src/crypto/aes-siv.o |
| 1340 | NEED_AES_CTR=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1341 | endif |
| 1342 | ifdef NEED_AES_CTR |
| 1343 | AESOBJS += ../src/crypto/aes-ctr.o |
| 1344 | endif |
| 1345 | ifdef NEED_AES_ENCBLOCK |
| 1346 | AESOBJS += ../src/crypto/aes-encblock.o |
| 1347 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1348 | NEED_AES_ENC=y |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1349 | ifdef CONFIG_OPENSSL_CMAC |
| 1350 | CFLAGS += -DCONFIG_OPENSSL_CMAC |
| 1351 | else |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1352 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1353 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1354 | AESOBJS += ../src/crypto/aes-omac1.o |
| 1355 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1356 | endif |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1357 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1358 | ifdef NEED_AES_WRAP |
| 1359 | NEED_AES_ENC=y |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1360 | ifdef NEED_INTERNAL_AES_WRAP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1361 | AESOBJS += ../src/crypto/aes-wrap.o |
| 1362 | endif |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1363 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1364 | ifdef NEED_AES_CBC |
| 1365 | NEED_AES_ENC=y |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 1366 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1367 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1368 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1369 | AESOBJS += ../src/crypto/aes-cbc.o |
| 1370 | endif |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 1371 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1372 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1373 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1374 | ifdef NEED_AES_ENC |
| 1375 | ifdef CONFIG_INTERNAL_AES |
| 1376 | AESOBJS += ../src/crypto/aes-internal-enc.o |
| 1377 | endif |
| 1378 | endif |
| 1379 | ifdef NEED_AES |
| 1380 | OBJS += $(AESOBJS) |
| 1381 | endif |
| 1382 | |
| 1383 | ifdef NEED_SHA1 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1384 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1385 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1386 | ifneq ($(CONFIG_TLS), gnutls) |
| 1387 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1388 | SHA1OBJS += ../src/crypto/sha1.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1389 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1390 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1391 | endif |
| 1392 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1393 | SHA1OBJS += ../src/crypto/sha1-prf.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1394 | ifdef CONFIG_INTERNAL_SHA1 |
| 1395 | SHA1OBJS += ../src/crypto/sha1-internal.o |
| 1396 | ifdef NEED_FIPS186_2_PRF |
| 1397 | SHA1OBJS += ../src/crypto/fips_prf_internal.o |
| 1398 | endif |
| 1399 | endif |
Jouni Malinen | 75ecf52 | 2011-06-27 15:19:46 -0700 | [diff] [blame] | 1400 | ifdef CONFIG_NO_WPA_PASSPHRASE |
| 1401 | CFLAGS += -DCONFIG_NO_PBKDF2 |
| 1402 | else |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1403 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1404 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1405 | SHA1OBJS += ../src/crypto/sha1-pbkdf2.o |
| 1406 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1407 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1408 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1409 | ifdef NEED_T_PRF |
| 1410 | SHA1OBJS += ../src/crypto/sha1-tprf.o |
| 1411 | endif |
| 1412 | ifdef NEED_TLS_PRF |
| 1413 | SHA1OBJS += ../src/crypto/sha1-tlsprf.o |
| 1414 | endif |
| 1415 | endif |
| 1416 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1417 | ifndef CONFIG_FIPS |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1418 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1419 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1420 | ifneq ($(CONFIG_TLS), gnutls) |
| 1421 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1422 | MD5OBJS += ../src/crypto/md5.o |
| 1423 | endif |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1424 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1425 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1426 | endif |
| 1427 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1428 | ifdef NEED_MD5 |
| 1429 | ifdef CONFIG_INTERNAL_MD5 |
| 1430 | MD5OBJS += ../src/crypto/md5-internal.o |
| 1431 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1432 | OBJS += $(MD5OBJS) |
| 1433 | OBJS_p += $(MD5OBJS) |
Dmitry Shmidt | 1d755d0 | 2015-04-28 10:34:29 -0700 | [diff] [blame] | 1434 | OBJS_priv += $(MD5OBJS) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1435 | endif |
| 1436 | |
| 1437 | ifdef NEED_MD4 |
| 1438 | ifdef CONFIG_INTERNAL_MD4 |
| 1439 | OBJS += ../src/crypto/md4-internal.o |
| 1440 | endif |
| 1441 | endif |
| 1442 | |
| 1443 | DESOBJS = # none needed when not internal |
| 1444 | ifdef NEED_DES |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1445 | ifndef CONFIG_FIPS |
| 1446 | CFLAGS += -DCONFIG_DES |
| 1447 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1448 | ifdef CONFIG_INTERNAL_DES |
| 1449 | DESOBJS += ../src/crypto/des-internal.o |
| 1450 | endif |
| 1451 | endif |
| 1452 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1453 | ifdef CONFIG_NO_RC4 |
| 1454 | CFLAGS += -DCONFIG_NO_RC4 |
| 1455 | endif |
| 1456 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1457 | ifdef NEED_RC4 |
| 1458 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1459 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1460 | OBJS += ../src/crypto/rc4.o |
| 1461 | endif |
| 1462 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1463 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1464 | |
| 1465 | SHA256OBJS = # none by default |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1466 | CFLAGS += -DCONFIG_SHA256 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1467 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1468 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1469 | ifneq ($(CONFIG_TLS), gnutls) |
| 1470 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1471 | SHA256OBJS += ../src/crypto/sha256.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1472 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1473 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1474 | endif |
| 1475 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1476 | SHA256OBJS += ../src/crypto/sha256-prf.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1477 | ifdef CONFIG_INTERNAL_SHA256 |
| 1478 | SHA256OBJS += ../src/crypto/sha256-internal.o |
| 1479 | endif |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1480 | ifdef CONFIG_INTERNAL_SHA384 |
| 1481 | CFLAGS += -DCONFIG_INTERNAL_SHA384 |
| 1482 | SHA256OBJS += ../src/crypto/sha384-internal.o |
| 1483 | endif |
| 1484 | ifdef CONFIG_INTERNAL_SHA512 |
| 1485 | CFLAGS += -DCONFIG_INTERNAL_SHA512 |
| 1486 | SHA256OBJS += ../src/crypto/sha512-internal.o |
| 1487 | endif |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1488 | ifdef NEED_TLS_PRF_SHA256 |
| 1489 | SHA256OBJS += ../src/crypto/sha256-tlsprf.o |
| 1490 | endif |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 1491 | ifdef NEED_TLS_PRF_SHA384 |
| 1492 | SHA256OBJS += ../src/crypto/sha384-tlsprf.o |
| 1493 | endif |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1494 | ifdef NEED_HMAC_SHA256_KDF |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1495 | CFLAGS += -DCONFIG_HMAC_SHA256_KDF |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1496 | OBJS += ../src/crypto/sha256-kdf.o |
| 1497 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1498 | ifdef NEED_HMAC_SHA384_KDF |
| 1499 | CFLAGS += -DCONFIG_HMAC_SHA384_KDF |
| 1500 | OBJS += ../src/crypto/sha384-kdf.o |
| 1501 | endif |
| 1502 | ifdef NEED_HMAC_SHA512_KDF |
| 1503 | CFLAGS += -DCONFIG_HMAC_SHA512_KDF |
| 1504 | OBJS += ../src/crypto/sha512-kdf.o |
| 1505 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1506 | OBJS += $(SHA256OBJS) |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1507 | ifdef NEED_SHA384 |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1508 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1509 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1510 | ifneq ($(CONFIG_TLS), gnutls) |
| 1511 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1512 | OBJS += ../src/crypto/sha384.o |
| 1513 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1514 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1515 | endif |
| 1516 | endif |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1517 | CFLAGS += -DCONFIG_SHA384 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1518 | OBJS += ../src/crypto/sha384-prf.o |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1519 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1520 | ifdef NEED_SHA512 |
| 1521 | ifneq ($(CONFIG_TLS), openssl) |
| 1522 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1523 | ifneq ($(CONFIG_TLS), gnutls) |
| 1524 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1525 | OBJS += ../src/crypto/sha512.o |
| 1526 | endif |
| 1527 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1528 | endif |
| 1529 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1530 | CFLAGS += -DCONFIG_SHA512 |
| 1531 | OBJS += ../src/crypto/sha512-prf.o |
| 1532 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1533 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1534 | ifdef NEED_ASN1 |
| 1535 | OBJS += ../src/tls/asn1.o |
| 1536 | endif |
| 1537 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1538 | ifdef NEED_DH_GROUPS |
| 1539 | OBJS += ../src/crypto/dh_groups.o |
| 1540 | endif |
| 1541 | ifdef NEED_DH_GROUPS_ALL |
| 1542 | CFLAGS += -DALL_DH_GROUPS |
| 1543 | endif |
| 1544 | ifdef CONFIG_INTERNAL_DH_GROUP5 |
| 1545 | ifdef NEED_DH_GROUPS |
| 1546 | OBJS += ../src/crypto/dh_group5.o |
| 1547 | endif |
| 1548 | endif |
| 1549 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1550 | ifdef NEED_ECC |
| 1551 | CFLAGS += -DCONFIG_ECC |
| 1552 | endif |
| 1553 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1554 | ifdef CONFIG_NO_RANDOM_POOL |
| 1555 | CFLAGS += -DCONFIG_NO_RANDOM_POOL |
| 1556 | else |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 1557 | ifdef CONFIG_GETRANDOM |
| 1558 | CFLAGS += -DCONFIG_GETRANDOM |
| 1559 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1560 | OBJS += ../src/crypto/random.o |
| 1561 | endif |
| 1562 | |
| 1563 | ifdef CONFIG_CTRL_IFACE |
| 1564 | ifeq ($(CONFIG_CTRL_IFACE), y) |
| 1565 | ifdef CONFIG_NATIVE_WINDOWS |
| 1566 | CONFIG_CTRL_IFACE=named_pipe |
| 1567 | else |
| 1568 | CONFIG_CTRL_IFACE=unix |
| 1569 | endif |
| 1570 | endif |
| 1571 | CFLAGS += -DCONFIG_CTRL_IFACE |
| 1572 | ifeq ($(CONFIG_CTRL_IFACE), unix) |
| 1573 | CFLAGS += -DCONFIG_CTRL_IFACE_UNIX |
Dmitry Shmidt | 31a29cc | 2016-03-09 15:58:17 -0800 | [diff] [blame] | 1574 | OBJS += ../src/common/ctrl_iface_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1575 | endif |
| 1576 | ifeq ($(CONFIG_CTRL_IFACE), udp) |
| 1577 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 1578 | endif |
Dmitry Shmidt | f21452a | 2014-02-26 10:55:25 -0800 | [diff] [blame] | 1579 | ifeq ($(CONFIG_CTRL_IFACE), udp6) |
| 1580 | CONFIG_CTRL_IFACE=udp |
| 1581 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 1582 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_IPV6 |
| 1583 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1584 | ifeq ($(CONFIG_CTRL_IFACE), named_pipe) |
| 1585 | CFLAGS += -DCONFIG_CTRL_IFACE_NAMED_PIPE |
| 1586 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1587 | ifeq ($(CONFIG_CTRL_IFACE), udp-remote) |
| 1588 | CONFIG_CTRL_IFACE=udp |
| 1589 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 1590 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE |
| 1591 | endif |
Dmitry Shmidt | f21452a | 2014-02-26 10:55:25 -0800 | [diff] [blame] | 1592 | ifeq ($(CONFIG_CTRL_IFACE), udp6-remote) |
| 1593 | CONFIG_CTRL_IFACE=udp |
| 1594 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 1595 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE |
| 1596 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_IPV6 |
| 1597 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1598 | OBJS += ctrl_iface.o ctrl_iface_$(CONFIG_CTRL_IFACE).o |
| 1599 | endif |
| 1600 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1601 | ifdef CONFIG_CTRL_IFACE_DBUS_NEW |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1602 | CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW |
| 1603 | OBJS += dbus/dbus_dict_helpers.o |
| 1604 | OBJS += dbus/dbus_new_helpers.o |
| 1605 | OBJS += dbus/dbus_new.o dbus/dbus_new_handlers.o |
| 1606 | OBJS += dbus/dbus_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1607 | ifdef CONFIG_WPS |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1608 | OBJS += dbus/dbus_new_handlers_wps.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1609 | endif |
Jouni Malinen | 75ecf52 | 2011-06-27 15:19:46 -0700 | [diff] [blame] | 1610 | ifdef CONFIG_P2P |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1611 | OBJS += dbus/dbus_new_handlers_p2p.o |
Jouni Malinen | 75ecf52 | 2011-06-27 15:19:46 -0700 | [diff] [blame] | 1612 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1613 | ifndef DBUS_LIBS |
Dmitry Shmidt | c55524a | 2011-07-07 11:18:38 -0700 | [diff] [blame] | 1614 | DBUS_LIBS := $(shell $(PKG_CONFIG) --libs dbus-1) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1615 | endif |
| 1616 | ifndef DBUS_INCLUDE |
Dmitry Shmidt | c55524a | 2011-07-07 11:18:38 -0700 | [diff] [blame] | 1617 | DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1618 | endif |
| 1619 | ifdef CONFIG_CTRL_IFACE_DBUS_INTRO |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1620 | OBJS += dbus/dbus_new_introspect.o |
| 1621 | CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1622 | endif |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1623 | CFLAGS += $(DBUS_INCLUDE) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1624 | LIBS += $(DBUS_LIBS) |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1625 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1626 | |
| 1627 | ifdef CONFIG_READLINE |
| 1628 | OBJS_c += ../src/utils/edit_readline.o |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1629 | LIBS_c += -lreadline -lncurses |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1630 | else |
| 1631 | ifdef CONFIG_WPA_CLI_EDIT |
| 1632 | OBJS_c += ../src/utils/edit.o |
| 1633 | else |
| 1634 | OBJS_c += ../src/utils/edit_simple.o |
| 1635 | endif |
| 1636 | endif |
| 1637 | |
| 1638 | ifdef CONFIG_NATIVE_WINDOWS |
| 1639 | CFLAGS += -DCONFIG_NATIVE_WINDOWS |
| 1640 | LIBS += -lws2_32 -lgdi32 -lcrypt32 |
| 1641 | LIBS_c += -lws2_32 |
| 1642 | LIBS_p += -lws2_32 -lgdi32 |
| 1643 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 1644 | LIBS_p += -lcrypt32 |
| 1645 | endif |
| 1646 | endif |
| 1647 | |
| 1648 | ifdef CONFIG_NO_STDOUT_DEBUG |
| 1649 | CFLAGS += -DCONFIG_NO_STDOUT_DEBUG |
| 1650 | ifndef CONFIG_CTRL_IFACE |
| 1651 | CFLAGS += -DCONFIG_NO_WPA_MSG |
| 1652 | endif |
| 1653 | endif |
| 1654 | |
| 1655 | ifdef CONFIG_IPV6 |
| 1656 | # for eapol_test only |
| 1657 | CFLAGS += -DCONFIG_IPV6 |
| 1658 | endif |
| 1659 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1660 | ifdef CONFIG_NO_LINUX_PACKET_SOCKET_WAR |
| 1661 | CFLAGS += -DCONFIG_NO_LINUX_PACKET_SOCKET_WAR |
| 1662 | endif |
| 1663 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1664 | ifdef NEED_BASE64 |
| 1665 | OBJS += ../src/utils/base64.o |
| 1666 | endif |
| 1667 | |
| 1668 | ifdef NEED_SME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1669 | OBJS += sme.o |
| 1670 | CFLAGS += -DCONFIG_SME |
| 1671 | endif |
| 1672 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1673 | OBJS += ../src/common/ieee802_11_common.o |
Dmitry Shmidt | ff787d5 | 2015-01-12 13:01:47 -0800 | [diff] [blame] | 1674 | OBJS += ../src/common/hw_features_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1675 | |
| 1676 | ifdef NEED_EAP_COMMON |
| 1677 | OBJS += ../src/eap_common/eap_common.o |
| 1678 | endif |
| 1679 | |
| 1680 | ifndef CONFIG_MAIN |
| 1681 | CONFIG_MAIN=main |
| 1682 | endif |
| 1683 | |
| 1684 | ifdef CONFIG_DEBUG_SYSLOG |
| 1685 | CFLAGS += -DCONFIG_DEBUG_SYSLOG |
| 1686 | ifdef CONFIG_DEBUG_SYSLOG_FACILITY |
| 1687 | CFLAGS += -DLOG_HOSTAPD="$(CONFIG_DEBUG_SYSLOG_FACILITY)" |
| 1688 | endif |
| 1689 | endif |
| 1690 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1691 | ifdef CONFIG_DEBUG_LINUX_TRACING |
| 1692 | CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING |
| 1693 | endif |
| 1694 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1695 | ifdef CONFIG_DEBUG_FILE |
| 1696 | CFLAGS += -DCONFIG_DEBUG_FILE |
| 1697 | endif |
| 1698 | |
| 1699 | ifdef CONFIG_DELAYED_MIC_ERROR_REPORT |
| 1700 | CFLAGS += -DCONFIG_DELAYED_MIC_ERROR_REPORT |
| 1701 | endif |
| 1702 | |
| 1703 | ifdef CONFIG_FIPS |
| 1704 | CFLAGS += -DCONFIG_FIPS |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1705 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1706 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1707 | $(error CONFIG_FIPS=y requires CONFIG_TLS=openssl) |
| 1708 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1709 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1710 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1711 | |
| 1712 | OBJS += $(SHA1OBJS) $(DESOBJS) |
| 1713 | |
| 1714 | OBJS_p += $(SHA1OBJS) |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1715 | OBJS_p += $(SHA256OBJS) |
Dmitry Shmidt | 1d755d0 | 2015-04-28 10:34:29 -0700 | [diff] [blame] | 1716 | OBJS_priv += $(SHA1OBJS) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1717 | |
| 1718 | ifdef CONFIG_BGSCAN_SIMPLE |
| 1719 | CFLAGS += -DCONFIG_BGSCAN_SIMPLE |
| 1720 | OBJS += bgscan_simple.o |
| 1721 | NEED_BGSCAN=y |
| 1722 | endif |
| 1723 | |
| 1724 | ifdef CONFIG_BGSCAN_LEARN |
| 1725 | CFLAGS += -DCONFIG_BGSCAN_LEARN |
| 1726 | OBJS += bgscan_learn.o |
| 1727 | NEED_BGSCAN=y |
| 1728 | endif |
| 1729 | |
| 1730 | ifdef NEED_BGSCAN |
| 1731 | CFLAGS += -DCONFIG_BGSCAN |
| 1732 | OBJS += bgscan.o |
| 1733 | endif |
| 1734 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1735 | ifdef CONFIG_AUTOSCAN_EXPONENTIAL |
| 1736 | CFLAGS += -DCONFIG_AUTOSCAN_EXPONENTIAL |
| 1737 | OBJS += autoscan_exponential.o |
| 1738 | NEED_AUTOSCAN=y |
| 1739 | endif |
| 1740 | |
| 1741 | ifdef CONFIG_AUTOSCAN_PERIODIC |
| 1742 | CFLAGS += -DCONFIG_AUTOSCAN_PERIODIC |
| 1743 | OBJS += autoscan_periodic.o |
| 1744 | NEED_AUTOSCAN=y |
| 1745 | endif |
| 1746 | |
| 1747 | ifdef NEED_AUTOSCAN |
| 1748 | CFLAGS += -DCONFIG_AUTOSCAN |
| 1749 | OBJS += autoscan.o |
| 1750 | endif |
| 1751 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1752 | ifdef CONFIG_EXT_PASSWORD_TEST |
| 1753 | OBJS += ../src/utils/ext_password_test.o |
| 1754 | CFLAGS += -DCONFIG_EXT_PASSWORD_TEST |
| 1755 | NEED_EXT_PASSWORD=y |
| 1756 | endif |
| 1757 | |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame^] | 1758 | ifdef CONFIG_EXT_PASSWORD_FILE |
| 1759 | OBJS += ../src/utils/ext_password_file.o |
| 1760 | CFLAGS += -DCONFIG_EXT_PASSWORD_FILE |
| 1761 | NEED_EXT_PASSWORD=y |
| 1762 | endif |
| 1763 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1764 | ifdef NEED_EXT_PASSWORD |
| 1765 | OBJS += ../src/utils/ext_password.o |
| 1766 | CFLAGS += -DCONFIG_EXT_PASSWORD |
| 1767 | endif |
| 1768 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1769 | ifdef NEED_GAS_SERVER |
| 1770 | OBJS += ../src/common/gas_server.o |
| 1771 | CFLAGS += -DCONFIG_GAS_SERVER |
| 1772 | NEED_GAS=y |
| 1773 | endif |
| 1774 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1775 | ifdef NEED_GAS |
| 1776 | OBJS += ../src/common/gas.o |
| 1777 | OBJS += gas_query.o |
| 1778 | CFLAGS += -DCONFIG_GAS |
| 1779 | NEED_OFFCHANNEL=y |
| 1780 | endif |
| 1781 | |
| 1782 | ifdef NEED_OFFCHANNEL |
| 1783 | OBJS += offchannel.o |
| 1784 | CFLAGS += -DCONFIG_OFFCHANNEL |
| 1785 | endif |
| 1786 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1787 | ifdef NEED_JSON |
| 1788 | OBJS += ../src/utils/json.o |
| 1789 | CFLAGS += -DCONFIG_JSON |
| 1790 | endif |
| 1791 | |
Dmitry Shmidt | 7175743 | 2014-06-02 13:50:35 -0700 | [diff] [blame] | 1792 | ifdef CONFIG_MODULE_TESTS |
| 1793 | CFLAGS += -DCONFIG_MODULE_TESTS |
| 1794 | OBJS += wpas_module_tests.o |
| 1795 | OBJS += ../src/utils/utils_module_tests.o |
| 1796 | OBJS += ../src/common/common_module_tests.o |
Dmitry Shmidt | ff787d5 | 2015-01-12 13:01:47 -0800 | [diff] [blame] | 1797 | OBJS += ../src/crypto/crypto_module_tests.o |
Dmitry Shmidt | 7175743 | 2014-06-02 13:50:35 -0700 | [diff] [blame] | 1798 | ifdef CONFIG_WPS |
| 1799 | OBJS += ../src/wps/wps_module_tests.o |
| 1800 | endif |
| 1801 | endif |
| 1802 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1803 | OBJS += ../src/drivers/driver_common.o |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1804 | OBJS_priv += ../src/drivers/driver_common.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1805 | |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame^] | 1806 | OBJS += wpa_supplicant.o events.o bssid_ignore.o wpas_glue.o scan.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1807 | OBJS_t := $(OBJS) $(OBJS_l2) eapol_test.o |
| 1808 | OBJS_t += ../src/radius/radius_client.o |
| 1809 | OBJS_t += ../src/radius/radius.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1810 | OBJS_t2 := $(OBJS) $(OBJS_l2) preauth_test.o |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1811 | |
| 1812 | OBJS_nfc := $(OBJS) $(OBJS_l2) nfc_pw_token.o |
| 1813 | OBJS_nfc += $(OBJS_d) ../src/drivers/drivers.o |
| 1814 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1815 | OBJS += $(CONFIG_MAIN).o |
| 1816 | |
| 1817 | ifdef CONFIG_PRIVSEP |
| 1818 | OBJS_priv += $(OBJS_d) ../src/drivers/drivers.o |
| 1819 | OBJS_priv += $(OBJS_l2) |
| 1820 | OBJS_priv += ../src/utils/os_$(CONFIG_OS).o |
| 1821 | OBJS_priv += ../src/utils/$(CONFIG_ELOOP).o |
| 1822 | OBJS_priv += ../src/utils/common.o |
| 1823 | OBJS_priv += ../src/utils/wpa_debug.o |
| 1824 | OBJS_priv += ../src/utils/wpabuf.o |
| 1825 | OBJS_priv += wpa_priv.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1826 | ifdef CONFIG_DRIVER_NL80211 |
| 1827 | OBJS_priv += ../src/common/ieee802_11_common.o |
| 1828 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1829 | OBJS += ../src/l2_packet/l2_packet_privsep.o |
| 1830 | OBJS += ../src/drivers/driver_privsep.o |
| 1831 | EXTRA_progs += wpa_priv |
| 1832 | else |
| 1833 | OBJS += $(OBJS_d) ../src/drivers/drivers.o |
| 1834 | OBJS += $(OBJS_l2) |
| 1835 | endif |
| 1836 | |
| 1837 | ifdef CONFIG_NDIS_EVENTS_INTEGRATED |
| 1838 | CFLAGS += -DCONFIG_NDIS_EVENTS_INTEGRATED |
| 1839 | OBJS += ../src/drivers/ndis_events.o |
| 1840 | EXTRALIBS += -loleaut32 -lole32 -luuid |
| 1841 | ifdef PLATFORMSDKLIB |
| 1842 | EXTRALIBS += $(PLATFORMSDKLIB)/WbemUuid.Lib |
| 1843 | else |
| 1844 | EXTRALIBS += WbemUuid.Lib |
| 1845 | endif |
| 1846 | endif |
| 1847 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1848 | ifdef CONFIG_FST |
| 1849 | CFLAGS += -DCONFIG_FST |
| 1850 | ifdef CONFIG_FST_TEST |
| 1851 | CFLAGS += -DCONFIG_FST_TEST |
| 1852 | endif |
| 1853 | FST_OBJS += ../src/fst/fst.o |
| 1854 | FST_OBJS += ../src/fst/fst_session.o |
| 1855 | FST_OBJS += ../src/fst/fst_iface.o |
| 1856 | FST_OBJS += ../src/fst/fst_group.o |
| 1857 | FST_OBJS += ../src/fst/fst_ctrl_aux.o |
| 1858 | ifdef CONFIG_CTRL_IFACE |
| 1859 | FST_OBJS += ../src/fst/fst_ctrl_iface.o |
| 1860 | endif |
| 1861 | OBJS += $(FST_OBJS) |
| 1862 | OBJS_t += $(FST_OBJS) |
| 1863 | OBJS_t2 += $(FST_OBJS) |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 1864 | OBJS_nfc += $(FST_OBJS) |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1865 | endif |
| 1866 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1867 | ifdef CONFIG_WEP |
| 1868 | CFLAGS += -DCONFIG_WEP |
| 1869 | endif |
| 1870 | |
Hai Shalom | b755a2a | 2020-04-23 21:49:02 -0700 | [diff] [blame] | 1871 | ifdef CONFIG_NO_TKIP |
| 1872 | CFLAGS += -DCONFIG_NO_TKIP |
| 1873 | endif |
| 1874 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1875 | dynamic_eap_methods: $(EAPDYN) |
| 1876 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1877 | _OBJS_VAR := OBJS_priv |
| 1878 | include ../src/objs.mk |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1879 | wpa_priv: $(BCHECK) $(OBJS_priv) |
| 1880 | $(Q)$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS) |
| 1881 | @$(E) " LD " $@ |
| 1882 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1883 | _OBJS_VAR := OBJS |
| 1884 | include ../src/objs.mk |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1885 | wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1886 | $(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS) |
| 1887 | @$(E) " LD " $@ |
| 1888 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1889 | _OBJS_VAR := OBJS_t |
| 1890 | include ../src/objs.mk |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1891 | eapol_test: $(OBJS_t) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1892 | $(Q)$(LDO) $(LDFLAGS) -o eapol_test $(OBJS_t) $(LIBS) |
| 1893 | @$(E) " LD " $@ |
| 1894 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1895 | _OBJS_VAR := OBJS_t2 |
| 1896 | include ../src/objs.mk |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1897 | preauth_test: $(OBJS_t2) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1898 | $(Q)$(LDO) $(LDFLAGS) -o preauth_test $(OBJS_t2) $(LIBS) |
| 1899 | @$(E) " LD " $@ |
| 1900 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1901 | _OBJS_VAR := OBJS_p |
| 1902 | include ../src/objs.mk |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1903 | wpa_passphrase: $(OBJS_p) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1904 | $(Q)$(LDO) $(LDFLAGS) -o wpa_passphrase $(OBJS_p) $(LIBS_p) $(LIBS) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1905 | @$(E) " LD " $@ |
| 1906 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1907 | _OBJS_VAR := OBJS_c |
| 1908 | include ../src/objs.mk |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1909 | wpa_cli: $(OBJS_c) |
| 1910 | $(Q)$(LDO) $(LDFLAGS) -o wpa_cli $(OBJS_c) $(LIBS_c) |
| 1911 | @$(E) " LD " $@ |
| 1912 | |
Dmitry Shmidt | 7f65602 | 2015-02-25 14:36:37 -0800 | [diff] [blame] | 1913 | LIBCTRL += ../src/common/wpa_ctrl.o |
| 1914 | LIBCTRL += ../src/utils/os_$(CONFIG_OS).o |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1915 | LIBCTRL += ../src/utils/common.o |
Dmitry Shmidt | 7f65602 | 2015-02-25 14:36:37 -0800 | [diff] [blame] | 1916 | LIBCTRL += ../src/utils/wpa_debug.o |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 1917 | LIBCTRLSO += ../src/common/wpa_ctrl.c |
| 1918 | LIBCTRLSO += ../src/utils/os_$(CONFIG_OS).c |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1919 | LIBCTRLSO += ../src/utils/common.c |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 1920 | LIBCTRLSO += ../src/utils/wpa_debug.c |
Dmitry Shmidt | 7f65602 | 2015-02-25 14:36:37 -0800 | [diff] [blame] | 1921 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1922 | _OBJS_VAR := LIBCTRL |
| 1923 | include ../src/objs.mk |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 1924 | libwpa_client.a: $(LIBCTRL) |
Dmitry Shmidt | 7f65602 | 2015-02-25 14:36:37 -0800 | [diff] [blame] | 1925 | $(Q)rm -f $@ |
| 1926 | $(Q)$(AR) crs $@ $? |
| 1927 | @$(E) " AR " $@ |
| 1928 | |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 1929 | libwpa_client.so: $(LIBCTRLSO) |
| 1930 | @$(E) " CC $@ ($^)" |
| 1931 | $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -fPIC $^ |
| 1932 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1933 | OBJS_wpatest := libwpa_test.o |
| 1934 | _OBJS_VAR := OBJS_wpatest |
| 1935 | include ../src/objs.mk |
| 1936 | libwpa_test1: $(OBJS_wpatest) libwpa_client.a |
| 1937 | $(Q)$(LDO) $(LDFLAGS) -o libwpa_test1 $(OBJS_wpatest) libwpa_client.a $(LIBS_c) |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1938 | @$(E) " LD " $@ |
| 1939 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1940 | libwpa_test2: $(OBJS_wpatest) libwpa_client.so |
| 1941 | $(Q)$(LDO) $(LDFLAGS) -o libwpa_test2 $(OBJS_wpatest) -L. -lwpa_client $(LIBS_c) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1942 | @$(E) " LD " $@ |
| 1943 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1944 | _OBJS_VAR := OBJS_nfc |
| 1945 | include ../src/objs.mk |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1946 | nfc_pw_token: $(OBJS_nfc) |
| 1947 | $(Q)$(LDO) $(LDFLAGS) -o nfc_pw_token $(OBJS_nfc) $(LIBS) |
| 1948 | @$(E) " LD " $@ |
| 1949 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1950 | win_if_list: win_if_list.c |
| 1951 | $(Q)$(LDO) $(LDFLAGS) -o $@ win_if_list.c $(CFLAGS) $(LIBS_w) |
| 1952 | @$(E) " LD " $@ |
| 1953 | |
| 1954 | eap_psk.so: ../src/eap_peer/eap_psk.c ../src/eap_common/eap_psk_common.c |
| 1955 | $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 1956 | -Deap_peer_psk_register=eap_peer_method_dynamic_init |
| 1957 | |
| 1958 | eap_pax.so: ../src/eap_peer/eap_pax.c ../src/eap_common/eap_pax_common.c |
| 1959 | $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 1960 | -Deap_peer_pax_register=eap_peer_method_dynamic_init |
| 1961 | |
| 1962 | eap_sake.so: ../src/eap_peer/eap_sake.c ../src/eap_common/eap_sake_common.c |
| 1963 | $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 1964 | -Deap_peer_sake_register=eap_peer_method_dynamic_init |
| 1965 | |
| 1966 | eap_wsc.so: ../src/eap_peer/eap_wsc.c ../src/eap_common/eap_wsc_common.c ../src/wps/wps.c |
| 1967 | $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 1968 | -Deap_peer_wsc_register=eap_peer_method_dynamic_init |
| 1969 | |
| 1970 | eap_ikev2.so: ../src/eap_peer/eap_ikev2.c ../src/eap_peer/ikev2.c ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.c |
| 1971 | $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 1972 | -Deap_peer_ikev2_register=eap_peer_method_dynamic_init |
| 1973 | |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 1974 | eap_eke.so: ../src/eap_peer/eap_eke.c ../src/eap_common/eap_eke_common.c |
| 1975 | $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 1976 | -Deap_peer_eke_register=eap_peer_method_dynamic_init |
| 1977 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1978 | %.so: %.c |
| 1979 | $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $< \ |
| 1980 | -D$(*F:eap_%=eap_peer_%)_register=eap_peer_method_dynamic_init |
| 1981 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1982 | %.service: %.service.in |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1983 | $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@ |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1984 | @$(E) " sed" $< |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1985 | |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 1986 | %@.service: %.service.arg.in |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1987 | $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@ |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1988 | @$(E) " sed" $< |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 1989 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1990 | wpa_supplicant.exe: wpa_supplicant |
| 1991 | mv -f $< $@ |
| 1992 | wpa_cli.exe: wpa_cli |
| 1993 | mv -f $< $@ |
| 1994 | wpa_passphrase.exe: wpa_passphrase |
| 1995 | mv -f $< $@ |
| 1996 | win_if_list.exe: win_if_list |
| 1997 | mv -f $< $@ |
| 1998 | eapol_test.exe: eapol_test |
| 1999 | mv -f $< $@ |
| 2000 | |
| 2001 | WINALL=wpa_supplicant.exe wpa_cli.exe wpa_passphrase.exe win_if_list.exe |
| 2002 | |
| 2003 | windows-bin: $(WINALL) |
| 2004 | $(STRIP) $(WINALL) |
| 2005 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 2006 | wpa_gui: |
| 2007 | @echo "wpa_gui has been removed - see wpa_gui-qt4 for replacement" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2008 | |
| 2009 | wpa_gui-qt4/Makefile: |
Dmitry Shmidt | 1d755d0 | 2015-04-28 10:34:29 -0700 | [diff] [blame] | 2010 | qmake -o wpa_gui-qt4/Makefile wpa_gui-qt4/wpa_gui.pro |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2011 | |
| 2012 | wpa_gui-qt4/lang/wpa_gui_de.qm: wpa_gui-qt4/lang/wpa_gui_de.ts |
| 2013 | lrelease wpa_gui-qt4/wpa_gui.pro |
| 2014 | |
| 2015 | wpa_gui-qt4: wpa_gui-qt4/Makefile wpa_gui-qt4/lang/wpa_gui_de.qm |
| 2016 | $(MAKE) -C wpa_gui-qt4 |
| 2017 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 2018 | FIPSDIR=/usr/local/ssl/fips-2.0 |
| 2019 | FIPSLD=$(FIPSDIR)/bin/fipsld |
| 2020 | fips: |
| 2021 | $(MAKE) CC=$(FIPSLD) FIPSLD_CC="$(CC)" |
| 2022 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2023 | .PHONY: lcov-html |
| 2024 | lcov-html: $(call BUILDOBJ,wpa_supplicant.gcda) |
| 2025 | lcov -c -d $(BUILDDIR) > lcov.info |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 2026 | genhtml lcov.info --output-directory lcov-html |
| 2027 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2028 | clean: common-clean |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2029 | $(MAKE) -C ../src clean |
| 2030 | $(MAKE) -C dbus clean |
Dmitry Shmidt | 01904cf | 2013-12-05 11:08:35 -0800 | [diff] [blame] | 2031 | rm -f core *~ *.o *.d *.gcno *.gcda *.gcov |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2032 | rm -f eap_*.so $(WINALL) eapol_test preauth_test |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2033 | rm -f wpa_priv |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 2034 | rm -f nfc_pw_token |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 2035 | rm -f lcov.info |
| 2036 | rm -rf lcov-html |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 2037 | rm -f libwpa_client.a |
| 2038 | rm -f libwpa_client.so |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 2039 | rm -f libwpa_test1 libwpa_test2 |