e32d5a7b3c4f77600838ddd39b45c570788e2257
[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 .include "${.CURDIR}/../Makefile.inc"
5
6 .PATH.c:        ${WPA_DISTDIR}/wpa_supplicant \
7                 ${WPA_DISTDIR}/src/drivers \
8                 ${WPA_DISTDIR}/src/eap_peer \
9                 ${WPA_DISTDIR}/src/rsn_supp
10
11 PROG=   wpa_supplicant
12 SRCS=   aes.c aes_wrap.c blacklist.c common.c config.c ctrl_iface.c \
13         ctrl_iface_unix.c drivers.c eloop.c events.c l2_packet.c main.c \
14         md5.c preauth.c pmksa_cache.c rc4.c scan.c scan_helpers.c sha1.c \
15         wpa.c wpa_common.c wpa_debug.c wpa_ie.c wpa_supplicant.c \
16         wpabuf.c wpas_glue.c \
17         driver_ndis.c Packet32.c \
18         driver_wired.c \
19         driver_dragonfly.c os_unix.c
20 #SRCS+= driver_wired.c.patch events.c.patch
21
22 MAN=    wpa_supplicant.8 wpa_supplicant.conf.5
23
24 CFLAGS+= -I${.CURDIR} -I${WPA_DISTDIR}
25 CFLAGS+= -I${WPA_DISTDIR}/src/drivers
26 CFLAGS+= -I${WPA_DISTDIR}/src/rsn_supp
27 CFLAGS+= -DCONFIG_DRIVER_BSD
28 CFLAGS+= -DCONFIG_DRIVER_NDIS
29 CFLAGS+= -DCONFIG_DRIVER_WIRED
30 CFLAGS+= -DCONFIG_TERMINATE_ONLASTIF
31 CFLAGS+= -g
32 DPADD+= ${LIBPCAP}
33 LDADD+= -lpcap
34
35 # NB: we only support wpa_supplicant.conf file
36 SRCS+=  config_file.c base64.c
37 CFLAGS+=-DCONFIG_BACKEND_FILE
38
39 .if !defined(NO_WPA_SUPPLICANT_EAPOL)
40 .PATH: ${.CURDIR}/.. ${WPA_DISTDIR}/src/eapol_supp
41 .PATH: ${.CURDIR}/.. ${WPA_DISTDIR}/src/eap_peer
42 SRCS+=  eapol_supp_sm.c eap.c eap_common.c eap_methods.c
43 CFLAGS+= -DIEEE8021X_EAPOL
44
45 .if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
46 .PATH:  ${.CURDIR}/.. ${WPA_DISTDIR}/src/eap_common
47 .PATH:  ${.CURDIR}/.. ${WPA_DISTDIR}/eap_peer/
48 CFLAGS+=-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK \
49         -DEAP_TLV -DEAP_TLS_FUNCS
50 SRCS+=  chap.c crypto_openssl.c \
51         eap_leap.c \
52         eap_mschapv2.c \
53         eap_peap.c eap_peap_common.c \
54         eap_psk.c eap_psk_common.c \
55         eap_tls.c eap_tls_common.c \
56         mschapv2.c ms_funcs.c tls_openssl.c
57
58 CFLAGS+=-DEAP_TTLS -DEAP_MD5
59 SRCS+=  eap_ttls.c eap_md5.c
60
61 .if !empty(CFLAGS:M*-DEAP_GTC)
62 SRCS+=  eap_gtc.c
63 .endif
64
65 # NB: requires patch to openssl
66 #CFLAGS+= -DEAP_FAST
67 #SRCS+= eap_fast.c
68
69 DPADD+= ${LIBSSL} ${LIBCRYPTO}
70 LDADD+= -lssl -lcrypto
71 .else
72 SRCS+=  tls_none.c
73 .endif
74
75 .endif
76
77 .include <bsd.prog.mk>