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