Makefile.vc6 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 1999 - 2009, 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. # $Id: Makefile.am,v 1.139 2008-11-03 08:50:58 bagder Exp $
  22. ###########################################################################
  23. #
  24. # Makefile for building libcurl with MSVC6
  25. #
  26. # Usage: see usage message below
  27. # Should be invoked from \lib directory
  28. # Edit the paths and desired library name
  29. # SSL path is only required if you intend compiling
  30. # with SSL.
  31. #
  32. # This make file leaves the result either a .lib or .dll file
  33. # in the \lib directory. It should be called from the \lib
  34. # directory.
  35. #
  36. # An option would have been to allow the source directory to
  37. # be specified, but I saw no requirement.
  38. #
  39. # Another option would have been to leave the .lib and .dll
  40. # files in the "cfg" directory, but then the make file
  41. # in \src would need to be changed.
  42. #
  43. ##############################################################
  44. #
  45. # Stem for static libs and DLLs
  46. #
  47. LIB_NAME = libcurl
  48. LIB_NAME_DEBUG = libcurld
  49. #
  50. # Stem for DLL import libs
  51. #
  52. IMPLIB_NAME = libcurl_imp
  53. IMPLIB_NAME_DEBUG = libcurld_imp
  54. !IFNDEF OPENSSL_PATH
  55. OPENSSL_PATH = ../../openssl-0.9.8g
  56. !ENDIF
  57. !IFNDEF ZLIB_PATH
  58. ZLIB_PATH = ../../zlib-1.2.3
  59. !ENDIF
  60. !IFNDEF MACHINE
  61. MACHINE = X86
  62. !ENDIF
  63. # USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication
  64. # without an openssl installation and offers the ability to authenticate
  65. # using the "current logged in user". Since at least with MSVC6 the sspi.h
  66. # header is broken it is either required to install the Windows SDK,
  67. # or to fix sspi.h with adding this define at the beginning of sspi.h:
  68. # #define FreeCredentialHandle FreeCredentialsHandle
  69. #
  70. # If, for some reason the Windows SDK is installed but not installed
  71. # in the default location, you can specify WINDOWS_SDK_PATH.
  72. # It can be downloaded from:
  73. # http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
  74. # WINDOWS_SSPI = 1
  75. !IFDEF WINDOWS_SSPI
  76. !IFNDEF WINDOWS_SDK_PATH
  77. WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"
  78. !ENDIF
  79. !ENDIF
  80. #############################################################
  81. ## Nothing more to do below this line!
  82. CCNODBG = cl.exe /O2 /DNDEBUG
  83. CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /GZ
  84. CFLAGSSSL = /DUSE_SSLEAY /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
  85. CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
  86. CFLAGS = /I. /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL
  87. CFLAGSLIB = /DCURL_STATICLIB
  88. LNKDLL = link.exe /DLL
  89. LNKLIB = link.exe /lib
  90. LFLAGS = /nologo /machine:$(MACHINE)
  91. SSLLIBS = libeay32.lib ssleay32.lib
  92. ZLIBLIBSDLL= zdll.lib
  93. ZLIBLIBS = zlib.lib
  94. WINLIBS = wsock32.lib wldap32.lib
  95. CFLAGS = $(CFLAGS)
  96. CFGSET = FALSE
  97. !IFDEF WINDOWS_SSPI
  98. CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
  99. !ENDIF
  100. ##############################################################
  101. # Runtime library configuration
  102. RTLIB = /MD
  103. RTLIBD = /MDd
  104. !IF "$(RTLIBCFG)" == "static"
  105. RTLIB = /MT
  106. RTLIBD = /MTd
  107. !ENDIF
  108. ######################
  109. # release
  110. !IF "$(CFG)" == "release"
  111. TARGET = $(LIB_NAME).lib
  112. DIROBJ = $(CFG)
  113. LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
  114. CC = $(CCNODBG) $(RTLIB) $(CFLAGSLIB)
  115. CFGSET = TRUE
  116. !ENDIF
  117. ######################
  118. # release-zlib
  119. !IF "$(CFG)" == "release-zlib"
  120. TARGET = $(LIB_NAME).lib
  121. DIROBJ = $(CFG)
  122. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  123. LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  124. CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB)
  125. CFGSET = TRUE
  126. !ENDIF
  127. ######################
  128. # release-dll
  129. !IF "$(CFG)" == "release-dll"
  130. TARGET = $(LIB_NAME).dll
  131. DIROBJ = $(CFG)
  132. LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
  133. CC = $(CCNODBG) $(RTLIB)
  134. CFGSET = TRUE
  135. RESOURCE = $(DIROBJ)\libcurl.res
  136. !ENDIF
  137. ######################
  138. # release-ssl
  139. !IF "$(CFG)" == "release-ssl"
  140. TARGET = $(LIB_NAME).lib
  141. DIROBJ = $(CFG)
  142. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
  143. LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
  144. CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
  145. CFGSET = TRUE
  146. !ENDIF
  147. ######################
  148. # release-ssl-dll
  149. !IF "$(CFG)" == "release-ssl-dll"
  150. TARGET = $(LIB_NAME).lib
  151. DIROBJ = $(CFG)
  152. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
  153. LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
  154. CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
  155. CFGSET = TRUE
  156. !ENDIF
  157. ######################
  158. # release-ssl-zlib
  159. !IF "$(CFG)" == "release-ssl-zlib"
  160. TARGET = $(LIB_NAME).lib
  161. DIROBJ = $(CFG)
  162. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
  163. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  164. LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  165. CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
  166. CFGSET = TRUE
  167. !ENDIF
  168. ######################
  169. # release-dll-ssl-dll
  170. !IF "$(CFG)" == "release-dll-ssl-dll"
  171. TARGET = $(LIB_NAME).dll
  172. DIROBJ = $(CFG)
  173. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
  174. LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
  175. CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)
  176. CFGSET = TRUE
  177. RESOURCE = $(DIROBJ)\libcurl.res
  178. !ENDIF
  179. ######################
  180. # release-zlib-dll
  181. !IF "$(CFG)" == "release-zlib-dll"
  182. TARGET = $(LIB_NAME).lib
  183. DIROBJ = $(CFG)
  184. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  185. LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  186. CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB)
  187. CFGSET = TRUE
  188. !ENDIF
  189. ######################
  190. # release-ssl-dll-zlib-dll
  191. !IF "$(CFG)" == "release-ssl-dll-zlib-dll"
  192. TARGET = $(LIB_NAME).lib
  193. DIROBJ = $(CFG)
  194. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  195. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
  196. LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  197. CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
  198. CFGSET = TRUE
  199. !ENDIF
  200. ######################
  201. # release-dll-zlib-dll
  202. !IF "$(CFG)" == "release-dll-zlib-dll"
  203. TARGET = $(LIB_NAME).dll
  204. DIROBJ = $(CFG)
  205. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  206. LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
  207. CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB)
  208. CFGSET = TRUE
  209. RESOURCE = $(DIROBJ)\libcurl.res
  210. !ENDIF
  211. ######################
  212. # release-dll-ssl-dll-zlib-dll
  213. !IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"
  214. TARGET = $(LIB_NAME).dll
  215. DIROBJ = $(CFG)
  216. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  217. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
  218. LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
  219. CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB)
  220. CFGSET = TRUE
  221. RESOURCE = $(DIROBJ)\libcurl.res
  222. !ENDIF
  223. ######################
  224. # debug
  225. !IF "$(CFG)" == "debug"
  226. TARGET = $(LIB_NAME_DEBUG).lib
  227. DIROBJ = $(CFG)
  228. LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
  229. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB)
  230. CFGSET = TRUE
  231. !ENDIF
  232. ######################
  233. # debug-ssl
  234. !IF "$(CFG)" == "debug-ssl"
  235. TARGET = $(LIB_NAME_DEBUG).lib
  236. DIROBJ = $(CFG)
  237. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
  238. LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
  239. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)
  240. CFGSET = TRUE
  241. !ENDIF
  242. ######################
  243. # debug-zlib
  244. !IF "$(CFG)" == "debug-zlib"
  245. TARGET = $(LIB_NAME_DEBUG).lib
  246. DIROBJ = $(CFG)
  247. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  248. LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  249. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB)
  250. CFGSET = TRUE
  251. !ENDIF
  252. ######################
  253. # debug-ssl-dll
  254. !IF "$(CFG)" == "debug-ssl-dll"
  255. TARGET = $(LIB_NAME_DEBUG).lib
  256. DIROBJ = $(CFG)
  257. LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll
  258. LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
  259. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)
  260. CFGSET = TRUE
  261. !ENDIF
  262. ######################
  263. # debug-ssl-zlib
  264. !IF "$(CFG)" == "debug-ssl-zlib"
  265. TARGET = $(LIB_NAME_DEBUG).lib
  266. DIROBJ = $(CFG)
  267. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  268. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
  269. LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  270. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
  271. CFGSET = TRUE
  272. !ENDIF
  273. ######################
  274. # debug-zlib-dll
  275. !IF "$(CFG)" == "debug-zlib-dll"
  276. TARGET = $(LIB_NAME_DEBUG).lib
  277. DIROBJ = $(CFG)
  278. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  279. LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  280. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB)
  281. CFGSET = TRUE
  282. !ENDIF
  283. ######################
  284. # debug-ssl-dll-zlib-dll
  285. !IF "$(CFG)" == "debug-ssl-dll-zlib-dll"
  286. TARGET = $(LIB_NAME_DEBUG).lib
  287. DIROBJ = $(CFG)
  288. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  289. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
  290. LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
  291. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
  292. CFGSET = TRUE
  293. !ENDIF
  294. ######################
  295. # debug-dll
  296. !IF "$(CFG)" == "debug-dll"
  297. TARGET = $(LIB_NAME_DEBUG).dll
  298. DIROBJ = $(CFG)
  299. LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
  300. CC = $(CCDEBUG) $(RTLIBD)
  301. CFGSET = TRUE
  302. RESOURCE = $(DIROBJ)\libcurl.res
  303. !ENDIF
  304. ######################
  305. # debug-dll-ssl-dll
  306. !IF "$(CFG)" == "debug-dll-ssl-dll"
  307. TARGET = $(LIB_NAME_DEBUG).dll
  308. DIROBJ = $(CFG)
  309. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
  310. LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
  311. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL)
  312. CFGSET = TRUE
  313. RESOURCE = $(DIROBJ)\libcurl.res
  314. !ENDIF
  315. ######################
  316. # debug-dll-zlib-dll
  317. !IF "$(CFG)" == "debug-dll-zlib-dll"
  318. TARGET = $(LIB_NAME_DEBUG).dll
  319. DIROBJ = $(CFG)
  320. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  321. LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
  322. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB)
  323. CFGSET = TRUE
  324. RESOURCE = $(DIROBJ)\libcurl.res
  325. !ENDIF
  326. ######################
  327. # debug-dll-ssl-dll-zlib-dll
  328. !IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll"
  329. TARGET = $(LIB_NAME_DEBUG).dll
  330. DIROBJ = $(CFG)
  331. LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
  332. LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
  333. LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
  334. CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB)
  335. CFGSET = TRUE
  336. RESOURCE = $(DIROBJ)\libcurl.res
  337. !ENDIF
  338. #######################
  339. # Usage
  340. #
  341. !IF "$(CFGSET)" == "FALSE" && "$(CFG)" != ""
  342. !MESSAGE Usage: nmake /f makefile.vc6 CFG=<config> <target>
  343. !MESSAGE where <config> is one of:
  344. !MESSAGE release - release static library
  345. !MESSAGE release-ssl - release static library with ssl
  346. !MESSAGE release-zlib - release static library with zlib
  347. !MESSAGE release-ssl-zlib - release static library with ssl and zlib
  348. !MESSAGE release-ssl-dll - release static library with dynamic ssl
  349. !MESSAGE release-zlib-dll - release static library with dynamic zlib
  350. !MESSAGE release-ssl-dll-zlib-dll - release static library with dynamic ssl and dynamic zlib
  351. !MESSAGE release-dll - release dynamic library
  352. !MESSAGE release-dll-ssl-dll - release dynamic library with dynamic ssl
  353. !MESSAGE release-dll-zlib-dll - release dynamic library with dynamic zlib
  354. !MESSAGE release-dll-ssl-dll-zlib-dll - release dynamic library with dynamic ssl and dynamic zlib
  355. !MESSAGE debug - debug static library
  356. !MESSAGE debug-ssl - debug static library with ssl
  357. !MESSAGE debug-zlib - debug static library with zlib
  358. !MESSAGE debug-ssl-zlib - debug static library with ssl and zlib
  359. !MESSAGE debug-ssl-dll - debug static library with dynamic ssl
  360. !MESSAGE debug-zlib-dll - debug static library with dynamic zlib
  361. !MESSAGE debug-ssl-dll-zlib-dll - debug static library with dynamic ssl and dynamic zlib
  362. !MESSAGE debug-dll - debug dynamic library
  363. !MESSAGE debug-dll-ssl-dll - debug dynamic library with dynamic ssl
  364. !MESSAGE debug-dll-zlib-dll - debug dynamic library with dynamic zlib1
  365. !MESSAGE debug-dll-ssl-dll-zlib-dll - debug dynamic library with dynamic ssl and dynamic zlib
  366. !MESSAGE <target> can be left blank in which case all is assumed
  367. !ERROR please choose a valid configuration "$(CFG)"
  368. !ENDIF
  369. #######################
  370. # Only the clean target can be used if a config was not provided.
  371. #
  372. !IF "$(CFGSET)" == "FALSE"
  373. clean:
  374. @-erase /s *.dll 2> NUL
  375. @-erase /s *.exp 2> NUL
  376. @-erase /s *.idb 2> NUL
  377. @-erase /s *.lib 2> NUL
  378. @-erase /s *.obj 2> NUL
  379. @-erase /s *.pch 2> NUL
  380. @-erase /s *.pdb 2> NUL
  381. @-erase /s *.res 2> NUL
  382. !ELSE
  383. # A config was provided, so the library can be built.
  384. #
  385. X_OBJS= \
  386. $(DIROBJ)\base64.obj \
  387. $(DIROBJ)\connect.obj \
  388. $(DIROBJ)\content_encoding.obj \
  389. $(DIROBJ)\cookie.obj \
  390. $(DIROBJ)\curl_addrinfo.obj \
  391. $(DIROBJ)\curl_sspi.obj \
  392. $(DIROBJ)\dict.obj \
  393. $(DIROBJ)\easy.obj \
  394. $(DIROBJ)\escape.obj \
  395. $(DIROBJ)\file.obj \
  396. $(DIROBJ)\formdata.obj \
  397. $(DIROBJ)\ftp.obj \
  398. $(DIROBJ)\getenv.obj \
  399. $(DIROBJ)\getinfo.obj \
  400. $(DIROBJ)\gtls.obj \
  401. $(DIROBJ)\hash.obj \
  402. $(DIROBJ)\hostares.obj \
  403. $(DIROBJ)\hostasyn.obj \
  404. $(DIROBJ)\hostip.obj \
  405. $(DIROBJ)\hostip4.obj \
  406. $(DIROBJ)\hostip6.obj \
  407. $(DIROBJ)\hostsyn.obj \
  408. $(DIROBJ)\hostthre.obj \
  409. $(DIROBJ)\http.obj \
  410. $(DIROBJ)\http_chunks.obj \
  411. $(DIROBJ)\http_digest.obj \
  412. $(DIROBJ)\http_negotiate.obj \
  413. $(DIROBJ)\http_ntlm.obj \
  414. $(DIROBJ)\if2ip.obj \
  415. $(DIROBJ)\inet_ntop.obj \
  416. $(DIROBJ)\inet_pton.obj \
  417. $(DIROBJ)\ldap.obj \
  418. $(DIROBJ)\llist.obj \
  419. $(DIROBJ)\md5.obj \
  420. $(DIROBJ)\memdebug.obj \
  421. $(DIROBJ)\mprintf.obj \
  422. $(DIROBJ)\multi.obj \
  423. $(DIROBJ)\netrc.obj \
  424. $(DIROBJ)\parsedate.obj \
  425. $(DIROBJ)\progress.obj \
  426. $(DIROBJ)\rawstr.obj \
  427. $(DIROBJ)\select.obj \
  428. $(DIROBJ)\sendf.obj \
  429. $(DIROBJ)\share.obj \
  430. $(DIROBJ)\socks.obj \
  431. $(DIROBJ)\socks_sspi.obj \
  432. $(DIROBJ)\speedcheck.obj \
  433. $(DIROBJ)\splay.obj \
  434. $(DIROBJ)\ssh.obj \
  435. $(DIROBJ)\sslgen.obj \
  436. $(DIROBJ)\ssluse.obj \
  437. $(DIROBJ)\strequal.obj \
  438. $(DIROBJ)\strerror.obj \
  439. $(DIROBJ)\strtok.obj \
  440. $(DIROBJ)\strtoofft.obj \
  441. $(DIROBJ)\telnet.obj \
  442. $(DIROBJ)\tftp.obj \
  443. $(DIROBJ)\timeval.obj \
  444. $(DIROBJ)\transfer.obj \
  445. $(DIROBJ)\url.obj \
  446. $(DIROBJ)\version.obj \
  447. $(RESOURCE)
  448. all : $(TARGET)
  449. $(TARGET): $(X_OBJS)
  450. $(LNK) $(LFLAGS) $(X_OBJS)
  451. -xcopy $(DIROBJ)\$(LIB_NAME).dll . /y
  452. -xcopy $(DIROBJ)\$(LIB_NAME).lib . /y
  453. -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).dll . /y
  454. -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).lib . /y
  455. -xcopy $(DIROBJ)\$(IMPLIB_NAME).lib . /y
  456. -xcopy $(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib . /y
  457. -xcopy $(DIROBJ)\*.exp . /y
  458. -xcopy $(DIROBJ)\*.pdb . /y
  459. $(X_OBJS): $(DIROBJ)
  460. $(DIROBJ):
  461. @if not exist "$(DIROBJ)" mkdir $(DIROBJ)
  462. .SUFFIXES: .c .obj .res
  463. {.\}.c{$(DIROBJ)\}.obj:
  464. $(CC) $(CFLAGS) /Fo"$@" $<
  465. debug-dll\libcurl.res \
  466. debug-dll-ssl-dll\libcurl.res \
  467. debug-dll-zlib-dll\libcurl.res \
  468. debug-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc
  469. rc /dCURLDEBUG=1 /Fo $@ libcurl.rc
  470. release-dll\libcurl.res \
  471. release-dll-ssl-dll\libcurl.res \
  472. release-dll-zlib-dll\libcurl.res \
  473. release-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc
  474. rc /dCURLDEBUG=0 /Fo $@ libcurl.rc
  475. !ENDIF # End of case where a config was provided.