Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 165 lines (134 sloc) 4.538 kb
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
1 ############################################################
2 #
3 # Makefile.b32 - Borland's C++ Compiler 5.X
4 #
5 # 'lib' directory
6 #
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
7 # 'BCCDIR' has to be set up to point to the base directory
8 # of the compiler, i.e. SET BCCDIR = c:\Borland\BCC55
9 #
fd6b4b3 @yangtse build: BCC - makefile.b32 tweak
yangtse authored
10 # Initially written by Jaepil Kim, pit@paradise.net.nz
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
11 ############################################################
12
61623b7 @yangtse build: BCC - require Borlands's MAKE for Makefile.b32 processing.
yangtse authored
13 !if "$(__MAKE__)" == ""
14 !error __MAKE__ not defined. Use Borlands's MAKE to process this makefile.
15 !endif
16
5f7d348 @yangtse build: BCC - recover lost functionality from commit 3d813204260b37289411
yangtse authored
17 # Borland's $(MAKEDIR) expands to the path where make.exe is located,
18 # use this feature to define BCCDIR when user has not defined BCCDIR.
1da65c3 @yangtse build: BCC - makefile.b32 tweak
yangtse authored
19 !ifndef BCCDIR
5f7d348 @yangtse build: BCC - recover lost functionality from commit 3d813204260b37289411
yangtse authored
20 BCCDIR = $(MAKEDIR)\..
308db9d @gknauf Some Borland C++ makefile tweaks.
gknauf authored
21 !endif
22
932a6f6 @gknauf made OpenSSL support conditional;
gknauf authored
23 # Edit the path below to point to the base of your Zlib sources.
24 !ifndef ZLIB_PATH
ae26ee3 @gknauf Updated zlib version in build files.
gknauf authored
25 ZLIB_PATH = ..\..\zlib-1.2.8
932a6f6 @gknauf made OpenSSL support conditional;
gknauf authored
26 !endif
27
28 # Edit the path below to point to the base of your OpenSSL package.
29 !ifndef OPENSSL_PATH
6a61285 @vszakats build: update depedency versions, urls, example makefiles
vszakats authored
30 OPENSSL_PATH = ..\..\openssl-1.0.2a
932a6f6 @gknauf made OpenSSL support conditional;
gknauf authored
31 !endif
32
56f0227 Static lib is libcurl.lib and import lib libcurl_imp.lib.
Gisle Vanem authored
33 # Set libcurl static lib, dll and import lib
34 LIBCURL_LIB = libcurl.lib
35 LIBCURL_DLL = libcurl.dll
36 LIBCURL_IMPLIB = libcurl_imp.lib
932a6f6 @gknauf made OpenSSL support conditional;
gknauf authored
37
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
38 # Setup environment
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
39 PP_CMD = cpp32 -q -P-
40 CC_CMD = bcc32 -q -c
c0d1d69 @gknauf some more tweaks, fixed zlib suport.
gknauf authored
41 LD = bcc32
fd6b4b3 @yangtse build: BCC - makefile.b32 tweak
yangtse authored
42 RM = del 2>NUL
89fa3b3 lib/Makefile.b32: updates
Gisle Vanem authored
43 MKDIR = md
44 RMDIR = rd /q
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
45 LIB = tlib
56f0227 Static lib is libcurl.lib and import lib libcurl_imp.lib.
Gisle Vanem authored
46 IMPLIB = implib
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
47
89fa3b3 lib/Makefile.b32: updates
Gisle Vanem authored
48 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
9612fda @gknauf changed to use a temporary response file with tlib to give W9x a chan…
gknauf authored
49 LIBFLAGS = /C /P32
c0d1d69 @gknauf some more tweaks, fixed zlib suport.
gknauf authored
50 LDFLAGS = -q -lq -laa -tWD
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
51
0ab2c44 @captain-caveman2k Makefile.b32: Fixed for vtls changes
captain-caveman2k authored
52 SRCDIR = .;.\vtls
89fa3b3 lib/Makefile.b32: updates
Gisle Vanem authored
53 OBJDIR = .\BCC_objs
0ab2c44 @captain-caveman2k Makefile.b32: Fixed for vtls changes
captain-caveman2k authored
54 INCDIRS = -I.;.\lib;..\include
2e5b316 @yangtse Makefile.b32: Borland makefile adjustments. Tested with BCC 5.5.1
yangtse authored
55 LINKLIB = $(BCCDIR)\lib\cw32mt.lib $(BCCDIR)\lib\ws2_32.lib
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
56 DEFINES = -DNDEBUG -DWIN32 -DBUILDING_LIBCURL
56f0227 Static lib is libcurl.lib and import lib libcurl_imp.lib.
Gisle Vanem authored
57
c73e5e8 @gknauf Enabled SSPI support by default.
gknauf authored
58 # By default SSPI support is enabled for BCC
59 !ifndef DISABLE_SSPI
60 DEFINES = $(DEFINES) -DUSE_WINDOWS_SSPI
61 !endif
62
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
63 # By default LDAP support is disabled for BCC
b5cc77b @gknauf Disable LDAP support since BCC headers are insufficient.
gknauf authored
64 !ifndef WITH_LDAP
65 DEFINES = $(DEFINES) -DCURL_DISABLE_LDAP
66 !endif
67
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
68 # ZLIB support is enabled setting WITH_ZLIB=1
c0d1d69 @gknauf some more tweaks, fixed zlib suport.
gknauf authored
69 !ifdef WITH_ZLIB
70 DEFINES = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
71 INCDIRS = $(INCDIRS);$(ZLIB_PATH)
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
72 LINKLIB = $(LINKLIB) $(ZLIB_PATH)\zlib.lib
c0d1d69 @gknauf some more tweaks, fixed zlib suport.
gknauf authored
73 !endif
56f0227 Static lib is libcurl.lib and import lib libcurl_imp.lib.
Gisle Vanem authored
74
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
75 # SSL support is enabled setting WITH_SSL=1
932a6f6 @gknauf made OpenSSL support conditional;
gknauf authored
76 !ifdef WITH_SSL
709cf76 @bagder openssl: remove all uses of USE_SSLEAY
authored
77 DEFINES = $(DEFINES) -DUSE_OPENSSL
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
78 INCDIRS = $(INCDIRS);$(OPENSSL_PATH)\inc32;$(OPENSSL_PATH)\inc32\openssl
79 LINKLIB = $(LINKLIB) $(OPENSSL_PATH)\out32\ssleay32.lib $(OPENSSL_PATH)\out32\libeay32.lib
932a6f6 @gknauf made OpenSSL support conditional;
gknauf authored
80 !endif
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
81
c0d1d69 @gknauf some more tweaks, fixed zlib suport.
gknauf authored
82 .autodepend
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
83
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
84 .path.c = $(SRCDIR)
85 .path.obj = $(OBJDIR)
89fa3b3 lib/Makefile.b32: updates
Gisle Vanem authored
86 .path.int = $(OBJDIR)
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
87
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
88 # Makefile.inc provides the CSOURCES and HHEADERS defines
89 !include Makefile.inc
90
2e5b316 @yangtse Makefile.b32: Borland makefile adjustments. Tested with BCC 5.5.1
yangtse authored
91 # Borland's command line librarian program TLIB version 4.5 is not capable
92 # of building a library when any of its objects contains an hypen in its
93 # name, due to a command line parsing bug. In order to workaround this, we
94 # build source files with hyphens in their name as objects with underscores
95 # using explicit compilation build rules instead of implicit ones.
96
0ab2c44 @captain-caveman2k Makefile.b32: Fixed for vtls changes
captain-caveman2k authored
97 NOHYPHEN1 = $(CSOURCES:-=_)
98 NOHYPHEN2 = $(NOHYPHEN1:vtls/=)
2e5b316 @yangtse Makefile.b32: Borland makefile adjustments. Tested with BCC 5.5.1
yangtse authored
99
0ab2c44 @captain-caveman2k Makefile.b32: Fixed for vtls changes
captain-caveman2k authored
100 OBJECTS = $(NOHYPHEN2:.c=.obj)
101 PREPROCESSED = $(NOHYPHEN2:.c=.int)
2e5b316 @yangtse Makefile.b32: Borland makefile adjustments. Tested with BCC 5.5.1
yangtse authored
102
103 # Borland's command line compiler (BCC32) version 5.5.1 integrated
104 # preprocessor has a bug which results in silently generating wrong
105 # definitions for libcurl macros such as CURL_OFF_T_C, on the other
106 # hand Borland's command line preprocessor (CPP32) version 5.5.1 does
107 # not have the bug and achieves proper results. In order to avoid the
108 # silent bug we first preprocess source files and later compile the
109 # preprocessed result.
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
110
111 .c.obj:
fd6b4b3 @yangtse build: BCC - makefile.b32 tweak
yangtse authored
112 @-$(RM) $(@R).int
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
113 $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(<)
114 $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
115
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
116 all: $(OBJDIR) $(LIBCURL_LIB) $(LIBCURL_DLL)
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
117
2e5b316 @yangtse Makefile.b32: Borland makefile adjustments. Tested with BCC 5.5.1
yangtse authored
118 asyn_ares.obj: asyn-ares.c
119 @-$(RM) $(@R).int
120 $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?)
121 $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
122
123 asyn_thread.obj: asyn-thread.c
124 @-$(RM) $(@R).int
125 $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?)
126 $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
127
128 non_ascii.obj: non-ascii.c
129 @-$(RM) $(@R).int
130 $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?)
131 $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
132
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
133 clean:
89fa3b3 lib/Makefile.b32: updates
Gisle Vanem authored
134 cd $(OBJDIR)
135 @-$(RM) $(OBJECTS)
136 @-$(RM) $(PREPROCESSED)
137 cd ..
fd6b4b3 @yangtse build: BCC - makefile.b32 tweak
yangtse authored
138 @-$(RMDIR) $(OBJDIR)
139 @-$(RM) $(LIBCURL_LIB)
140 @-$(RM) $(LIBCURL_IMPLIB)
141 @-$(RM) libcurl.tds
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
142
143 $(OBJDIR):
fd6b4b3 @yangtse build: BCC - makefile.b32 tweak
yangtse authored
144 @-$(RMDIR) $(OBJDIR)
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
145 @-$(MKDIR) $(OBJDIR)
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
146
56f0227 Static lib is libcurl.lib and import lib libcurl_imp.lib.
Gisle Vanem authored
147 $(LIBCURL_LIB): $(OBJECTS)
fd6b4b3 @yangtse build: BCC - makefile.b32 tweak
yangtse authored
148 @-$(RM) $(LIBCURL_LIB)
9612fda @gknauf changed to use a temporary response file with tlib to give W9x a chan…
gknauf authored
149 $(LIB) $(LIBFLAGS) $@ @&&!
150 +$(**: = &^
151 +)
152 !
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
153
56f0227 Static lib is libcurl.lib and import lib libcurl_imp.lib.
Gisle Vanem authored
154 $(LIBCURL_DLL) $(LIBCURL_IMPLIB): $(OBJECTS) $(LINKLIB)
fd6b4b3 @yangtse build: BCC - makefile.b32 tweak
yangtse authored
155 @-$(RM) $(LIBCURL_DLL)
156 @-$(RM) $(LIBCURL_IMPLIB)
2e5b316 @yangtse Makefile.b32: Borland makefile adjustments. Tested with BCC 5.5.1
yangtse authored
157 $(LD) $(LDFLAGS) -e$(LIBCURL_DLL) @&&!
158 $(**: = ^
159 )
160 !
56f0227 Static lib is libcurl.lib and import lib libcurl_imp.lib.
Gisle Vanem authored
161 $(IMPLIB) $(LIBCURL_IMPLIB) $(LIBCURL_DLL)
5f26bee @gknauf changed to use Makefile.inc.
gknauf authored
162
42f5e8a @yangtse build: use external preprocessor cpp32 when building with Borland C
yangtse authored
163
164 # End of Makefile.b32
Something went wrong with that request. Please try again.