]> granicus.if.org Git - postgresql/blob - src/interfaces/libpq/bcc32.mak
Additional spelling corrections
[postgresql] / src / interfaces / libpq / bcc32.mak
1 # Makefile for Borland C++ 5.5
2
3 # Will build a Win32 static library libpq.lib
4 #        and a Win32 dynamic library libpq.dll with import library libpqdll.lib
5
6 # Borland C++ base install directory goes here
7 # BCB=c:\Borland\Bcc55
8
9 !IF "$(BCB)" == ""
10 !MESSAGE You must edit bcc32.mak and define BCB at the top
11 !ERROR misssing BCB
12 !ENDIF
13
14 !IF "$(__NMAKE__)" == ""
15 !MESSAGE You must use the -N compatibility flag, e.g. make -N -f bcc32.make
16 !ERROR missing -N
17 !ENDIF
18
19 !MESSAGE Building the Win32 DLL and Static Library...
20 !MESSAGE
21 !IF "$(CFG)" == ""
22 CFG=Release
23 !MESSAGE No configuration specified. Defaulting to Release.
24 !MESSAGE
25 !ELSE
26 !MESSAGE Configuration "$(CFG)"
27 !MESSAGE
28 !ENDIF
29
30 !IF "$(CFG)" != "Release" && "$(CFG)" != "Debug"
31 !MESSAGE Invalid configuration "$(CFG)" specified.
32 !MESSAGE You can specify a configuration when running MAKE
33 !MESSAGE by defining the macro CFG on the command line. For example:
34 !MESSAGE
35 !MESSAGE make -N -DCFG=[Release | Debug] -f bcc32.mak
36 !MESSAGE
37 !MESSAGE Possible choices for configuration are:
38 !MESSAGE
39 !MESSAGE "Release" (Win32 Release DLL and Static Library)
40 !MESSAGE "Debug" (Win32 Debug DLL and Static Library)
41 !MESSAGE
42 !ERROR An invalid configuration was specified.
43 !ENDIF
44
45 !IF "$(OS)" == "Windows_NT"
46 NULL=
47 !ELSE
48 NULL=nul
49 !ENDIF
50
51 !IF "$(CFG)" == "Debug"
52 DEBUG=1
53 OUTDIR=.\Debug
54 INTDIR=.\Debug
55 !ELSE
56 OUTDIR=.\Release
57 INTDIR=.\Release
58 !ENDIF
59
60 OUTFILENAME=blibpq
61
62 USERDEFINES=FRONTEND;NDEBUG;WIN32;_WINDOWS
63
64 CPP=bcc32.exe
65 CPP_PROJ = -I..\..\include\port\win32_msvc;$(BCB)\include;..\..\include;..\..\include\port\win32;..\..\port -n"$(INTDIR)" -WD -c -D$(USERDEFINES) -tWM \
66                 -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc
67
68 !IFDEF DEBUG
69 CPP_PROJ        = $(CPP_PROJ) -Od -r- -k -v -y -vi- -D_DEBUG
70 !else
71 CPP_PROJ        = $(CPP_PROJ) -O -Oi -OS -DNDEBUG
72 !endif
73
74 ALL : config "$(OUTDIR)" "$(OUTDIR)\blibpq.dll" "$(OUTDIR)\blibpq.lib"
75
76 CLEAN :
77         -@erase "$(INTDIR)\getaddrinfo.obj"
78         -@erase "$(INTDIR)\pgstrcasecmp.obj"
79         -@erase "$(INTDIR)\pqsignal.obj"
80         -@erase "$(INTDIR)\thread.obj"
81         -@erase "$(INTDIR)\inet_aton.obj"
82         -@erase "$(INTDIR)\crypt.obj"
83         -@erase "$(INTDIR)\noblock.obj"
84         -@erase "$(INTDIR)\chklocale.obj"
85         -@erase "$(INTDIR)\inet_net_ntop.obj"
86         -@erase "$(INTDIR)\md5.obj"
87         -@erase "$(INTDIR)\ip.obj"
88         -@erase "$(INTDIR)\fe-auth.obj"
89         -@erase "$(INTDIR)\fe-protocol2.obj"
90         -@erase "$(INTDIR)\fe-protocol3.obj"
91         -@erase "$(INTDIR)\fe-connect.obj"
92         -@erase "$(INTDIR)\fe-exec.obj"
93         -@erase "$(INTDIR)\fe-lobj.obj"
94         -@erase "$(INTDIR)\fe-misc.obj"
95         -@erase "$(INTDIR)\fe-print.obj"
96         -@erase "$(INTDIR)\fe-secure.obj"
97         -@erase "$(INTDIR)\libpq-events.obj"
98         -@erase "$(INTDIR)\pqexpbuffer.obj"
99         -@erase "$(INTDIR)\win32.obj"
100         -@erase "$(INTDIR)\wchar.obj"
101         -@erase "$(INTDIR)\encnames.obj"
102         -@erase "$(INTDIR)\pthread-win32.obj"
103         -@erase "$(INTDIR)\snprintf.obj"
104         -@erase "$(INTDIR)\strlcpy.obj"
105         -@erase "$(INTDIR)\dirent.obj"
106         -@erase "$(INTDIR)\dirmod.obj"
107         -@erase "$(INTDIR)\pgsleep.obj"
108         -@erase "$(INTDIR)\open.obj"
109         -@erase "$(INTDIR)\win32error.obj"
110         -@erase "$(OUTDIR)\$(OUTFILENAME).lib"
111         -@erase "$(OUTDIR)\$(OUTFILENAME)dll.lib"
112         -@erase "$(OUTDIR)\libpq.res"
113         -@erase "$(OUTDIR)\$(OUTFILENAME).dll"
114         -@erase "$(OUTDIR)\$(OUTFILENAME).tds"
115         -@erase "$(INTDIR)\pg_config_paths.h"
116
117
118 LIB32=tlib.exe
119 LIB32_FLAGS=
120 LIB32_OBJS= \
121         "$(INTDIR)\win32.obj" \
122         "$(INTDIR)\getaddrinfo.obj" \
123         "$(INTDIR)\pgstrcasecmp.obj" \
124         "$(INTDIR)\pqsignal.obj" \
125         "$(INTDIR)\thread.obj" \
126         "$(INTDIR)\inet_aton.obj" \
127         "$(INTDIR)\crypt.obj" \
128         "$(INTDIR)\noblock.obj" \
129         "$(INTDIR)\chklocale.obj" \
130         "$(INTDIR)\inet_net_ntop.obj" \
131         "$(INTDIR)\md5.obj" \
132         "$(INTDIR)\ip.obj" \
133         "$(INTDIR)\fe-auth.obj" \
134         "$(INTDIR)\fe-protocol2.obj" \
135         "$(INTDIR)\fe-protocol3.obj" \
136         "$(INTDIR)\fe-connect.obj" \
137         "$(INTDIR)\fe-exec.obj" \
138         "$(INTDIR)\fe-lobj.obj" \
139         "$(INTDIR)\fe-misc.obj" \
140         "$(INTDIR)\fe-print.obj" \
141         "$(INTDIR)\fe-secure.obj" \
142         "$(INTDIR)\libpq-events.obj" \
143         "$(INTDIR)\pqexpbuffer.obj" \
144         "$(INTDIR)\wchar.obj" \
145         "$(INTDIR)\encnames.obj" \
146         "$(INTDIR)\snprintf.obj" \
147         "$(INTDIR)\strlcpy.obj" \
148         "$(INTDIR)\dirent.obj" \
149         "$(INTDIR)\dirmod.obj" \
150         "$(INTDIR)\pgsleep.obj" \
151         "$(INTDIR)\open.obj" \
152         "$(INTDIR)\win32error.obj" \
153         "$(INTDIR)\pthread-win32.obj"
154
155
156 config: ..\..\include\pg_config.h ..\..\include\pg_config_ext.h ..\..\include\pg_config_os.h pg_config_paths.h
157
158 ..\..\include\pg_config.h: ..\..\include\pg_config.h.win32
159         copy ..\..\include\pg_config.h.win32 ..\..\include\pg_config.h
160
161 ..\..\include\pg_config_ext.h: ..\..\include\pg_config_ext.h.win32
162         copy ..\..\include\pg_config_ext.h.win32 ..\..\include\pg_config_ext.h
163
164 ..\..\include\pg_config_os.h: ..\..\include\port\win32.h
165         copy ..\..\include\port\win32.h ..\..\include\pg_config_os.h
166
167 # Have to use \# so # isn't treated as a comment, but MSVC doesn't like this
168 pg_config_paths.h: bcc32.mak
169         echo \#define SYSCONFDIR "" > pg_config_paths.h
170
171 "$(OUTDIR)" :
172         @if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
173
174 RSC=brcc32.exe
175 RSC_PROJ=-l 0x409 -i$(BCB)\include -fo"$(INTDIR)\libpq.res"
176
177 LINK32=ilink32.exe
178 LINK32_FLAGS = -Gn -L$(BCB)\lib;$(INTDIR); -x -Tpd -v
179
180 # @<< is a Response file, http://www.opussoftware.com/tutorial/TutMakefile.htm
181
182 "$(OUTDIR)\blibpq.dll": "$(OUTDIR)\blibpq.lib" "$(INTDIR)\libpq.res" blibpqdll.def
183         $(LINK32) @<<
184         $(LINK32_FLAGS) +
185         c0d32.obj , +
186         $@,, +
187         "$(OUTDIR)\blibpq.lib" import32.lib cw32mt.lib, +
188         blibpqdll.def,"$(INTDIR)\libpq.res"
189 <<
190         implib -w "$(OUTDIR)\blibpqdll.lib" blibpqdll.def $@
191
192 "$(INTDIR)\libpq.res" : "$(INTDIR)" libpq-dist.rc
193         $(RSC) $(RSC_PROJ) libpq-dist.rc
194
195 "$(OUTDIR)\blibpq.lib": $(LIB32_OBJS)
196         $(LIB32) $@ @<<
197 +-"$(**: =" &^
198 +-")"
199 <<
200
201
202 "$(INTDIR)\getaddrinfo.obj" : ..\..\port\getaddrinfo.c
203         $(CPP) @<<
204         $(CPP_PROJ) ..\..\port\getaddrinfo.c
205 <<
206
207 "$(INTDIR)\pgstrcasecmp.obj" : ..\..\port\pgstrcasecmp.c
208         $(CPP) @<<
209         $(CPP_PROJ) ..\..\port\pgstrcasecmp.c
210 <<
211
212 "$(INTDIR)\pqsignal.obj" : ..\..\port\pqsignal.c
213         $(CPP) @<<
214         $(CPP_PROJ) ..\..\port\pqsignal.c
215 <<
216
217 "$(INTDIR)\thread.obj" : ..\..\port\thread.c
218         $(CPP) @<<
219         $(CPP_PROJ) ..\..\port\thread.c
220 <<
221
222 "$(INTDIR)\inet_aton.obj" : ..\..\port\inet_aton.c
223         $(CPP) @<<
224         $(CPP_PROJ) ..\..\port\inet_aton.c
225 <<
226
227 "$(INTDIR)\crypt.obj" : ..\..\port\crypt.c
228         $(CPP) @<<
229         $(CPP_PROJ) ..\..\port\crypt.c
230 <<
231
232 "$(INTDIR)\noblock.obj" : ..\..\port\noblock.c
233         $(CPP) @<<
234         $(CPP_PROJ) ..\..\port\noblock.c
235 <<
236
237 "$(INTDIR)\chklocale.obj" : ..\..\port\chklocale.c
238         $(CPP) @<<
239         $(CPP_PROJ) ..\..\port\chklocale.c
240 <<
241
242 "$(INTDIR)\inet_net_ntop.obj" : ..\..\port\inet_net_ntop.c
243         $(CPP) @<<
244         $(CPP_PROJ) ..\..\port\inet_net_ntop.c
245 <<
246
247 "$(INTDIR)\md5.obj" : ..\..\backend\libpq\md5.c
248         $(CPP) @<<
249         $(CPP_PROJ) ..\..\backend\libpq\md5.c
250 <<
251
252 "$(INTDIR)\ip.obj" : ..\..\backend\libpq\ip.c
253         $(CPP) @<<
254         $(CPP_PROJ) ..\..\backend\libpq\ip.c
255 <<
256
257 "$(INTDIR)\wchar.obj" : ..\..\backend\utils\mb\wchar.c
258         $(CPP) @<<
259         $(CPP_PROJ) /I"." ..\..\backend\utils\mb\wchar.c
260 <<
261
262
263 "$(INTDIR)\encnames.obj" : ..\..\backend\utils\mb\encnames.c
264         $(CPP) @<<
265         $(CPP_PROJ) /I"." ..\..\backend\utils\mb\encnames.c
266 <<
267
268 "$(INTDIR)\snprintf.obj" : ..\..\port\snprintf.c
269         $(CPP) @<<
270         $(CPP_PROJ) /I"." ..\..\port\snprintf.c
271 <<
272
273 "$(INTDIR)\strlcpy.obj" : ..\..\port\strlcpy.c
274         $(CPP) @<<
275         $(CPP_PROJ) /I"." ..\..\port\strlcpy.c
276 <<
277
278 "$(INTDIR)\dirent.obj" : ..\..\port\dirent.c
279         $(CPP) @<<
280         $(CPP_PROJ) /I"." ..\..\port\dirent.c
281 <<
282
283 "$(INTDIR)\dirmod.obj" : ..\..\port\dirmod.c
284         $(CPP) @<<
285         $(CPP_PROJ) /I"." ..\..\port\dirmod.c
286 <<
287
288 "$(INTDIR)\pgsleep.obj" : ..\..\port\pgsleep.c
289         $(CPP) @<<
290         $(CPP_PROJ) /I"." ..\..\port\pgsleep.c
291 <<
292
293 "$(INTDIR)\open.obj" : ..\..\port\open.c
294         $(CPP) @<<
295         $(CPP_PROJ) /I"." ..\..\port\open.c
296 <<
297
298 "$(INTDIR)\win32error.obj" : ..\..\port\win32error.c
299         $(CPP) @<<
300         $(CPP_PROJ) /I"." ..\..\port\win32error.c
301 <<
302
303
304 .c.obj:
305         $(CPP) $(CPP_PROJ) $<