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