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