Merge branch 'vendor/LIBPCAP'
[dragonfly.git] / usr.sbin / 802_11 / wpa_supplicant / Makefile
1 # $FreeBSD: src/usr.sbin/wpa/wpa_supplicant/Makefile,v 1.9 2007/07/11 16:04:08 sam Exp $
2 # $DragonFly: src/usr.sbin/802_11/wpa_supplicant/Makefile,v 1.2 2007/08/07 11:25:36 sephe Exp $
3
4 CONTRIBDIR= ${.CURDIR}/../../../contrib/wpa_supplicant-0.5.8
5 .PATH:  ${.CURDIR}/.. ${CONTRIBDIR}
6
7 PROG=   wpa_supplicant
8 SRCS=   config.c eloop.c common.c md5.c rc4.c sha1.c aes_wrap.c \
9         wpa_supplicant.c events.c wpa.c preauth.c pmksa_cache.c \
10         ctrl_iface.c ctrl_iface_unix.c l2_packet.c main.c drivers.c \
11         Packet32.c os_unix.c
12 SRCS+=  driver_dragonfly.c driver_wired.c driver_ndis.c
13 SRCS+=  os_unix.c.patch driver_wired.c.patch events.c.patch
14
15 MAN=    wpa_supplicant.8 wpa_supplicant.conf.5
16
17 CFLAGS+= -I${.CURDIR} -I${CONTRIBDIR}
18 CFLAGS+= -DCONFIG_DRIVER_BSD
19 CFLAGS+= -DCONFIG_DRIVER_NDIS
20 CFLAGS+= -DCONFIG_DRIVER_WIRED
21 CFLAGS+= -DCONFIG_CTRL_IFACE
22 CFLAGS+= -DCONFIG_CTRL_IFACE_UNIX
23 CFLAGS+= -DCONFIG_TERMINATE_ONLASTIF
24 CFLAGS+= -g
25 DPADD+= ${LIBPCAP}
26 LDADD+= -lpcap
27
28 # NB: we only support wpa_supplicant.conf file
29 SRCS+=  config_file.c base64.c
30 CFLAGS+=-DCONFIG_BACKEND_FILE
31
32 .if !defined(NO_WPA_SUPPLICANT_EAPOL)
33 SRCS+=  eapol_sm.c eap.c eap_methods.c
34 CFLAGS+= -DIEEE8021X_EAPOL
35
36 .if !defined(NO_CRYPT) && !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH)
37 CFLAGS+=-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK \
38         -DEAP_TLV -DEAP_TLS_FUNCS
39 SRCS+=  eap_tls.c eap_peap.c eap_mschapv2.c eap_leap.c \
40         eap_psk.c eap_psk_common.c \
41         eap_tlv.c eap_tls_common.c tls_openssl.c ms_funcs.c crypto.c
42
43 CFLAGS+=-DEAP_TTLS -DEAP_MD5
44 SRCS+=  eap_ttls.c eap_md5.c
45
46 # NB: requires patch to openssl
47 #CFLAGS+= -DEAP_FAST
48 #SRCS+= eap_fast.c
49
50 DPADD+= ${LIBSSL} ${LIBCRYPTO}
51 LDADD+= -lssl -lcrypto
52 .else
53 SRCS+=  tls_none.c
54 .endif
55
56 .endif
57
58 .include <bsd.prog.mk>