1 # Makefile for Microsoft nmake to build wpa_supplicant
3 # This can be run in Visual Studio 2005 Command Prompt
5 # Note: Make sure that cl.exe is configured to include Platform SDK
6 # include and lib directories (vsvars32.bat)
8 all: wpa_supplicant.exe wpa_cli.exe wpa_passphrase.exe wpasvc.exe win_if_list.exe
10 # Root directory for WinPcap developer's pack
11 # (http://www.winpcap.org/install/bin/WpdPack_3_1.zip)
12 WINPCAPDIR
=C
:\dev\WpdPack
14 # Root directory for OpenSSL
15 # (http://www.openssl.org/source/openssl-0.9.8a.tar.gz)
16 # Build and installed following instructions in INSTALL.W32
17 # Note: If EAP-FAST is included in the build, OpenSSL needs to be patched to
18 # support it (openssl-tls-extensions.patch)
19 # Alternatively, see README-Windows.txt for information about binary
20 # installation package for OpenSSL.
21 OPENSSLDIR
=C
:\dev\openssl
26 CFLAGS
= /DCONFIG_NATIVE_WINDOWS
27 CFLAGS
= $(CFLAGS
) /DCONFIG_NDIS_EVENTS_INTEGRATED
28 CFLAGS
= $(CFLAGS
) /DCONFIG_ANSI_C_EXTRA
29 CFLAGS
= $(CFLAGS
) /DCONFIG_WINPCAP
30 CFLAGS
= $(CFLAGS
) /DIEEE8021X_EAPOL
31 CFLAGS
= $(CFLAGS
) /DEAP_TLS_FUNCS
32 CFLAGS
= $(CFLAGS
) /DPKCS12_FUNCS
33 CFLAGS
= $(CFLAGS
) /DEAP_MD5
34 CFLAGS
= $(CFLAGS
) /DEAP_TLS
35 CFLAGS
= $(CFLAGS
) /DEAP_MSCHAPv2
36 CFLAGS
= $(CFLAGS
) /DEAP_PEAP
37 CFLAGS
= $(CFLAGS
) /DEAP_TTLS
38 CFLAGS
= $(CFLAGS
) /DEAP_GTC
39 CFLAGS
= $(CFLAGS
) /DEAP_OTP
40 CFLAGS
= $(CFLAGS
) /DEAP_SIM
41 CFLAGS
= $(CFLAGS
) /DEAP_LEAP
42 CFLAGS
= $(CFLAGS
) /DEAP_PSK
43 CFLAGS
= $(CFLAGS
) /DEAP_AKA
44 #CFLAGS = $(CFLAGS) /DEAP_FAST
45 CFLAGS
= $(CFLAGS
) /DEAP_PAX
46 CFLAGS
= $(CFLAGS
) /DEAP_TNC
47 CFLAGS
= $(CFLAGS
) /DPCSC_FUNCS
48 CFLAGS
= $(CFLAGS
) /DCONFIG_CTRL_IFACE
49 CFLAGS
= $(CFLAGS
) /DCONFIG_CTRL_IFACE_NAMED_PIPE
50 CFLAGS
= $(CFLAGS
) /DCONFIG_DRIVER_NDIS
51 CFLAGS
= $(CFLAGS
) /I..\src
/I..\src\utils
/I..\src\common
/I..\src\crypto
52 CFLAGS
= $(CFLAGS
) /I..\src
\rsn_supp
/I..\src\eapol_supp
/I.
53 CFLAGS
= $(CFLAGS
) /DWIN32
54 CFLAGS
= $(CFLAGS
) /Fo
$(OBJDIR
)\\ /c
55 CFLAGS
= $(CFLAGS
) /W3
57 #CFLAGS = $(CFLAGS) /WX
59 # VS 2005 complains about lot of deprecated string functions; let's ignore them
60 # at least for now since snprintf and strncpy can be used in a safe way
61 CFLAGS
= $(CFLAGS
) /D_CRT_SECURE_NO_DEPRECATE
64 $(OBJDIR
)\os_win32.obj \
65 $(OBJDIR
)\eloop_win.obj \
69 $(OBJDIR
)\aes_wrap.obj \
70 $(OBJDIR
)\common.obj \
71 $(OBJDIR
)\wpa_debug.obj \
72 $(OBJDIR
)\wpabuf.obj \
73 $(OBJDIR
)\wpa_supplicant.obj \
75 $(OBJDIR
)\wpa_common.obj \
76 $(OBJDIR
)\wpa_ie.obj \
77 $(OBJDIR
)\preauth.obj \
78 $(OBJDIR
)\pmksa_cache.obj \
79 $(OBJDIR
)\eapol_supp_sm.obj \
81 $(OBJDIR
)\eap_common.obj \
83 $(OBJDIR
)\eap_methods.obj \
84 $(OBJDIR
)\eap_tlv.obj \
85 $(OBJDIR
)\eap_md5.obj \
86 $(OBJDIR
)\eap_tls.obj \
87 $(OBJDIR
)\eap_tls_common.obj \
88 $(OBJDIR
)\eap_mschapv2.obj \
89 $(OBJDIR
)\eap_peap.obj \
90 $(OBJDIR
)\eap_ttls.obj \
91 $(OBJDIR
)\eap_gtc.obj \
92 $(OBJDIR
)\eap_otp.obj \
93 $(OBJDIR
)\eap_leap.obj \
94 $(OBJDIR
)\eap_sim.obj \
95 $(OBJDIR
)\eap_sim_common.obj \
96 $(OBJDIR
)\eap_aka.obj \
97 $(OBJDIR
)\eap_pax.obj \
98 $(OBJDIR
)\eap_pax_common.obj \
99 $(OBJDIR
)\eap_psk.obj \
100 $(OBJDIR
)\eap_psk_common.obj \
101 $(OBJDIR
)\eap_tnc.obj \
103 $(OBJDIR
)\base
64.obj \
104 $(OBJDIR
)\ctrl_iface.obj \
105 $(OBJDIR
)\ctrl_iface_named_pipe.obj \
106 $(OBJDIR
)\driver_ndis.obj \
107 $(OBJDIR
)\driver_ndis_.obj \
108 $(OBJDIR
)\scan_helpers.obj \
109 $(OBJDIR
)\events.obj \
110 $(OBJDIR
)\blacklist.obj \
112 $(OBJDIR
)\wpas_glue.obj \
113 $(OBJDIR
)\config.obj \
114 $(OBJDIR
)\l2_packet_winpcap.obj \
115 $(OBJDIR
)\tls_openssl.obj \
116 $(OBJDIR
)\ms_funcs.obj \
117 $(OBJDIR
)\crypto_openssl.obj \
118 $(OBJDIR
)\pcsc_funcs.obj \
119 $(OBJDIR
)\ndis_events.obj
121 # OBJS = $(OBJS) $(OBJDIR)\eap_fast.obj
124 $(OBJDIR
)\eapol_test.obj \
125 $(OBJDIR
)\radius.obj \
126 $(OBJDIR
)\radius_client.obj \
127 $(OBJDIR
)\config_file.obj
$(OBJDIR
)\base
64.obj
130 $(OBJDIR
)\preauth_test.obj \
131 $(OBJDIR
)\config_file.obj
$(OBJDIR
)\base
64.obj
133 OBJS2
= $(OBJDIR
)\drivers.obj \
134 $(OBJDIR
)\config_file.obj \
135 $(OBJS2
) $(OBJDIR
)\main.obj
137 OBJS3
= $(OBJDIR
)\drivers.obj \
138 $(OBJDIR
)\config_winreg.obj \
139 $(OBJS3
) $(OBJDIR
)\main_winsvc.obj
142 $(OBJDIR
)\os_win32.obj \
143 $(OBJDIR
)\wpa_cli.obj \
144 $(OBJDIR
)\wpa_ctrl.obj \
148 $(OBJDIR
)\os_win32.obj \
149 $(OBJDIR
)\common.obj \
152 $(OBJDIR
)\crypto_openssl.obj \
153 $(OBJDIR
)\wpa_passphrase.obj
155 LIBS
= wbemuuid.lib libcmt.lib kernel32.lib uuid.lib ole32.lib oleaut32.lib \
156 ws2_32.lib Advapi32.lib Crypt32.lib Winscard.lib \
157 Packet.lib wpcap.lib \
158 libeay32.lib ssleay32.lib
159 # If using Win32 OpenSSL binary installation from Shining Light Productions,
160 # replace the last line with this for dynamic libraries
161 # libeay32MT.lib ssleay32MT.lib
162 # and this for static libraries
163 # libeay32MT.lib ssleay32MT.lib Gdi32.lib User32.lib
165 CFLAGS
= $(CFLAGS
) /I
"$(WINPCAPDIR)/Include" /I
"$(OPENSSLDIR)\include"
166 LFLAGS
= /libpath
:"$(WINPCAPDIR)\Lib" /libpath
:"$(OPENSSLDIR)\lib"
168 wpa_supplicant.exe
: $(OBJDIR
) $(OBJS
) $(OBJS2
)
169 link.exe
/out
:wpa_supplicant.exe
$(LFLAGS
) $(OBJS
) $(OBJS2
) $(LIBS
)
171 wpasvc.exe
: $(OBJDIR
) $(OBJS
) $(OBJS3
)
172 link.exe
/out
:wpasvc.exe
$(LFLAGS
) $(OBJS
) $(OBJS3
) $(LIBS
)
174 wpa_cli.exe
: $(OBJDIR
) $(OBJS_c
)
175 link.exe
/out
:wpa_cli.exe
$(LFLAGS
) $(OBJS_c
) $(LIBS
)
177 wpa_passphrase.exe
: $(OBJDIR
) $(OBJS_p
)
178 link.exe
/out
:wpa_passphrase.exe
$(LFLAGS
) $(OBJS_p
) $(LIBS
)
180 eapol_test.exe
: $(OBJDIR
) $(OBJS_t
)
181 link.exe
/out
:eapol_test.exe
$(LFLAGS
) $(OBJS_t
) $(LIBS
)
183 preauth_test.exe
: $(OBJDIR
) $(OBJS_t2
)
184 link.exe
/out
:preauth_test.exe
$(LFLAGS
) $(OBJS_t2
) $(LIBS
)
186 win_if_list.exe
: $(OBJDIR
) $(OBJDIR
)\win_if_list.obj
187 link.exe
/out
:win_if_list.exe
$(LFLAGS
) $(OBJDIR
)\win_if_list.obj
$(LIBS
)
190 {..\src\utils
}.c
{$(OBJDIR
)}.obj
::
193 {..\src\common
}.c
{$(OBJDIR
)}.obj
::
196 {..\src
\rsn_supp
}.c
{$(OBJDIR
)}.obj
::
199 {..\src\eapol_supp
}.c
{$(OBJDIR
)}.obj
::
202 {..\src\crypto
}.c
{$(OBJDIR
)}.obj
::
205 {..\src\eap_peer
}.c
{$(OBJDIR
)}.obj
::
208 {..\src\eap_common
}.c
{$(OBJDIR
)}.obj
::
211 {..\src\drivers
}.c
{$(OBJDIR
)}.obj
::
214 {..\src\l2_packet
}.c
{$(OBJDIR
)}.obj
::
217 {.\
}.c
{$(OBJDIR
)}.obj
::
220 {.\
}.
cpp{$(OBJDIR
)}.obj
::
224 if not exist
"$(OBJDIR)" mkdir
"$(OBJDIR)"
227 erase
$(OBJDIR
)\
*.obj wpa_supplicant.exe