1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-21 10:42:50 +03:00

Assorted fixes for Cygwin:

Eliminate the mysterious games that the Cygwin build plays with the linker
flag variables.  DLLLIBS is gone, use SHLIB_LINK like everyone else.
Detect cygipc in configure, after the linker flags are set up, otherwise
configure might not work at all.

Make sure everything is covered by make clean.

Fix the build of the new conversion procedure modules.

Add new DLLIMPORT markers where required.

Finally, the compiler complains if we use an explicit
-I/usr/local/include, so don't do that.  Curiously, -L/usr/local/lib is
still necessary.
This commit is contained in:
Peter Eisentraut
2002-09-05 18:28:46 +00:00
parent a11ea5e2a3
commit 337da0678a
14 changed files with 46 additions and 58 deletions

View File

@@ -1,13 +1,9 @@
# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.17 2002/07/27 20:10:05 petere Exp $
LDFLAGS+= -g
# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.18 2002/09/05 18:28:46 petere Exp $
DLLTOOL= dlltool
DLLWRAP= dllwrap
DLLLIBS= -lcygipc -lcrypt
BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
DLLINIT = $(top_builddir)/src/utils/dllinit.o
MK_NO_LORDER=true
MAKE_DLL=true
#MAKE_DLL=false
# linking with -lm or -lc causes program to crash
# (see http://sources.redhat.com/cygwin/faq/faq.html#SEC110)
LIBS:=$(filter-out -lm -lc, $(LIBS))
@@ -18,22 +14,21 @@ CFLAGS_SL =
%.dll: %.o
$(DLLTOOL) --export-all --output-def $*.def $<
$(DLLWRAP) -o $@ --def $*.def $< $(DLLINIT) $(DLLLIBS)
$(DLLWRAP) -o $@ --def $*.def $< $(DLLINIT) $(SHLIB_LINK)
rm -f $*.def
ifeq ($(findstring backend,$(subdir)), backend)
override CPPFLAGS+= -DBUILDING_DLL=1
ifneq (,$(findstring backend,$(subdir)))
ifeq (,$(findstring conversion_procs,$(subdir)))
override CPPFLAGS+= -DBUILDING_DLL
endif
endif
ifeq ($(findstring ecpg/lib,$(subdir)), ecpg/lib)
override CPPFLAGS+= -DBUILDING_DLL=1
ifneq (,$(findstring ecpg/lib,$(subdir)))
override CPPFLAGS+= -DBUILDING_DLL
endif
ifeq ($(findstring interfaces/libpq++,$(subdir)), interfaces/libpq++)
override CPPFLAGS+= -DBUILDING_DLL=1
endif
ifeq ($(findstring src/pl/plpython,$(subdir)), src/pl/plpython)
# required by Python headers
ifneq (,$(findstring src/pl/plpython,$(subdir)))
override CPPFLAGS+= -DUSE_DL_IMPORT
endif