Makefile (1829d5da5355930d5cfa8ec8add8ff47dc0bebab) Makefile (cb9aecf05f87b8d9faaf4609e35da2ea523694cc)
1# $FreeBSD$
2
1# $FreeBSD$
2
3.include "${.CURDIR}/../Makefile.inc"
3WPA_SUPPLICANT_DISTDIR?= ${.CURDIR}/../../../contrib/wpa_supplicant
4.PATH: ${.CURDIR}/.. ${WPA_SUPPLICANT_DISTDIR}
4
5
5.PATH.c:${WPA_SUPPLICANT_DISTDIR} \
6 ${WPA_DISTDIR}/src/drivers \
7 ${WPA_DISTDIR}/src/eap_peer \
8 ${WPA_DISTDIR}/src/rsn_supp
9
10PROG= wpa_supplicant
6PROG= wpa_supplicant
11SRCS= aes.c aes_wrap.c blacklist.c common.c config.c ctrl_iface.c \
12 ctrl_iface_unix.c drivers.c eloop.c events.c l2_packet.c main.c \
13 md5.c preauth.c pmksa_cache.c rc4.c scan.c scan_helpers.c sha1.c \
14 wpa.c wpa_common.c wpa_debug.c wpa_ie.c wpa_supplicant.c \
15 wpabuf.c wpas_glue.c \
16 driver_ndis.c Packet32.c \
17 driver_wired.c \
18 driver_freebsd.c os_unix.c
7SRCS= config.c eloop.c common.c md5.c rc4.c sha1.c aes_wrap.c \
8 wpa_supplicant.c wpa.c \
9 ctrl_iface.c l2_packet.c drivers.c driver_freebsd.c
19
10
20MAN= wpa_supplicant.8 wpa_supplicant.conf.5
21
22.if ${MK_EXAMPLES} != "no"
23FILESDIR= ${SHAREDIR}/examples/etc
24.PATH: ${WPA_SUPPLICANT_DISTDIR}
25FILES= wpa_supplicant.conf
26.endif
27
28CFLAGS+=-I${WPA_SUPPLICANT_DISTDIR}
29CFLAGS+=-I${WPA_DISTDIR}/src/drivers
30CFLAGS+=-I${WPA_DISTDIR}/src/rsn_supp
31
11CFLAGS+= -I${.CURDIR} -I${WPA_SUPPLICANT_DISTDIR}
32CFLAGS+= -DCONFIG_DRIVER_BSD
12CFLAGS+= -DCONFIG_DRIVER_BSD
33CFLAGS+= -DCONFIG_DRIVER_NDIS
34CFLAGS+= -DCONFIG_DRIVER_WIRED
35CFLAGS+= -DCONFIG_TERMINATE_ONLASTIF
36CFLAGS+= -DCONFIG_DEBUG_SYSLOG
13CFLAGS+= -DCONFIG_CTRL_IFACE
37CFLAGS+= -g
38DPADD+= ${LIBPCAP}
39LDADD+= -lpcap
40
14CFLAGS+= -g
15DPADD+= ${LIBPCAP}
16LDADD+= -lpcap
17
41# NB: we only support wpa_supplicant.conf file
42SRCS+= config_file.c base64.c
43CFLAGS+=-DCONFIG_BACKEND_FILE
44
45# User customizations to the wpa_supplicant build environment
46CFLAGS+=${WPA_SUPPLICANT_CFLAGS}
47#DPADD+=${WPA_SUPPLICANT_DPADD}
48LDADD+=${WPA_SUPPLICANT_LDADD}
49#LDFLAGS+=${WPA_SUPPLICANT_LDFLAGS}
50
51.if ${MK_WPA_SUPPLICANT_EAPOL} != "no"
52SRCS+= eapol_supp_sm.c eap.c eap_common.c eap_methods.c
18.if defined(ENABLE_WPA_SUPPLICANT_EAPOL)
19SRCS+= eapol_sm.c eap.c
53CFLAGS+= -DIEEE8021X_EAPOL
54
20CFLAGS+= -DIEEE8021X_EAPOL
21
55.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
22.if !defined(NO_CRYPT) && !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH)
56CFLAGS+=-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK \
23CFLAGS+=-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK \
57 -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL
58SRCS+= chap.c crypto_openssl.c \
59 eap_leap.c \
60 eap_mschapv2.c \
61 eap_peap.c eap_peap_common.c \
62 eap_psk.c eap_psk_common.c \
63 eap_tls.c eap_tls_common.c \
64 mschapv2.c ms_funcs.c tls_openssl.c
24 -DEAP_TLV -DEAP_TLS_FUNCS
25SRCS+= eap_tls.c eap_peap.c eap_mschapv2.c eap_leap.c eap_psk.c \
26 eap_tlv.c eap_tls_common.c tls_openssl.c ms_funcs.c crypto.c
65
27
66CFLAGS+=-DEAP_TTLS -DEAP_MD5
67SRCS+= eap_ttls.c eap_md5.c
68
69.if !empty(CFLAGS:M*-DEAP_GTC)
70SRCS+= eap_gtc.c
71.endif
72
73.if !empty(CFLAGS:M*-DEAP_OTP)
74SRCS+= eap_otp.c
75.endif
76
77.if !empty(CFLAGS:M*-DEAP_AKA)
78NEED_SIM_COMMON= true
79SRCS+= eap_aka.c
80.endif
81
82.if !empty(CFLAGS:M*-DEAP_SIM)
83NEED_SIM_COMMON= true
84SRCS+= eap_sim.c
85.endif
86
87.if defined(NEED_SIM_COMMON)
88SRCS+= eap_sim_common.c
89
90# PC/SC interface for smartcards (USIM, GSM SIM)
91# GSM/UMTS authentication algorithm (for EAP-SIM/EAP-AKA)
92# NB: requires devel/pcsc-lite
93#
94# WPA_SUPPLICANT_CFLAGS=-DEAP_AKA -DPCSC_FUNCS -I/usr/local/include/PCSC
95# WPA_SUPPLICANT_LDADD=-L/usr/local/lib
96#
97.if !empty(CFLAGS:M*-DPCSC_FUNCS)
98SRCS+= pcsc_funcs.c
99DPADD+=${LIBPTHREAD}
100LDADD+=-lpcsclite -lpthread
101.endif
102.endif
103
104.if !empty(CFLAGS:M*-DEAP_GPSK)
105CFLAGS+=-DEAP_GPSK_SHA256
106SRCS+= eap_gpsk.c eap_gpsk_common.c
107NEED_SHA256= true
108.endif
109
110.if !empty(CFLAGS:M*-DEAP_PAX)
111SRCS+= eap_pax.c eap_pax_common.c
112.endif
113
114.if !empty(CFLAGS:M*-DEAP_SAKE)
115SRCS+= eap_sake.c eap_sake_common.c
116.endif
117
118# NB: requires patch to openssl
119#CFLAGS+= -DEAP_FAST
120#SRCS+= eap_fast.c
121
28# NB: requires patch to openssl
29#CFLAGS+= -DEAP_FAST
30#SRCS+= eap_fast.c
31
122NEED_LIBSSL= true
32DPADD+= ${LIBCRYPTO}
33LDADD+= -lssl -lcrypto
123.else
34.else
124CFLAGS+= -DEAP_TLS_NONE
125SRCS+= tls_none.c
126.endif
127
128.endif
129
35SRCS+= tls_none.c
36.endif
37
38.endif
39
130#
131# Configure crypto/cipher support.
132#
133# EAPOL support requires openssl in which case we use their
134# cipher code. Otherwise we use our internal versions.
135#
136.if !defined(NEED_LIBSSL)
137CFLAGS+= -DINTERNAL_AES
138CFLAGS+= -DINTERNAL_SHA1
139CFLAGS+= -DINTERNAL_MD5
140.else
141DPADD+= ${LIBSSL} ${LIBCRYPTO}
142LDADD+= -lssl -lcrypto
143.endif
144
145.if defined(NEED_SHA256)
146CFLAGS+=-DINTERNAL_SHA256
147SRCS+= sha256.c
148.endif
149
150.include <bsd.prog.mk>
40.include <bsd.prog.mk>