Makefile.b32 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 2000, Jaepil Kim, <pit@paradise.net.nz>.
  9. # Copyright (C) 2001 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
  10. #
  11. # This software is licensed as described in the file COPYING, which
  12. # you should have received as part of this distribution. The terms
  13. # are also available at https://curl.haxx.se/docs/copyright.html.
  14. #
  15. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  16. # copies of the Software, and permit persons to whom the Software is
  17. # furnished to do so, under the terms of the COPYING file.
  18. #
  19. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  20. # KIND, either express or implied.
  21. #
  22. #***************************************************************************
  23. ############################################################
  24. #
  25. # Makefile.b32 - Borland's C++ Compiler 5.X
  26. #
  27. # 'BCCDIR' has to be set up to point to the base directory
  28. # of the compiler, i.e. SET BCCDIR = c:\Borland\BCC55
  29. #
  30. ############################################################
  31. !if "$(__MAKE__)" == ""
  32. !error __MAKE__ not defined. Use Borlands's MAKE to process this makefile.
  33. !endif
  34. # Borland's $(MAKEDIR) expands to the path where make.exe is located,
  35. # use this feature to define BCCDIR when user has not defined BCCDIR.
  36. !ifndef BCCDIR
  37. BCCDIR = $(MAKEDIR)\..
  38. !endif
  39. # Edit the path below to point to the base of your Zlib sources.
  40. !ifndef ZLIB_PATH
  41. ZLIB_PATH = ..\..\zlib-1.2.8
  42. !endif
  43. # Edit the path below to point to the base of your OpenSSL package.
  44. !ifndef OPENSSL_PATH
  45. OPENSSL_PATH = ..\..\openssl-1.0.2a
  46. !endif
  47. # Set libcurl static lib, dll and import lib
  48. LIBCURL_LIB = libcurl.lib
  49. LIBCURL_DLL = libcurl.dll
  50. LIBCURL_IMPLIB = libcurl_imp.lib
  51. # Setup environment
  52. PP_CMD = cpp32 -q -P-
  53. CC_CMD = bcc32 -q -c
  54. LD = bcc32
  55. RM = del 2>NUL
  56. MKDIR = md
  57. RMDIR = rd /q
  58. LIB = tlib
  59. IMPLIB = implib
  60. CC_FLAGS = -5 -O2 -tWM -w -w-aus -w-ccc -w-dup -w-prc -w-pro -w-rch -w-sig -w-spa -w-inl -w-pia -w-pin -Dinline=__inline
  61. LIBFLAGS = /C /P32
  62. LDFLAGS = -q -lq -laa -tWD
  63. SRCDIR = .;.\vauth;.\vtls
  64. OBJDIR = .\BCC_objs
  65. INCDIRS = -I.;.\lib;..\include
  66. LINKLIB = $(BCCDIR)\lib\cw32mt.lib $(BCCDIR)\lib\ws2_32.lib
  67. DEFINES = -DNDEBUG -DWIN32 -DBUILDING_LIBCURL
  68. # By default SSPI support is enabled for BCC
  69. !ifndef DISABLE_SSPI
  70. DEFINES = $(DEFINES) -DUSE_WINDOWS_SSPI
  71. !endif
  72. # By default LDAP support is disabled for BCC
  73. !ifndef WITH_LDAP
  74. DEFINES = $(DEFINES) -DCURL_DISABLE_LDAP
  75. !endif
  76. # ZLIB support is enabled setting WITH_ZLIB=1
  77. !ifdef WITH_ZLIB
  78. DEFINES = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
  79. INCDIRS = $(INCDIRS);$(ZLIB_PATH)
  80. LINKLIB = $(LINKLIB) $(ZLIB_PATH)\zlib.lib
  81. !endif
  82. # SSL support is enabled setting WITH_SSL=1
  83. !ifdef WITH_SSL
  84. DEFINES = $(DEFINES) -DUSE_OPENSSL
  85. INCDIRS = $(INCDIRS);$(OPENSSL_PATH)\inc32;$(OPENSSL_PATH)\inc32\openssl
  86. LINKLIB = $(LINKLIB) $(OPENSSL_PATH)\out32\ssleay32.lib $(OPENSSL_PATH)\out32\libeay32.lib
  87. !endif
  88. .autodepend
  89. .path.c = $(SRCDIR)
  90. .path.obj = $(OBJDIR)
  91. .path.int = $(OBJDIR)
  92. # Makefile.inc provides the CSOURCES and HHEADERS defines
  93. !include Makefile.inc
  94. # Borland's command line librarian program TLIB version 4.5 is not capable
  95. # of building a library when any of its objects contains an hyphen in its
  96. # name, due to a command line parsing bug. In order to workaround this, we
  97. # build source files with hyphens in their name as objects with underscores
  98. # using explicit compilation build rules instead of implicit ones.
  99. NOHYPHEN1 = $(CSOURCES:-=_)
  100. NOHYPHEN2 = $(NOHYPHEN1:vauth/=)
  101. NOHYPHEN3 = $(NOHYPHEN2:vtls/=)
  102. OBJECTS = $(NOHYPHEN3:.c=.obj)
  103. PREPROCESSED = $(NOHYPHEN3:.c=.int)
  104. # Borland's command line compiler (BCC32) version 5.5.1 integrated
  105. # preprocessor has a bug which results in silently generating wrong
  106. # definitions for libcurl macros such as CURL_OFF_T_C, on the other
  107. # hand Borland's command line preprocessor (CPP32) version 5.5.1 does
  108. # not have the bug and achieves proper results. In order to avoid the
  109. # silent bug we first preprocess source files and later compile the
  110. # preprocessed result.
  111. .c.obj:
  112. @-$(RM) $(@R).int
  113. $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(<)
  114. $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
  115. all: $(OBJDIR) $(LIBCURL_LIB) $(LIBCURL_DLL)
  116. asyn_ares.obj: asyn-ares.c
  117. @-$(RM) $(@R).int
  118. $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?)
  119. $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
  120. asyn_thread.obj: asyn-thread.c
  121. @-$(RM) $(@R).int
  122. $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?)
  123. $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
  124. non_ascii.obj: non-ascii.c
  125. @-$(RM) $(@R).int
  126. $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?)
  127. $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
  128. clean:
  129. cd $(OBJDIR)
  130. @-$(RM) $(OBJECTS)
  131. @-$(RM) $(PREPROCESSED)
  132. cd ..
  133. @-$(RMDIR) $(OBJDIR)
  134. @-$(RM) $(LIBCURL_LIB)
  135. @-$(RM) $(LIBCURL_IMPLIB)
  136. @-$(RM) libcurl.tds
  137. $(OBJDIR):
  138. @-$(RMDIR) $(OBJDIR)
  139. @-$(MKDIR) $(OBJDIR)
  140. $(LIBCURL_LIB): $(OBJECTS)
  141. @-$(RM) $(LIBCURL_LIB)
  142. $(LIB) $(LIBFLAGS) $@ @&&!
  143. +$(**: = &^
  144. +)
  145. !
  146. $(LIBCURL_DLL) $(LIBCURL_IMPLIB): $(OBJECTS) $(LINKLIB)
  147. @-$(RM) $(LIBCURL_DLL)
  148. @-$(RM) $(LIBCURL_IMPLIB)
  149. $(LD) $(LDFLAGS) -e$(LIBCURL_DLL) @&&!
  150. $(**: = ^
  151. )
  152. !
  153. $(IMPLIB) $(LIBCURL_IMPLIB) $(LIBCURL_DLL)
  154. # End of Makefile.b32