mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Set up ar, dlltool, dllwrap, and windres for cross-compiling if necessary.
Plus some makefile cleanup. part of a patch from Richard Evans
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user