Makefile.b32 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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 program's name
  48. PROGNAME = curl.exe
  49. # Setup environment
  50. PP_CMD = cpp32 -q -P-
  51. CC_CMD = bcc32 -q -c
  52. LD = bcc32
  53. RM = del 2>NUL
  54. MKDIR = md
  55. RMDIR = rd /q 2>NUL
  56. COPY = $(COMSPEC) /c copy /y
  57. 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
  58. LDFLAGS = -q -lq -lap
  59. SRCDIRS = .;..\lib
  60. OBJDIR = .\BCC_objs
  61. INCDIRS = -I.;..\include;..\lib
  62. LINKLIB = $(BCCDIR)\lib\cw32mt.lib $(BCCDIR)\lib\ws2_32.lib
  63. DEFINES = -DNDEBUG -DWIN32
  64. !ifdef DYNAMIC
  65. LIBCURL_LIB = ..\lib\libcurl_imp.lib
  66. !else
  67. LIBCURL_LIB = ..\lib\libcurl.lib
  68. DEFINES = $(DEFINES) -DCURL_STATICLIB
  69. !endif
  70. # ZLIB support is enabled setting WITH_ZLIB=1
  71. !ifdef WITH_ZLIB
  72. DEFINES = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
  73. INCDIRS = $(INCDIRS);$(ZLIB_PATH)
  74. LINKLIB = $(LINKLIB) $(ZLIB_PATH)\zlib.lib
  75. !endif
  76. # SSL support is enabled setting WITH_SSL=1
  77. !ifdef WITH_SSL
  78. DEFINES = $(DEFINES) -DUSE_OPENSSL
  79. INCDIRS = $(INCDIRS);$(OPENSSL_PATH)\inc32;$(OPENSSL_PATH)\inc32\openssl
  80. LINKLIB = $(LINKLIB) $(OPENSSL_PATH)\out32\ssleay32.lib $(OPENSSL_PATH)\out32\libeay32.lib
  81. !endif
  82. .autodepend
  83. .path.c = $(SRCDIRS)
  84. .path.obj = $(OBJDIR)
  85. .path.int = $(OBJDIR)
  86. # Makefile.inc provides the CSOURCES and HHEADERS defines
  87. !include Makefile.inc
  88. CSOURCES = $(CURL_CFILES) $(CURLX_CFILES:../lib/=)
  89. OBJECTS = $(CSOURCES:.c=.obj)
  90. PREPROCESSED = $(CSOURCES:.c=.int)
  91. # Borland's command line compiler (BCC32) version 5.5.1 integrated
  92. # preprocessor has a bug which results in silently generating wrong
  93. # definitions for libcurl macros such as CURL_OFF_T_C, on the other
  94. # hand Borland's command line preprocessor (CPP32) version 5.5.1 does
  95. # not have the bug and achieves proper results. In order to avoid the
  96. # silent bug we first preprocess source files and later compile the
  97. # preprocessed result.
  98. .c.obj:
  99. @-$(RM) $(@R).int
  100. $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(<)
  101. $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
  102. all: $(OBJDIR) tool_hugehelp $(PROGNAME)
  103. clean:
  104. cd $(OBJDIR)
  105. @-$(RM) $(OBJECTS)
  106. @-$(RM) $(PREPROCESSED)
  107. cd ..
  108. @-$(RMDIR) $(OBJDIR)
  109. @-$(RM) $(PROGNAME)
  110. @-$(RM) curl.tds
  111. $(OBJDIR):
  112. @-$(RMDIR) $(OBJDIR)
  113. @-$(MKDIR) $(OBJDIR)
  114. !ifdef WITH_ZLIB
  115. tool_hugehelp: ..\docs\MANUAL ..\docs\curl.1 mkhelp.pl
  116. groff -Tascii -man -P -c ../docs/curl.1 > tool_hugehelp.tmp
  117. perl -w mkhelp.pl -c ../docs/MANUAL < tool_hugehelp.tmp > tool_hugehelp.c
  118. @-$(RM) tool_hugehelp.tmp
  119. !else
  120. tool_hugehelp:
  121. if exist ..\GIT-INFO $(COPY) tool_hugehelp.c.cvs tool_hugehelp.c
  122. !endif
  123. $(PROGNAME): $(OBJECTS) $(LIBCURL_LIB) $(LINKLIB)
  124. @-$(RM) $(PROGNAME)
  125. $(LD) $(LDFLAGS) -e$@ @&&!
  126. $(**: = ^
  127. )
  128. !
  129. # End of Makefile.b32