summaryrefslogtreecommitdiff
path: root/src/makefiles
diff options
context:
space:
mode:
authorPeter Eisentraut2002-09-05 18:28:46 +0000
committerPeter Eisentraut2002-09-05 18:28:46 +0000
commit337da0678ab3b0fe7e339cd35c6c50ad5441a534 (patch)
tree62b6d649585ee864a16c1922736e4c8d66ebc54b /src/makefiles
parenta11ea5e2a3bc47321eaff824b588c07a5974a729 (diff)
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.
Diffstat (limited to 'src/makefiles')
-rw-r--r--src/makefiles/Makefile.win25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/makefiles/Makefile.win b/src/makefiles/Makefile.win
index bcf1165f014..9bbabdecc78 100644
--- a/src/makefiles/Makefile.win
+++ b/src/makefiles/Makefile.win
@@ -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
-
-ifeq ($(findstring ecpg/lib,$(subdir)), ecpg/lib)
-override CPPFLAGS+= -DBUILDING_DLL=1
endif
-ifeq ($(findstring interfaces/libpq++,$(subdir)), interfaces/libpq++)
-override CPPFLAGS+= -DBUILDING_DLL=1
+ifneq (,$(findstring ecpg/lib,$(subdir)))
+override CPPFLAGS+= -DBUILDING_DLL
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