aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/makefiles/Makefile.win328
-rw-r--r--src/makefiles/pgxs.mk2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/makefiles/Makefile.win32 b/src/makefiles/Makefile.win32
index b93f78067f2..354014a0c87 100644
--- a/src/makefiles/Makefile.win32
+++ b/src/makefiles/Makefile.win32
@@ -68,12 +68,18 @@ ifneq (,$(PGAPPICON))
PGICOSTR = $(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\")
endif
+# We do not install src/port/win32ver.rc, its content being specific to
+# PostgreSQL Global Development Group software. Any module can ship a
+# win32ver.rc or furnish a rule for generating one. Set $(PGFILEDESC) to
+# signal win32ver.rc availability to the dll build rule below.
+ifndef PGXS
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*//'`';' $< >$@
+endif
win32ver.o: win32ver.rc
$(WINDRES) -i $< -o $@ --include-dir=$(top_builddir)/src/include --include-dir=$(srcdir)
# Rule for building a shared library from a single .o file
-%.dll: %.o $(WIN32RES)
+%.dll: %.o $(if $(PGFILEDESC),$(WIN32RES))
$(CC) $(CFLAGS) -shared -static-libgcc -o $@ $^ -Wl,--export-all-symbols $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)
diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk
index b6874ced91c..2b4d684e8e7 100644
--- a/src/makefiles/pgxs.mk
+++ b/src/makefiles/pgxs.mk
@@ -202,7 +202,7 @@ endif # MODULE_big
clean:
ifdef MODULES
- rm -f $(addsuffix $(DLSUFFIX), $(MODULES)) $(addsuffix .o, $(MODULES)) $(WIN32RES)
+ rm -f $(addsuffix $(DLSUFFIX), $(MODULES)) $(addsuffix .o, $(MODULES)) $(if $(PGFILEDESC),$(WIN32RES))
endif
ifdef DATA_built
rm -f $(DATA_built)