summaryrefslogtreecommitdiff
path: root/src/makefiles/Makefile.win32
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2008-12-07 08:36:22 +0000
committerPeter Eisentraut <peter_e@gmx.net>2008-12-07 08:36:22 +0000
commitb2971e2048c9109a084abf08aa65ff609cce44b9 (patch)
tree5ab87d54816de8175b8f6824d3d86fe55a5cd39e /src/makefiles/Makefile.win32
parentff1ea2173a92dea975d399a4ca25723f83762e55 (diff)
downloadpostgresql-b2971e2048c9109a084abf08aa65ff609cce44b9.tar.gz
Set up ar, dlltool, dllwrap, and windres for cross-compiling if necessary.
Plus some makefile cleanup. part of a patch from Richard Evans
Diffstat (limited to 'src/makefiles/Makefile.win32')
-rw-r--r--src/makefiles/Makefile.win3223
1 files changed, 20 insertions, 3 deletions
diff --git a/src/makefiles/Makefile.win32 b/src/makefiles/Makefile.win32
index f42ae8e41a..75619c7e46 100644
--- a/src/makefiles/Makefile.win32
+++ b/src/makefiles/Makefile.win32
@@ -1,10 +1,8 @@
-# $PostgreSQL: pgsql/src/makefiles/Makefile.win32,v 1.11 2007/08/21 13:32:33 mha Exp $
+# $PostgreSQL: pgsql/src/makefiles/Makefile.win32,v 1.12 2008/12/07 08:36:22 petere Exp $
# Use replacement include files for those missing on Win32
override CPPFLAGS+="-I$(top_srcdir)/src/include/port/win32"
-DLLTOOL= dlltool
-DLLWRAP= dllwrap
ifdef PGXS
BE_DLLLIBS= -L$(libdir) -lpostgres
else
@@ -51,3 +49,22 @@ endif
ifndef MAKE_DLL
MAKE_DLL = true
endif
+
+
+# Build rules to add versioninfo resources to win32 binaries
+
+WIN32RES += win32ver.o
+ifeq ($(PGFILESHLIB),1)
+PGFTYPE = VFT_DLL
+else
+PGFTYPE = VFT_APP
+endif
+ifneq (,$(PGAPPICON))
+PGICOSTR = $(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\")
+endif
+
+win32ver.rc: $(top_srcdir)/src/port/win32ver.rc
+ sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date '+%y%j' | sed 's/^0*//'`';' $< >$@
+
+win32ver.o: win32ver.rc
+ $(WINDRES) -i $< -o $@ --include-dir=$(top_builddir)/src/include