Makefile.vc6 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 1999 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
  9. #
  10. # This software is licensed as described in the file COPYING, which
  11. # you should have received as part of this distribution. The terms
  12. # are also available at http://curl.haxx.se/docs/copyright.html.
  13. #
  14. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. # copies of the Software, and permit persons to whom the Software is
  16. # furnished to do so, under the terms of the COPYING file.
  17. #
  18. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. # KIND, either express or implied.
  20. #
  21. #***************************************************************************
  22. # All files in the Makefile.vc* series are generated automatically from the
  23. # one made for MSVC version 6. Alas, if you want to do changes to any of the
  24. # files and send back to the project, edit the version six, make your diff and
  25. # mail curl-library.
  26. ###########################################################################
  27. #
  28. # Makefile for building libcurl with MSVC6
  29. #
  30. # Usage: see usage message below
  31. # Should be invoked from \lib directory
  32. # Edit the paths and desired library name
  33. # SSL path is only required if you intend compiling
  34. # with SSL.
  35. #
  36. # This make file leaves the result either a .lib or .dll file
  37. # in the \lib directory. It should be called from the \lib
  38. # directory.
  39. #
  40. # An option would have been to allow the source directory to
  41. # be specified, but I saw no requirement.
  42. #
  43. # Another option would have been to leave the .lib and .dll
  44. # files in the "cfg" directory, but then the make file
  45. # in \src would need to be changed.
  46. #
  47. ##############################################################
  48. # ----------------------------------------------
  49. # Verify that current subdir is libcurl's 'lib'
  50. # ----------------------------------------------
  51. !IF ! EXIST(.\curl_addrinfo.c)
  52. ! MESSAGE Can not process this makefile from outside of libcurl's 'lib' subdirectory.
  53. ! MESSAGE Change to libcurl's 'lib' subdirectory, and try again.
  54. ! ERROR See previous message.
  55. !ENDIF
  56. # ------------------------------------------------
  57. # Makefile.msvc.names provides libcurl file names
  58. # ------------------------------------------------
  59. !INCLUDE ..\winbuild\Makefile.msvc.names
  60. !IFNDEF OPENSSL_PATH
  61. OPENSSL_PATH = ../../openssl-0.9.8zc
  62. !ENDIF
  63. !IFNDEF LIBSSH2_PATH
  64. LIBSSH2_PATH = ../../libssh2-1.4.3
  65. !ENDIF
  66. !IFNDEF ZLIB_PATH
  67. ZLIB_PATH = ../../zlib-1.2.8
  68. !ENDIF
  69. !IFNDEF MACHINE
  70. MACHINE = X86
  71. !ENDIF
  72. # USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication
  73. # without an openssl installation and offers the ability to authenticate
  74. # using the "current logged in user". Since at least with MSVC6 the sspi.h
  75. # header is broken it is either required to install the Windows SDK,
  76. # or to fix sspi.h with adding this define at the beginning of sspi.h:
  77. # #define FreeCredentialHandle FreeCredentialsHandle
  78. #
  79. # If, for some reason the Windows SDK is installed but not installed
  80. # in the default location, you can specify WINDOWS_SDK_PATH.
  81. # It can be downloaded from:
  82. # http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
  83. # WINDOWS_SSPI = 1
  84. !IFDEF WINDOWS_SSPI
  85. !IFNDEF WINDOWS_SDK_PATH
  86. WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK"
  87. !ENDIF
  88. !ENDIF
  89. #############################################################
  90. ## Nothing more to do below this line!
  91. CCNODBG = cl.exe /O2 /DNDEBUG
  92. CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /GZ
  93. CFLAGSSSL = /DUSE_SSLEAY /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
  94. CFLAGSWINSSL = /DUSE_SCHANNEL
  95. CFLAGSSSH2 = /DUSE_LIBSSH2 /DCURL_DISABLE_LDAP /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /I "$(LIBSSH2_PATH)/include"
  96. CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
  97. CFLAGS = /I. /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL /D_BIND_TO_CURRENT_VCLIBS_VERSION=1
  98. CFLAGSLIB = /DCURL_STATICLIB
  99. LNKDLL = link.exe /DLL
  100. LNKLIB = link.exe /lib
  101. LFLAGS = /nologo /machine:$(MACHINE)
  102. SSLLIBS = libeay32.lib ssleay32.lib
  103. ZLIBLIBSDLL = zdll.lib
  104. ZLIBLIBS = zlib.lib
  105. WINLIBS = ws2_32.lib wldap32.lib advapi32.lib
  106. CFLAGS = $(CFLAGS)
  107. CFGSET = FALSE
  108. !IFDEF WINDOWS_SSPI
  109. CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
  110. !ENDIF
  111. !IFDEF USE_IPV6
  112. CFLAGS = $(CFLAGS) /DUSE_IPV6
  113. !ENDIF
  114. !IFDEF USE_IDN
  115. CFLAGS = $(CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES
  116. !ENDIF
  117. ##############################################################
  118. # Runtime library configuration
  119. RTLIB = /MD
  120. RTLIBD = /MDd
  121. !IF "$(RTLIBCFG)" == "static"
  122. RTLIB = /MT
  123. RTLIBD = /MTd
  124. !ENDIF
  125. ######################
  126. # release
  127. !IF "$(CFG)" == "release"
  128. TARGET = $(LIBCURL_STA_LIB_REL)
  129. DIROBJ = $(CFG)
  130. LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
  131. CC = $(CCNODBG) $(RTLIB) $(CFLAGSLIB)
  132. CFGSET = TRUE
  133. !ENDIF
  134. ######################
  135. # release-ssl
  136. !IF "$(CFG)" == "release-ssl"
  137. TARGET = $(LIBCURL_STA_LIB_REL)
  138. DIROBJ = $(CFG)
  139. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
  140. LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
  141. CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
  142. CFGSET = TRUE
  143. !ENDIF
  144. ######################
  145. # release-winssl
  146. !IF "$(CFG)" == "release-winssl"
  147. TARGET = $(LIBCURL_STA_LIB_REL)
  148. DIROBJ = $(CFG)
  149. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  150. LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
  151. CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSLIB)
  152. CFGSET = TRUE
  153. !ENDIF
  154. ######################
  155. # release-zlib
  156. !IF "$(CFG)" == "release-zlib"
  157. TARGET = $(LIBCURL_STA_LIB_REL)
  158. DIROBJ = $(CFG)
  159. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  160. LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  161. CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB)
  162. CFGSET = TRUE
  163. !ENDIF
  164. ######################
  165. # release-ssl-zlib
  166. !IF "$(CFG)" == "release-ssl-zlib"
  167. TARGET = $(LIBCURL_STA_LIB_REL)
  168. DIROBJ = $(CFG)
  169. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
  170. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  171. LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  172. CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
  173. CFGSET = TRUE
  174. !ENDIF
  175. ######################
  176. # release-winssl-zlib
  177. !IF "$(CFG)" == "release-winssl-zlib"
  178. TARGET = $(LIBCURL_STA_LIB_REL)
  179. DIROBJ = $(CFG)
  180. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  181. LNK = $(LNKLIB) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  182. CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
  183. CFGSET = TRUE
  184. !ENDIF
  185. ######################
  186. # release-ssl-ssh2-zlib
  187. !IF "$(CFG)" == "release-ssl-ssh2-zlib"
  188. TARGET = $(LIBCURL_STA_LIB_REL)
  189. DIROBJ = $(CFG)
  190. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
  191. LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)"
  192. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  193. LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  194. CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB)
  195. CFGSET = TRUE
  196. !ENDIF
  197. ######################
  198. # release-ssl-dll
  199. !IF "$(CFG)" == "release-ssl-dll"
  200. TARGET = $(LIBCURL_STA_LIB_REL)
  201. DIROBJ = $(CFG)
  202. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
  203. LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
  204. CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
  205. CFGSET = TRUE
  206. !ENDIF
  207. ######################
  208. # release-zlib-dll
  209. !IF "$(CFG)" == "release-zlib-dll"
  210. TARGET = $(LIBCURL_STA_LIB_REL)
  211. DIROBJ = $(CFG)
  212. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  213. LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  214. CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB)
  215. CFGSET = TRUE
  216. !ENDIF
  217. ######################
  218. # release-ssl-dll-zlib-dll
  219. !IF "$(CFG)" == "release-ssl-dll-zlib-dll"
  220. TARGET = $(LIBCURL_STA_LIB_REL)
  221. DIROBJ = $(CFG)
  222. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  223. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
  224. LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  225. CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
  226. CFGSET = TRUE
  227. !ENDIF
  228. ######################
  229. # release-dll
  230. !IF "$(CFG)" == "release-dll"
  231. TARGET = $(LIBCURL_DYN_LIB_REL)
  232. DIROBJ = $(CFG)
  233. LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)
  234. CC = $(CCNODBG) $(RTLIB)
  235. CFGSET = TRUE
  236. RESOURCE = $(DIROBJ)\libcurl.res
  237. !ENDIF
  238. ######################
  239. # release-dll-ssl-dll
  240. !IF "$(CFG)" == "release-dll-ssl-dll"
  241. TARGET = $(LIBCURL_DYN_LIB_REL)
  242. DIROBJ = $(CFG)
  243. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
  244. LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)
  245. CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)
  246. CFGSET = TRUE
  247. RESOURCE = $(DIROBJ)\libcurl.res
  248. !ENDIF
  249. ######################
  250. # release-dll-zlib-dll
  251. !IF "$(CFG)" == "release-dll-zlib-dll"
  252. TARGET = $(LIBCURL_DYN_LIB_REL)
  253. DIROBJ = $(CFG)
  254. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  255. LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)
  256. CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB)
  257. CFGSET = TRUE
  258. RESOURCE = $(DIROBJ)\libcurl.res
  259. !ENDIF
  260. ######################
  261. # release-dll-ssl-dll-zlib-dll
  262. !IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"
  263. TARGET = $(LIBCURL_DYN_LIB_REL)
  264. DIROBJ = $(CFG)
  265. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  266. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
  267. LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)
  268. CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB)
  269. CFGSET = TRUE
  270. RESOURCE = $(DIROBJ)\libcurl.res
  271. !ENDIF
  272. ######################
  273. # debug
  274. !IF "$(CFG)" == "debug"
  275. TARGET = $(LIBCURL_STA_LIB_DBG)
  276. DIROBJ = $(CFG)
  277. LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
  278. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB)
  279. CFGSET = TRUE
  280. !ENDIF
  281. ######################
  282. # debug-ssl
  283. !IF "$(CFG)" == "debug-ssl"
  284. TARGET = $(LIBCURL_STA_LIB_DBG)
  285. DIROBJ = $(CFG)
  286. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
  287. LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
  288. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)
  289. CFGSET = TRUE
  290. !ENDIF
  291. ######################
  292. # debug-zlib
  293. !IF "$(CFG)" == "debug-zlib"
  294. TARGET = $(LIBCURL_STA_LIB_DBG)
  295. DIROBJ = $(CFG)
  296. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  297. LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  298. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB)
  299. CFGSET = TRUE
  300. !ENDIF
  301. ######################
  302. # debug-ssl-zlib
  303. !IF "$(CFG)" == "debug-ssl-zlib"
  304. TARGET = $(LIBCURL_STA_LIB_DBG)
  305. DIROBJ = $(CFG)
  306. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  307. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
  308. LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  309. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
  310. CFGSET = TRUE
  311. !ENDIF
  312. ######################
  313. # debug-ssl-ssh2-zlib
  314. !IF "$(CFG)" == "debug-ssl-ssh2-zlib"
  315. TARGET = $(LIBCURL_STA_LIB_DBG)
  316. DIROBJ = $(CFG)
  317. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  318. LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)"
  319. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
  320. LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  321. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB)
  322. CFGSET = TRUE
  323. !ENDIF
  324. ######################
  325. # debug-ssl-dll
  326. !IF "$(CFG)" == "debug-ssl-dll"
  327. TARGET = $(LIBCURL_STA_LIB_DBG)
  328. DIROBJ = $(CFG)
  329. LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll
  330. LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
  331. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)
  332. CFGSET = TRUE
  333. !ENDIF
  334. ######################
  335. # debug-zlib-dll
  336. !IF "$(CFG)" == "debug-zlib-dll"
  337. TARGET = $(LIBCURL_STA_LIB_DBG)
  338. DIROBJ = $(CFG)
  339. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  340. LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  341. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB)
  342. CFGSET = TRUE
  343. !ENDIF
  344. ######################
  345. # debug-ssl-dll-zlib-dll
  346. !IF "$(CFG)" == "debug-ssl-dll-zlib-dll"
  347. TARGET = $(LIBCURL_STA_LIB_DBG)
  348. DIROBJ = $(CFG)
  349. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  350. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
  351. LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  352. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
  353. CFGSET = TRUE
  354. !ENDIF
  355. ######################
  356. # debug-dll
  357. !IF "$(CFG)" == "debug-dll"
  358. TARGET = $(LIBCURL_DYN_LIB_DBG)
  359. DIROBJ = $(CFG)
  360. LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)
  361. CC = $(CCDEBUG) $(RTLIBD)
  362. CFGSET = TRUE
  363. RESOURCE = $(DIROBJ)\libcurl.res
  364. !ENDIF
  365. ######################
  366. # debug-dll-ssl-dll
  367. !IF "$(CFG)" == "debug-dll-ssl-dll"
  368. TARGET = $(LIBCURL_DYN_LIB_DBG)
  369. DIROBJ = $(CFG)
  370. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
  371. LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)
  372. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL)
  373. CFGSET = TRUE
  374. RESOURCE = $(DIROBJ)\libcurl.res
  375. !ENDIF
  376. ######################
  377. # debug-dll-zlib-dll
  378. !IF "$(CFG)" == "debug-dll-zlib-dll"
  379. TARGET = $(LIBCURL_DYN_LIB_DBG)
  380. DIROBJ = $(CFG)
  381. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  382. LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)
  383. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB)
  384. CFGSET = TRUE
  385. RESOURCE = $(DIROBJ)\libcurl.res
  386. !ENDIF
  387. ######################
  388. # debug-dll-ssl-dll-zlib-dll
  389. !IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll"
  390. TARGET = $(LIBCURL_DYN_LIB_DBG)
  391. DIROBJ = $(CFG)
  392. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  393. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
  394. LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)
  395. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB)
  396. CFGSET = TRUE
  397. RESOURCE = $(DIROBJ)\libcurl.res
  398. !ENDIF
  399. #######################
  400. # Usage
  401. #
  402. !IF "$(CFGSET)" == "FALSE" && "$(CFG)" != ""
  403. !MESSAGE Usage: nmake /f makefile.vc6 CFG=<config> <target>
  404. !MESSAGE where <config> is one of:
  405. !MESSAGE release - release static library
  406. !MESSAGE release-ssl - release static library with ssl
  407. !MESSAGE release-zlib - release static library with zlib
  408. !MESSAGE release-ssl-zlib - release static library with ssl and zlib
  409. !MESSAGE release-ssl-ssh2-zlib - release static library with ssl, ssh2 and zlib
  410. !MESSAGE release-ssl-dll - release static library with dynamic ssl
  411. !MESSAGE release-zlib-dll - release static library with dynamic zlib
  412. !MESSAGE release-ssl-dll-zlib-dll - release static library with dynamic ssl and dynamic zlib
  413. !MESSAGE release-dll - release dynamic library
  414. !MESSAGE release-dll-ssl-dll - release dynamic library with dynamic ssl
  415. !MESSAGE release-dll-zlib-dll - release dynamic library with dynamic zlib
  416. !MESSAGE release-dll-ssl-dll-zlib-dll - release dynamic library with dynamic ssl and dynamic zlib
  417. !MESSAGE debug - debug static library
  418. !MESSAGE debug-ssl - debug static library with ssl
  419. !MESSAGE debug-zlib - debug static library with zlib
  420. !MESSAGE debug-ssl-zlib - debug static library with ssl and zlib
  421. !MESSAGE debug-ssl-ssh2-zlib - debug static library with ssl, ssh2 and zlib
  422. !MESSAGE debug-ssl-dll - debug static library with dynamic ssl
  423. !MESSAGE debug-zlib-dll - debug static library with dynamic zlib
  424. !MESSAGE debug-ssl-dll-zlib-dll - debug static library with dynamic ssl and dynamic zlib
  425. !MESSAGE debug-dll - debug dynamic library
  426. !MESSAGE debug-dll-ssl-dll - debug dynamic library with dynamic ssl
  427. !MESSAGE debug-dll-zlib-dll - debug dynamic library with dynamic zlib1
  428. !MESSAGE debug-dll-ssl-dll-zlib-dll - debug dynamic library with dynamic ssl and dynamic zlib
  429. !MESSAGE <target> can be left blank in which case all is assumed
  430. !ERROR please choose a valid configuration "$(CFG)"
  431. !ENDIF
  432. #######################
  433. # Only the clean target can be used if a config was not provided.
  434. #
  435. !IF "$(CFGSET)" == "FALSE"
  436. clean:
  437. @-erase /s *.dll 2> NUL
  438. @-erase /s *.exp 2> NUL
  439. @-erase /s *.idb 2> NUL
  440. @-erase /s *.lib 2> NUL
  441. @-erase /s *.obj 2> NUL
  442. @-erase /s *.pch 2> NUL
  443. @-erase /s *.pdb 2> NUL
  444. @-erase /s *.res 2> NUL
  445. !ELSE
  446. # A config was provided, so the library can be built.
  447. #
  448. X_OBJS= \
  449. $(DIROBJ)\amigaos.obj \
  450. $(DIROBJ)\asyn-ares.obj \
  451. $(DIROBJ)\asyn-thread.obj \
  452. $(DIROBJ)\axtls.obj \
  453. $(DIROBJ)\base64.obj \
  454. $(DIROBJ)\bundles.obj \
  455. $(DIROBJ)\conncache.obj \
  456. $(DIROBJ)\connect.obj \
  457. $(DIROBJ)\content_encoding.obj \
  458. $(DIROBJ)\cookie.obj \
  459. $(DIROBJ)\curl_addrinfo.obj \
  460. $(DIROBJ)\curl_darwinssl.obj \
  461. $(DIROBJ)\curl_endian.obj \
  462. $(DIROBJ)\curl_fnmatch.obj \
  463. $(DIROBJ)\curl_gethostname.obj \
  464. $(DIROBJ)\curl_gssapi.obj \
  465. $(DIROBJ)\curl_memrchr.obj \
  466. $(DIROBJ)\curl_multibyte.obj \
  467. $(DIROBJ)\curl_ntlm.obj \
  468. $(DIROBJ)\curl_ntlm_core.obj \
  469. $(DIROBJ)\curl_ntlm_msgs.obj \
  470. $(DIROBJ)\curl_ntlm_wb.obj \
  471. $(DIROBJ)\curl_rtmp.obj \
  472. $(DIROBJ)\curl_sasl.obj \
  473. $(DIROBJ)\curl_sasl_gssapi.obj \
  474. $(DIROBJ)\curl_sasl_sspi.obj \
  475. $(DIROBJ)\curl_schannel.obj \
  476. $(DIROBJ)\curl_sspi.obj \
  477. $(DIROBJ)\curl_threads.obj \
  478. $(DIROBJ)\cyassl.obj \
  479. $(DIROBJ)\dict.obj \
  480. $(DIROBJ)\dotdot.obj \
  481. $(DIROBJ)\easy.obj \
  482. $(DIROBJ)\escape.obj \
  483. $(DIROBJ)\file.obj \
  484. $(DIROBJ)\fileinfo.obj \
  485. $(DIROBJ)\formdata.obj \
  486. $(DIROBJ)\ftp.obj \
  487. $(DIROBJ)\ftplistparser.obj \
  488. $(DIROBJ)\getenv.obj \
  489. $(DIROBJ)\getinfo.obj \
  490. $(DIROBJ)\gopher.obj \
  491. $(DIROBJ)\gtls.obj \
  492. $(DIROBJ)\hash.obj \
  493. $(DIROBJ)\hmac.obj \
  494. $(DIROBJ)\hostasyn.obj \
  495. $(DIROBJ)\hostcheck.obj \
  496. $(DIROBJ)\hostip.obj \
  497. $(DIROBJ)\hostip4.obj \
  498. $(DIROBJ)\hostip6.obj \
  499. $(DIROBJ)\hostsyn.obj \
  500. $(DIROBJ)\http.obj \
  501. $(DIROBJ)\http_chunks.obj \
  502. $(DIROBJ)\http_digest.obj \
  503. $(DIROBJ)\http_negotiate.obj \
  504. $(DIROBJ)\http_negotiate_sspi.obj \
  505. $(DIROBJ)\http_proxy.obj \
  506. $(DIROBJ)\idn_win32.obj \
  507. $(DIROBJ)\if2ip.obj \
  508. $(DIROBJ)\imap.obj \
  509. $(DIROBJ)\inet_ntop.obj \
  510. $(DIROBJ)\inet_pton.obj \
  511. $(DIROBJ)\krb5.obj \
  512. $(DIROBJ)\ldap.obj \
  513. $(DIROBJ)\llist.obj \
  514. $(DIROBJ)\md4.obj \
  515. $(DIROBJ)\md5.obj \
  516. $(DIROBJ)\memdebug.obj \
  517. $(DIROBJ)\mprintf.obj \
  518. $(DIROBJ)\multi.obj \
  519. $(DIROBJ)\netrc.obj \
  520. $(DIROBJ)\non-ascii.obj \
  521. $(DIROBJ)\nonblock.obj \
  522. $(DIROBJ)\nss.obj \
  523. $(DIROBJ)\openldap.obj \
  524. $(DIROBJ)\parsedate.obj \
  525. $(DIROBJ)\pingpong.obj \
  526. $(DIROBJ)\pipeline.obj \
  527. $(DIROBJ)\polarssl.obj \
  528. $(DIROBJ)\polarssl_threadlock.obj \
  529. $(DIROBJ)\pop3.obj \
  530. $(DIROBJ)\progress.obj \
  531. $(DIROBJ)\rawstr.obj \
  532. $(DIROBJ)\rtsp.obj \
  533. $(DIROBJ)\security.obj \
  534. $(DIROBJ)\select.obj \
  535. $(DIROBJ)\sendf.obj \
  536. $(DIROBJ)\share.obj \
  537. $(DIROBJ)\slist.obj \
  538. $(DIROBJ)\smb.obj \
  539. $(DIROBJ)\smtp.obj \
  540. $(DIROBJ)\socks.obj \
  541. $(DIROBJ)\socks_gssapi.obj \
  542. $(DIROBJ)\socks_sspi.obj \
  543. $(DIROBJ)\speedcheck.obj \
  544. $(DIROBJ)\splay.obj \
  545. $(DIROBJ)\ssh.obj \
  546. $(DIROBJ)\vtls.obj \
  547. $(DIROBJ)\openssl.obj \
  548. $(DIROBJ)\strdup.obj \
  549. $(DIROBJ)\strequal.obj \
  550. $(DIROBJ)\strerror.obj \
  551. $(DIROBJ)\strtok.obj \
  552. $(DIROBJ)\strtoofft.obj \
  553. $(DIROBJ)\telnet.obj \
  554. $(DIROBJ)\tftp.obj \
  555. $(DIROBJ)\timeval.obj \
  556. $(DIROBJ)\transfer.obj \
  557. $(DIROBJ)\url.obj \
  558. $(DIROBJ)\version.obj \
  559. $(DIROBJ)\warnless.obj \
  560. $(DIROBJ)\wildcard.obj \
  561. $(RESOURCE)
  562. all : $(TARGET)
  563. $(TARGET): $(X_OBJS)
  564. $(LNK) $(LFLAGS) $(X_OBJS)
  565. -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_REL) . /y
  566. -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_DBG) . /y
  567. -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_REL) . /y
  568. -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_DBG) . /y
  569. -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_REL) . /y
  570. -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) . /y
  571. -xcopy $(DIROBJ)\*.exp . /y
  572. -xcopy $(DIROBJ)\*.pdb . /y
  573. $(X_OBJS): $(DIROBJ)
  574. $(DIROBJ):
  575. @if not exist "$(DIROBJ)" mkdir $(DIROBJ)
  576. .SUFFIXES: .c .obj .res
  577. {.\}.c{$(DIROBJ)\}.obj:
  578. $(CC) $(CFLAGS) /Fo"$@" $<
  579. {.\vtls\}.c{$(DIROBJ)\}.obj:
  580. $(CC) $(CFLAGS) /Fo"$@" $<
  581. debug-dll\libcurl.res \
  582. debug-dll-ssl-dll\libcurl.res \
  583. debug-dll-zlib-dll\libcurl.res \
  584. debug-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc
  585. rc /dDEBUGBUILD=1 /Fo $@ libcurl.rc
  586. release-dll\libcurl.res \
  587. release-dll-ssl-dll\libcurl.res \
  588. release-dll-zlib-dll\libcurl.res \
  589. release-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc
  590. rc /dDEBUGBUILD=0 /Fo $@ libcurl.rc
  591. !ENDIF # End of case where a config was provided.