1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +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

@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.86 2002/09/04 15:45:50 tgl Exp $
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.87 2002/09/05 18:28:46 petere Exp $
#
#-------------------------------------------------------------------------
@@ -40,10 +40,16 @@ else # win
postgres: $(OBJS) $(DLLINIT) postgres.def libpostgres.a
$(DLLTOOL) --dllname $@$(X) --output-exp $@.exp --def postgres.def
$(CC) $(LDFLAGS) -o $@$(X) -Wl,--base-file,$@.base $@.exp $(OBJS) $(DLLLIBS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@$(X) -Wl,--base-file,$@.base $@.exp $(OBJS) $(LIBS)
$(DLLTOOL) --dllname $@$(X) --base-file $@.base --output-exp $@.exp --def postgres.def
$(CC) $(LDFLAGS) -o $@$(X) $@.exp $(OBJS) $(DLLLIBS)
rm $@.exp $@.base
$(CC) $(CFLAGS) $(LDFLAGS) -o $@$(X) $@.exp $(OBJS) $(LIBS)
rm -f $@.exp $@.base
postgres.def: $(OBJS)
$(DLLTOOL) --export-all --output-def $@ $^
libpostgres.a: postgres.def
$(DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@
endif # win
@@ -57,17 +63,6 @@ $(DIRS:%=%-recursive): $(top_builddir)/src/include/parser/parse.h $(top_builddir
$(MAKE) -C $(subst -recursive,,$@) all
ifeq ($(MAKE_DLL), true)
postgres.def: $(OBJS)
$(DLLTOOL) --export-all --output-def $@ $(OBJS)
libpostgres.a: $(OBJS) $(DLLINIT) postgres.def
$(DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@
endif # MAKE_DLL
$(DLLINIT): $(DLLINIT:%.o=%.c)
$(MAKE) -C $(@D) $(@F)
@@ -169,9 +164,7 @@ clean:
$(top_srcdir)/src/include/parser/parse.h \
$(top_builddir)/src/include/utils/fmgroids.h
ifeq ($(PORTNAME), win)
ifeq ($(MAKE_DLL), true)
rm -f postgres.dll postgres.def libpostgres.a
endif
endif
for i in $(DIRS); do $(MAKE) -C $$i clean || exit; done