]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.sbin/wpa/wpa_supplicant/Makefile
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / usr.sbin / wpa / wpa_supplicant / Makefile
1 # $FreeBSD$
2
3 .include "${.CURDIR}/../Makefile.inc"
4
5 .PATH.c:${WPA_SUPPLICANT_DISTDIR} \
6         ${WPA_DISTDIR}/src/drivers
7
8 PROG=   wpa_supplicant
9 SRCS=   aes-unwrap.c \
10         base64.c \
11         blacklist.c \
12         bss.c \
13         common.c \
14         config.c \
15         config_file.c \
16         ctrl_iface.c \
17         ctrl_iface_unix.c \
18         driver_ndis.c \
19         driver_wired.c \
20         drivers.c \
21         eap_register.c \
22         eloop.c \
23         events.c \
24         main.c \
25         md5.c \
26         notify.c \
27         os_unix.c \
28         peerkey.c \
29         pmksa_cache.c \
30         preauth.c \
31         scan.c \
32         sha1-pbkdf2.c \
33         sha1.c \
34         wpa.c \
35         wpa_common.c \
36         wpa_debug.c \
37         wpa_ie.c \
38         wpa_supplicant.c \
39         wpabuf.c \
40         wpas_glue.c
41 SRCS+=  driver_freebsd.c \
42         l2_packet_freebsd.c \
43         Packet32.c
44
45 MAN=    wpa_supplicant.8 wpa_supplicant.conf.5
46
47 .if ${MK_EXAMPLES} != "no"
48 FILESDIR= ${SHAREDIR}/examples/etc
49 .PATH:  ${WPA_SUPPLICANT_DISTDIR}
50 FILES=  wpa_supplicant.conf
51 .endif
52
53 CFLAGS+=-DCONFIG_BACKEND_FILE \
54         -DCONFIG_DEBUG_SYSLOG \
55         -DCONFIG_DRIVER_BSD \
56         -DCONFIG_DRIVER_NDIS \
57         -DCONFIG_DRIVER_WIRED \
58         -DCONFIG_PEERKEY \
59         -DCONFIG_SMARTCARD \
60         -DCONFIG_TERMINATE_ONLASTIF \
61         -DPKCS12_FUNCS
62 #CFLAGS+= -g
63 DPADD+= ${LIBPCAP}
64 LDADD+= -lpcap
65
66 # User customizations to the wpa_supplicant build environment
67 CFLAGS+=${WPA_SUPPLICANT_CFLAGS}
68 #DPADD+=${WPA_SUPPLICANT_DPADD}
69 LDADD+=${WPA_SUPPLICANT_LDADD}
70 #LDFLAGS+=${WPA_SUPPLICANT_LDFLAGS}
71
72 .if ${MK_WPA_SUPPLICANT_EAPOL} != "no"
73 CFLAGS+=-DEAP_GTC \
74         -DEAP_LEAP \
75         -DEAP_MD5 \
76         -DEAP_MSCHAPv2 \
77         -DEAP_OTP \
78         -DEAP_PEAP \
79         -DEAP_PSK \
80         -DEAP_TLS \
81         -DEAP_TTLS \
82         -DIEEE8021X_EAPOL
83 SRCS+=  chap.c \
84         eap.c \
85         eap_common.c \
86         eap_gtc.c \
87         eap_leap.c \
88         eap_md5.c \
89         eap_methods.c \
90         eap_mschapv2.c \
91         eap_otp.c \
92         eap_peap.c \
93         eap_peap_common.c \
94         eap_psk.c \
95         eap_psk_common.c \
96         eap_tls.c \
97         eap_tls_common.c \
98         eap_ttls.c \
99         eapol_supp_sm.c \
100         ms_funcs.c \
101         mschapv2.c
102 TLS_FUNCS=y
103 NEED_AES_EAX=y
104 NEED_AES_ENCBLOCK=y
105 NEED_AES_OMAC1=y
106 NEED_SHA256=y
107 .endif
108
109 .if !empty(CFLAGS:M*-DEAP_AKA)
110 SRCS+=  eap_aka.c
111 NEED_SIM_COMMON=y
112 NEED_AES_CBC=y
113 .endif
114
115 .if !empty(CFLAGS:M*-DEAP_SIM)
116 SRCS+=  eap_sim.c
117 NEED_SIM_COMMON=y
118 NEED_AES_CBC=y
119 .endif
120
121 .if defined(NEED_SIM_COMMON)
122 SRCS+=  eap_sim_common.c
123 NEED_FIPS186_2_PRF=y
124 .endif
125
126 # PC/SC interface for smartcards (USIM, GSM SIM)
127 # GSM/UMTS authentication algorithm (for EAP-SIM/EAP-AKA)
128 # NB: requires devel/pcsc-lite
129 #
130 # WPA_SUPPLICANT_CFLAGS=-DEAP_AKA -DPCSC_FUNCS -I/usr/local/include/PCSC
131 # WPA_SUPPLICANT_LDADD=-L/usr/local/lib
132 #
133 .if !empty(CFLAGS:M*-DPCSC_FUNCS)
134 SRCS+=  pcsc_funcs.c
135 DPADD+=${LIBPTHREAD}
136 LDADD+=-lpcsclite -lpthread
137 .endif
138
139 .if !empty(CFLAGS:M*-DEAP_GPSK)
140 CFLAGS+=-DEAP_GPSK_SHA256
141 SRCS+=  eap_gpsk.c \
142         eap_gpsk_common.c
143 NEED_AES_OMAC1=y
144 .endif
145
146 .if !empty(CFLAGS:M*-DEAP_PAX)
147 SRCS+=  eap_pax.c \
148         eap_pax_common.c
149 .endif
150
151 .if !empty(CFLAGS:M*-DEAP_SAKE)
152 SRCS+=  eap_sake.c \
153         eap_sake_common.c
154 .endif
155
156 .include "${.CURDIR}/../Makefile.crypto"
157
158 .include <bsd.prog.mk>