1 #***************************************************************************
3 # Project ___| | | | _ \| |
5 # | (__| |_| | _ <| |___
6 # \___|\___/|_| \_\_____|
8 # Copyright (C) 2000, Jaepil Kim, <pit@paradise.net.nz>.
9 # Copyright (C) 2001 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
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.
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.
19 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 # KIND, either express or implied.
22 #***************************************************************************
24 ############################################################
26 # Makefile.b32 - Borland's C++ Compiler 5.X
28 # 'BCCDIR' has to be set up to point to the base directory
29 # of the compiler, i.e. SET BCCDIR = c:\Borland\BCC55
31 ############################################################
33 !if "$(__MAKE__)" == ""
34 !error __MAKE__ not defined. Use Borlands's MAKE to process this makefile.
37 # Borland's $(MAKEDIR) expands to the path where make.exe is located,
38 # use this feature to define BCCDIR when user has not defined BCCDIR.
40 BCCDIR = $(MAKEDIR)\..
43 # Edit the path below to point to the base of your Zlib sources.
45 ZLIB_PATH = ..\..\zlib-1.2.8
48 # Edit the path below to point to the base of your OpenSSL package.
50 OPENSSL_PATH = ..\..\openssl-1.0.2a
63 COPY = $(COMSPEC) /c copy /y
65 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
70 INCDIRS = -I.;..\include;..\lib
71 LINKLIB = $(BCCDIR)\lib\cw32mt.lib $(BCCDIR)\lib\ws2_32.lib
72 DEFINES = -DNDEBUG -DWIN32
75 LIBCURL_LIB = ..\lib\libcurl_imp.lib
77 LIBCURL_LIB = ..\lib\libcurl.lib
78 DEFINES = $(DEFINES) -DCURL_STATICLIB
81 # ZLIB support is enabled setting WITH_ZLIB=1
83 DEFINES = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
84 INCDIRS = $(INCDIRS);$(ZLIB_PATH)
85 LINKLIB = $(LINKLIB) $(ZLIB_PATH)\zlib.lib
88 # SSL support is enabled setting WITH_SSL=1
90 DEFINES = $(DEFINES) -DUSE_OPENSSL
91 INCDIRS = $(INCDIRS);$(OPENSSL_PATH)\inc32;$(OPENSSL_PATH)\inc32\openssl
92 LINKLIB = $(LINKLIB) $(OPENSSL_PATH)\out32\ssleay32.lib $(OPENSSL_PATH)\out32\libeay32.lib
101 # Makefile.inc provides the CSOURCES and HHEADERS defines
102 !include Makefile.inc
104 CSOURCES = $(CURL_CFILES) $(CURLX_CFILES:../lib/=)
105 OBJECTS = $(CSOURCES:.c=.obj)
106 PREPROCESSED = $(CSOURCES:.c=.int)
108 # Borland's command line compiler (BCC32) version 5.5.1 integrated
109 # preprocessor has a bug which results in silently generating wrong
110 # definitions for libcurl macros such as CURL_OFF_T_C, on the other
111 # hand Borland's command line preprocessor (CPP32) version 5.5.1 does
112 # not have the bug and achieves proper results. In order to avoid the
113 # silent bug we first preprocess source files and later compile the
114 # preprocessed result.
118 $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(<)
119 $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
121 all: $(OBJDIR) tool_hugehelp $(PROGNAME)
126 @-$(RM) $(PREPROCESSED)
137 tool_hugehelp: ..\docs\MANUAL ..\docs\curl.1 mkhelp.pl
138 groff -Tascii -man -P -c ../docs/curl.1 > tool_hugehelp.tmp
139 perl -w mkhelp.pl -c ../docs/MANUAL < tool_hugehelp.tmp > tool_hugehelp.c
140 @-$(RM) tool_hugehelp.tmp
143 if exist ..\GIT-INFO $(COPY) tool_hugehelp.c.cvs tool_hugehelp.c
146 $(PROGNAME): $(OBJECTS) $(LIBCURL_LIB) $(LINKLIB)
148 $(LD) $(LDFLAGS) -e$@ @&&!
154 # End of Makefile.b32