nmake.mak 6.6 KB

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