# Copyright (c) 1998, Regents of the University of California
#
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.86 2004/10/16 03:26:43 momjian Exp $
+# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.90 2004/11/20 21:13:04 tgl Exp $
#
#-------------------------------------------------------------------------
SHLIB_LINK += `$(CC) $(LDFLAGS) -print-libgcc-file-name`
endif
ifeq ($(with_gnu_ld), yes)
- LINK.shared = $(CC) $(LDFLAGS) -shared -Wl,-h -Wl,$(soname) -Wl,+b -Wl,$(libdir)
+ LINK.shared = $(CC) $(LDFLAGS) -shared -Wl,-h -Wl,$(soname)
else
- LINK.shared = $(LD) +h $(soname) -b +b $(libdir)
+ # can't use the CC-syntax rpath pattern here
+ rpath =
+ ifeq ($(enable_rpath), yes)
+ LINK.shared = $(LD) +h $(soname) -b +b $(rpathdir)
+ else
+ LINK.shared = $(LD) +h $(soname) -b
+ endif
endif
endif
ifeq ($(PORTNAME), cygwin)
shlib = $(NAME)$(DLSUFFIX)
# needed for /contrib modules, not sure why
- SHLIB_LINK += -lpgport
+ SHLIB_LINK += $(LIBS)
+ haslibarule = yes
endif
ifeq ($(PORTNAME), win32)
shlib = lib$(NAME)$(DLSUFFIX)
+ haslibarule = yes
endif
ifeq ($(PORTNAME), beos)
all-lib: all-static-lib all-shared-lib
-all-static-lib: $(PTHREAD_H_WIN32) $(top_builddir)/src/port/pg_config_paths.h lib$(NAME).a
+all-static-lib: lib$(NAME).a
-all-shared-lib: $(PTHREAD_H_WIN32) $(top_builddir)/src/port/pg_config_paths.h $(shlib)
+all-shared-lib: $(shlib)
ifndef LORDER
MK_NO_LORDER := true
endif
+ifndef haslibarule
lib$(NAME).a: $(OBJS)
ifdef MK_NO_LORDER
$(LINK.static) $@ $^
$(LINK.static) $@ `$(LORDER) $^ | tsort`
endif
$(RANLIB) $@
+endif #haslibarule
ifeq ($(enable_shared), yes)