Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd82794e

Browse files
committed
Attached is a patch to provide makefiles, etc. to allow the compilation
of the libpq interface static and dynamic libraries with the freelydownloadable Borland C++ compiler version 5.5 and/or C++ Builder.Lester Godwin
1 parent896bd12 commitd82794e

File tree

5 files changed

+431
-0
lines changed

5 files changed

+431
-0
lines changed

‎src/bcc32.mak

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# $Header: /cvsroot/pgsql/src/bcc32.mak,v 1.1 2002/12/30 21:07:21 momjian Exp $
2+
3+
# Makefile for Borland C++ 5.5 (or compat)
4+
# Top-file makefile for Win32 parts of postgresql.
5+
# Note that most parts are not ported to Win32!
6+
7+
!IF "$(CFG)" != "Release" && "$(CFG)" != "Debug"
8+
!MESSAGE Invalid configuration "$(CFG)" specified.
9+
!MESSAGE You can specify a configuration when running MAKE
10+
!MESSAGEbydefiningthemacroCFGonthecommandline.Forexample:
11+
!MESSAGE
12+
!MESSAGE make -DCFG=[Release | Debug] /f bcc32.mak
13+
!MESSAGE
14+
!MESSAGEPossiblechoicesforconfigurationare:
15+
!MESSAGE
16+
!MESSAGE "Release" (Win32 Release )
17+
!MESSAGE "Debug" (Win32 Debug)
18+
!MESSAGE
19+
!ENDIF
20+
21+
!IF "$(OS)" == "Windows_NT"
22+
NULL=
23+
!ELSE
24+
NULL=nul
25+
!ENDIF
26+
27+
ALL:
28+
cd include
29+
if not exist pg_config.h copy pg_config.h.win32 pg_config.h
30+
cd ..
31+
cd interfaces\libpq
32+
make -DCFG=$(CFG) /f bcc32.mak
33+
cd ..\..\bin\psql
34+
make -DCFG=$(CFG) /f bcc32.mak
35+
cd ..\..
36+
echo All Win32 parts have been built!
37+
38+
CLEAN:
39+
cd interfaces\libpq
40+
make -DCFG=Release /f bcc32.mak CLEAN
41+
make -DCFG=Debug /f bcc32.mak CLEAN
42+
cd ..\..\bin\psql
43+
make -DCFG=Release /f bcc32.mak CLEAN
44+
make -DCFG=Debug /f bcc32.mak CLEAN
45+
cd ..\..
46+
echo All Win32 parts have been cleaned!
47+
48+
DISTCLEAN: CLEAN
49+
cd include
50+
del config.h
51+
cd ..

