Enable building of 64-bit libpq using visual studio 8 and the
win32.mak file. Enable building with kerberos support using the win32.mak file. Hiroshi Saito + me
This commit is contained in:
parent
9e53f83c75
commit
432ea3cffd
@ -1,4 +1,4 @@
|
|||||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/install-win32.sgml,v 1.39 2007/04/18 10:14:06 mha Exp $ -->
|
<!-- $PostgreSQL: pgsql/doc/src/sgml/install-win32.sgml,v 1.40 2007/04/18 13:50:08 mha Exp $ -->
|
||||||
|
|
||||||
<chapter id="install-win32">
|
<chapter id="install-win32">
|
||||||
<title>Installation on <productname>Windows</productname></title>
|
<title>Installation on <productname>Windows</productname></title>
|
||||||
@ -360,7 +360,7 @@
|
|||||||
<productname>Borland C++</productname></title>
|
<productname>Borland C++</productname></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Using <productname>Visual Studio 6.0</productname> or
|
Using <productname>Visual C++ 6.0-8.0</productname> or
|
||||||
<productname>Borland C++</productname> to build libpq is only recommended
|
<productname>Borland C++</productname> to build libpq is only recommended
|
||||||
if you need a version with different debug/release flags, or if you need a
|
if you need a version with different debug/release flags, or if you need a
|
||||||
static library to link into an application. For normal use the
|
static library to link into an application. For normal use the
|
||||||
@ -370,12 +370,23 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
To build the <application>libpq</application> client library using
|
To build the <application>libpq</application> client library using
|
||||||
<productname>Visual Studio 6.0</productname>, change into the
|
<productname>Visual Studio 6.0 or later</productname>, change into the
|
||||||
<filename>src</filename> directory and type the command
|
<filename>src</filename> directory and type the command
|
||||||
<screen>
|
<screen>
|
||||||
<userinput>nmake /f win32.mak</userinput>
|
<userinput>nmake /f win32.mak</userinput>
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
|
<para>
|
||||||
|
To build a 64-bit version of the <application>libpq</application>
|
||||||
|
client library using <productname>Visual Studio 8.0 or
|
||||||
|
later</productname>, change into the <filename>src</filename>
|
||||||
|
directory and type in the command
|
||||||
|
<screen>
|
||||||
|
<userinput>nmake /f win32.mak CPU=AMD64</userinput>
|
||||||
|
</screen>
|
||||||
|
See the <filename>win32.mak</filename> file for further details
|
||||||
|
about supported variables.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To build the <application>libpq</application> client library using
|
To build the <application>libpq</application> client library using
|
||||||
|
@ -1,13 +1,22 @@
|
|||||||
# Makefile for Microsoft Visual C++ 5.0 (or compat)
|
# Makefile for Microsoft Visual C++ 6.0-8.0
|
||||||
|
|
||||||
# Will build a Win32 static library libpq(d).lib
|
# Will build a static library libpq(d).lib
|
||||||
# and a Win32 dynamic library libpq(d).dll with import library libpq(d)dll.lib
|
# and a dynamic library libpq(d).dll with import library libpq(d)dll.lib
|
||||||
# USE_SSL=1 will compile with OpenSSL
|
# USE_SSL=1 will compile with OpenSSL
|
||||||
|
# USE_KFW=1 will compile with kfw(kerberos for Windows)
|
||||||
# DEBUG=1 compiles with debugging symbols
|
# DEBUG=1 compiles with debugging symbols
|
||||||
# ENABLE_THREAD_SAFETY=1 compiles with threading enabled
|
# ENABLE_THREAD_SAFETY=1 compiles with threading enabled
|
||||||
|
# CPU="i386" or CPU environment of nmake.exe (AMD64 or IA64)
|
||||||
|
|
||||||
|
!IF "$(CPU)" == ""
|
||||||
|
CPU=i386
|
||||||
!MESSAGE Building the Win32 static library...
|
!MESSAGE Building the Win32 static library...
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
|
!ELSE
|
||||||
|
ADD_DEFINES=/D "WIN64" /Wp64
|
||||||
|
!MESSAGE Building the Win64 static library...
|
||||||
|
!MESSAGE
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
!IFDEF DEBUG
|
!IFDEF DEBUG
|
||||||
OPT=/Od /Zi /MDd
|
OPT=/Od /Zi /MDd
|
||||||
@ -21,6 +30,26 @@ DEBUGDEF=/D NDEBUG
|
|||||||
OUTFILENAME=libpq
|
OUTFILENAME=libpq
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(SSL_INC)" == ""
|
||||||
|
SSL_INC=C:\OpenSSL\include
|
||||||
|
!MESSAGE Using default OpenSSL Include directory: $(SSL_INC)
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(SSL_LIB_PATH)" == ""
|
||||||
|
SSL_LIB_PATH=C:\OpenSSL\lib\VC
|
||||||
|
!MESSAGE Using default OpenSSL Library directory: $(SSL_LIB_PATH)
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(KFW_INC)" == ""
|
||||||
|
KFW_INC=C:\kfw-2.6.5\inc
|
||||||
|
!MESSAGE Using default Kerberos Include directory: $(KFW_INC)
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(KFW_LIB_PATH)" == ""
|
||||||
|
KFW_LIB_PATH=C:\kfw-2.6.5\lib\$(CPU)
|
||||||
|
!MESSAGE Using default Kerberos Library directory: $(KFW_LIB_PATH)
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
!IF "$(OS)" == "Windows_NT"
|
!IF "$(OS)" == "Windows_NT"
|
||||||
NULL=
|
NULL=
|
||||||
!ELSE
|
!ELSE
|
||||||
@ -74,7 +103,7 @@ CLEAN :
|
|||||||
-@erase "$(OUTDIR)\libpq.res"
|
-@erase "$(OUTDIR)\libpq.res"
|
||||||
-@erase "$(OUTDIR)\$(OUTFILENAME).dll"
|
-@erase "$(OUTDIR)\$(OUTFILENAME).dll"
|
||||||
-@erase "$(OUTDIR)\$(OUTFILENAME)dll.exp"
|
-@erase "$(OUTDIR)\$(OUTFILENAME)dll.exp"
|
||||||
-@erase "$(INTDIR)\pg_config_paths.h"
|
-@erase pg_config_paths.h"
|
||||||
|
|
||||||
|
|
||||||
LIB32=link.exe -lib
|
LIB32=link.exe -lib
|
||||||
@ -107,27 +136,36 @@ LIB32_OBJS= \
|
|||||||
"$(INTDIR)\pthread-win32.obj"
|
"$(INTDIR)\pthread-win32.obj"
|
||||||
|
|
||||||
|
|
||||||
config: ..\..\include\pg_config.h pg_config_paths.h
|
config: ..\..\include\pg_config.h pg_config_paths.h ..\..\include\pg_config_os.h
|
||||||
|
|
||||||
..\..\include\pg_config.h: ..\..\include\pg_config.h.win32
|
..\..\include\pg_config.h: ..\..\include\pg_config.h.win32
|
||||||
copy ..\..\include\pg_config.h.win32 ..\..\include\pg_config.h
|
copy ..\..\include\pg_config.h.win32 ..\..\include\pg_config.h
|
||||||
|
|
||||||
|
..\..\include\pg_config_os.h:
|
||||||
|
copy ..\..\include\port\win32.h ..\..\include\pg_config_os.h
|
||||||
|
|
||||||
pg_config_paths.h: win32.mak
|
pg_config_paths.h: win32.mak
|
||||||
echo #define SYSCONFDIR "" > pg_config_paths.h
|
echo #define SYSCONFDIR "" > pg_config_paths.h
|
||||||
|
|
||||||
"$(OUTDIR)" :
|
"$(OUTDIR)" :
|
||||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||||
|
|
||||||
CPP_PROJ=/nologo /W3 /EHsc $(OPT) /I "..\..\include" /I "..\..\include\port\win32" /I "..\..\include\port\win32_msvc" /I "..\..\port" /I. /D "FRONTEND" $(DEBUGDEF) /D\
|
CPP_PROJ=/nologo /W3 /EHsc $(OPT) /I "..\..\include" /I "..\..\include\port\win32" /I "..\..\include\port\win32_msvc" /I "..\..\port" /I. /I "$(SSL_INC)" \
|
||||||
"WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\libpq.pch" \
|
/D "FRONTEND" $(DEBUGDEF) \
|
||||||
|
/D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\libpq.pch" \
|
||||||
/Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c \
|
/Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c \
|
||||||
/D "_CRT_SECURE_NO_DEPRECATE"
|
/D "_CRT_SECURE_NO_DEPRECATE" $(ADD_DEFINES)
|
||||||
|
|
||||||
!IFDEF USE_SSL
|
!IFDEF USE_SSL
|
||||||
CPP_PROJ=$(CPP_PROJ) /D USE_SSL
|
CPP_PROJ=$(CPP_PROJ) /D USE_SSL
|
||||||
SSL_LIBS=ssleay32.lib libeay32.lib gdi32.lib
|
SSL_LIBS=ssleay32.lib libeay32.lib gdi32.lib
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
!IFDEF USE_KFW
|
||||||
|
CPP_PROJ=$(CPP_PROJ) /D KRB5
|
||||||
|
KFW_LIBS=krb5_32.lib comerr32.lib
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
!IFDEF ENABLE_THREAD_SAFETY
|
!IFDEF ENABLE_THREAD_SAFETY
|
||||||
CPP_PROJ=$(CPP_PROJ) /D ENABLE_THREAD_SAFETY
|
CPP_PROJ=$(CPP_PROJ) /D ENABLE_THREAD_SAFETY
|
||||||
!ENDIF
|
!ENDIF
|
||||||
@ -137,15 +175,17 @@ CPP_SBRS=.
|
|||||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpq.res"
|
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpq.res"
|
||||||
|
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib shfolder.lib wsock32.lib $(SSL_LIBS) \
|
LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib shfolder.lib wsock32.lib $(SSL_LIBS) $(KFW_LIB) \
|
||||||
/nologo /subsystem:windows /dll $(LOPT) /incremental:no \
|
/nologo /subsystem:windows /dll $(LOPT) /incremental:no \
|
||||||
/pdb:"$(OUTDIR)\libpqdll.pdb" /machine:I386 /out:"$(OUTDIR)\$(OUTFILENAME).dll"\
|
/pdb:"$(OUTDIR)\libpqdll.pdb" /machine:$(CPU) \
|
||||||
/implib:"$(OUTDIR)\$(OUTFILENAME)dll.lib" /def:$(OUTFILENAME)dll.def
|
/out:"$(OUTDIR)\$(OUTFILENAME).dll"\
|
||||||
|
/implib:"$(OUTDIR)\$(OUTFILENAME)dll.lib" \
|
||||||
|
/libpath:"$(SSL_LIB_PATH)" /libpath:"$(KFW_LIB_PATH)" \
|
||||||
|
/def:$(OUTFILENAME)dll.def
|
||||||
LINK32_OBJS= \
|
LINK32_OBJS= \
|
||||||
"$(OUTDIR)\$(OUTFILENAME).lib" \
|
"$(OUTDIR)\$(OUTFILENAME).lib" \
|
||||||
"$(OUTDIR)\libpq.res"
|
"$(OUTDIR)\libpq.res"
|
||||||
|
|
||||||
|
|
||||||
# @<< is a Response file, http://www.opussoftware.com/tutorial/TutMakefile.htm
|
# @<< is a Response file, http://www.opussoftware.com/tutorial/TutMakefile.htm
|
||||||
|
|
||||||
"$(OUTDIR)\$(OUTFILENAME).lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
"$(OUTDIR)\$(OUTFILENAME).lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user