‎src/bin/psql/bcc32.mak

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Makefile for Borland C++ 5.5
2+
# Borland C++ base install directory goes here
3+
BCB=d:\Borland\Bcc55
4+
5+
!MESSAGE Building PSQL.EXE ...
6+
!MESSAGE
7+
!IF "$(CFG)" == ""
8+
CFG=Release
9+
!MESSAGE No configuration specified. Defaulting to Release with STATIC libraries.
10+
!MESSAGE To use dynamic link libraries add -DDLL_LIBS to make command line.
11+
!MESSAGE
12+
!ELSE
13+
!MESSAGE Configuration "$(CFG)"
14+
!MESSAGE
15+
!ENDIF
16+
17+
!IF "$(CFG)" != "Release" && "$(CFG)" != "Debug"
18+
!MESSAGE Invalid configuration "$(CFG)" specified.
19+
!MESSAGE You can specify a configuration when running MAKE
20+
!MESSAGEbydefiningthemacroCFGonthecommandline.Forexample:
21+
!MESSAGE
22+
!MESSAGE make -DCFG=[Release | Debug] /f bcc32.mak
23+
!MESSAGE
24+
!MESSAGEPossiblechoicesforconfigurationare:
25+
!MESSAGE
26+
!MESSAGE "Release" (Win32 Release EXE)
27+
!MESSAGE "Debug" (Win32 Debug EXE)
28+
!MESSAGE
29+
!ERROR An invalid configuration was specified.
30+
!ENDIF
31+
32+
!IF "$(OS)" == "Windows_NT"
33+
NULL=
34+
!ELSE
35+
NULL=nul
36+
!ENDIF
37+
38+
CPP=bcc32.exe
39+
40+
!IF "$(CFG)" == "Debug"
41+
DEBUG=1
42+
OUTDIR=.\Debug
43+
INTDIR=.\Debug
44+
!else
45+
OUTDIR=.\Release
46+
INTDIR=.\Release
47+
!endif
48+
49+
.path.obj =$(INTDIR)
50+
51+
.c.obj:
52+
$(CPP) -o"$(INTDIR)\$&"$(CPP_PROJ)$<
53+
54+
ALL : "$(OUTDIR)\psql.exe"
55+
56+
CLEAN :
57+
-@erase"$(INTDIR)\command.obj"
58+
-@erase"$(INTDIR)\common.obj"
59+
-@erase"$(INTDIR)\help.obj"
60+
-@erase"$(INTDIR)\input.obj"
61+
-@erase"$(INTDIR)\stringutils.obj"
62+
-@erase"$(INTDIR)\mainloop.obj"
63+
-@erase"$(INTDIR)\copy.obj"
64+
-@erase"$(INTDIR)\startup.obj"
65+
-@erase"$(INTDIR)\prompt.obj"
66+
-@erase"$(INTDIR)\sprompt.obj"
67+
-@erase"$(INTDIR)\variables.obj"
68+
-@erase"$(INTDIR)\large_obj.obj"
69+
-@erase"$(INTDIR)\print.obj"
70+
-@erase"$(INTDIR)\describe.obj"
71+
-@erase"$(INTDIR)\tab-complete.obj"
72+
-@erase"$(INTDIR)\getopt.obj"
73+
-@erase"$(INTDIR)\mbprint.obj"
74+
-@erase"$(INTDIR)\psql.ilc"
75+
-@erase"$(INTDIR)\psql.ild"
76+
-@erase"$(INTDIR)\psql.tds"
77+
-@erase"$(INTDIR)\psql.ils"
78+
-@erase"$(INTDIR)\psql.ilf"
79+
-@erase"$(OUTDIR)\psql.exe"
80+
81+
"$(OUTDIR)" :
82+
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
83+
84+
USERDEFINES = WIN32;_CONSOLE;_MBCS;HAVE_STRDUP
85+
86+
# ---------------------------------------------------------------------------
87+
CPP_PROJ = -I$(BCB)\include;..\..\include;..\..\interfaces\libpq -c -D$(USERDEFINES) -tWM -tWC\
88+
-q -5 -a8 -pc -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc
89+
90+
!IFDEF DEBUG
91+
CPP_PROJ =$(CPP_PROJ) -Od -r- -k -v -y -vi- -D_DEBUG
92+
LIBPG_DIR = Debug
93+
!ELSE
94+
CPP_PROJ=$(CPP_PROJ) -O -Oi -OS -DNDEBUG
95+
LIBPG_DIR = Release
96+
!ENDIF
97+
98+
!IFDEF DLL_LIBS
99+
CPP_PROJ=$(CPP_PROJ) -D_RTLDLL
100+
LIBRARIES= cw32mti.lib ..\..\interfaces\libpq\$(LIBPG_DIR)\blibpqdll.lib
101+
!ELSE
102+
CPP_PROJ=$(CPP_PROJ) -DBCC32_STATIC
103+
LIBRARIES= cw32mt.lib ..\..\interfaces\libpq\$(LIBPG_DIR)\blibpq.lib
104+
!ENDIF
105+
106+
LINK32=ilink32.exe
107+
LINK32_FLAGS=-L$(BCB)\lib;.\$(LIBPG_DIR) -x -v
108+
LINK32_OBJS=\
109+
command.obj\
110+
common.obj\
111+
help.obj\
112+
input.obj\
113+
stringutils.obj\
114+
mainloop.obj\
115+
copy.obj\
116+
startup.obj\
117+
prompt.obj\
118+
sprompt.obj\
119+
variables.obj\
120+
large_obj.obj\
121+
print.obj\
122+
describe.obj\
123+
tab-complete.obj\
124+
getopt.obj\
125+
mbprint.obj
126+
127+
128+
"$(OUTDIR)\psql.exe" : "$(OUTDIR)"$(LINK32_OBJS)
129+
$(LINK32) @&&!
130+
$(LINK32_FLAGS) +
131+
c0x32.obj$(LINK32_OBJS), +
132+
$@,, +
133+
import32.lib$(LIBRARIES),,
134+
!
135+
136+
getopt.obj : "$(OUTDIR)" ..\..\port\getopt.c

‎src/interfaces/libpq/bcc32.mak

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
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=d:\Borland\Bcc55
8+
9+
!MESSAGE Building the Win32 DLL and Static Library...
10+
!MESSAGE
11+
!IF "$(CFG)" == ""
12+
CFG=Release
13+
!MESSAGE No configuration specified. Defaulting to Release.
14+
!MESSAGE
15+
!ELSE
16+
!MESSAGE Configuration "$(CFG)"
17+
!MESSAGE
18+
!ENDIF
19+
20+
!IF "$(CFG)" != "Release" && "$(CFG)" != "Debug"
21+
!MESSAGE Invalid configuration "$(CFG)" specified.
22+
!MESSAGE You can specify a configuration when running MAKE
23+
!MESSAGEbydefiningthemacroCFGonthecommandline.Forexample:
24+
!MESSAGE
25+
!MESSAGE make -DCFG=[Release | Debug] /f bcc32.mak
26+
!MESSAGE
27+
!MESSAGEPossiblechoicesforconfigurationare:
28+
!MESSAGE
29+
!MESSAGE "Release" (Win32 Release DLL and Static Library)
30+
!MESSAGE "Debug" (Win32 Debug DLL and Static Library)
31+
!MESSAGE
32+
!ERROR An invalid configuration was specified.
33+
!ENDIF
34+
35+
!IF "$(OS)" == "Windows_NT"
36+
NULL=
37+
!ELSE
38+
NULL=nul
39+
!ENDIF
40+
41+
!IF "$(CFG)" == "Debug"
42+
DEBUG=1
43+
OUTDIR=.\Debug
44+
INTDIR=.\Debug
45+
!else
46+
OUTDIR=.\Release
47+
INTDIR=.\Release
48+
!endif
49+
50+
USERDEFINES=FRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP;
51+
52+
CPP=bcc32.exe
53+
CPP_PROJ = -I$(BCB)\include;..\..\include -WD -c -D$(USERDEFINES) -tWM\
54+
-a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc
55+
56+
!IFDEF DEBUG
57+
CPP_PROJ=$(CPP_PROJ) -Od -r- -k -v -y -vi- -D_DEBUG
58+
!else
59+
CPP_PROJ=$(CPP_PROJ) -O -Oi -OS -DNDEBUG
60+
!endif
61+
62+
LIB32=tlib.exe
63+
LIB32_FLAGS=
64+
LIB32_OBJS=\
65+
"$(OUTDIR)\win32.obj"\
66+
"$(INTDIR)\dllist.obj"\
67+
"$(INTDIR)\md5.obj"\
68+
"$(INTDIR)\fe-auth.obj"\
69+
"$(INTDIR)\fe-connect.obj"\
70+
"$(INTDIR)\fe-exec.obj"\
71+
"$(INTDIR)\fe-lobj.obj"\
72+
"$(INTDIR)\fe-misc.obj"\
73+
"$(INTDIR)\fe-print.obj"\
74+
"$(INTDIR)\fe-secure.obj"\
75+
"$(INTDIR)\pqexpbuffer.obj"\
76+
"$(INTDIR)\wchar.obj"\
77+
"$(INTDIR)\encnames.obj"
78+
79+
RSC=brcc32.exe
80+
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpq.res"
81+
82+
LINK32=ilink32.exe
83+
LINK32_FLAGS = -Gn -L$(BCB)\lib;$(INTDIR); -x -Tpd -v
84+
LINK32_OBJS= "$(INTDIR)\libpqdll.obj"
85+
86+
# ---------------------------------------------------------------------------
87+
88+
.path.obj =$(INTDIR)
89+
.path.c = .;..\..\backend\libpq;..\..\backend\lib;..\..\backend\utils\mb
90+
91+
# ---------------------------------------------------------------------------
92+
93+
ALL: "$(OUTDIR)" "$(OUTDIR)\blibpq.dll" "$(OUTDIR)\blibpq.lib"
94+
95+
CLEAN :
96+
-@erase"$(INTDIR)\dllist.obj"
97+
-@erase"$(INTDIR)\md5.obj"
98+
-@erase"$(INTDIR)\fe-auth.obj"
99+
-@erase"$(INTDIR)\fe-connect.obj"
100+
-@erase"$(INTDIR)\fe-exec.obj"
101+
-@erase"$(INTDIR)\fe-lobj.obj"
102+
-@erase"$(INTDIR)\fe-misc.obj"
103+
-@erase"$(INTDIR)\fe-print.obj"
104+
-@erase"$(INTDIR)\fe-secure.obj"
105+
-@erase"$(INTDIR)\pqexpbuffer.obj"
106+
-@erase"$(OUTDIR)\libpqdll.obj"
107+
-@erase"$(OUTDIR)\win32.obj"
108+
-@erase"$(INTDIR)\wchar.obj"
109+
-@erase"$(INTDIR)\encnames.obj"
110+
-@erase"$(OUTDIR)\libpq.res"
111+
-@erase"$(OUTDIR)\blibpq.lib"
112+
-@erase"$(OUTDIR)\blibpqdll.lib"
113+
-@erase"$(OUTDIR)\blibpq.dll"
114+
-@erase"$(OUTDIR)\blibpq.tds"
115+
116+
117+
"$(OUTDIR)" :
118+
@if not exist"$(OUTDIR)/$(NULL)" mkdir"$(OUTDIR)"
119+
120+
"$(OUTDIR)\blibpq.dll": "$(OUTDIR)\blibpq.lib"$(LINK32_OBJS) "$(INTDIR)\libpq.res" blibpqdll.def
121+
$(LINK32) @&&!
122+
$(LINK32_FLAGS) +
123+
c0d32.obj$(LINK32_OBJS), +
124+
$@,, +
125+
"$(OUTDIR)\blibpq.lib" import32.lib cw32mti.lib, +
126+
blibpqdll.def,"$(INTDIR)\libpq.res"
127+
!
128+
implib -a "$(OUTDIR)\blibpqdll.lib" blibpqdll.def $@
129+
130+
"$(INTDIR)\libpq.res" : "$(INTDIR)" libpq.rc
131+
$(RSC) $(RSC_PROJ) libpq.rc
132+
133+
"$(OUTDIR)\blibpq.lib":$(LIB32_OBJS)
134+
$(LIB32)$@ @&&!
135+
+-"$(**: =" &^
136+
+-")"
137+
!
138+
139+
.c.obj:
140+
$(CPP) -o"$(INTDIR)\$&"$(CPP_PROJ)$<
141+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp