summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1999-07-30 04:13:44 +0000
committerMarc G. Fournier <scrappy@hub.org>1999-07-30 04:13:44 +0000
commit74a1d19c4a2575afa055520c8e696fbf5efd991a (patch)
treeab885ec10ee81487d9b0179c78580a32c383e387 /src
parent8eb81bb89de78bd5ddba4f6df8b3e8e3335a9f4c (diff)
Minor back-ports from v6.6 for the compile/configuration...
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in3
-rw-r--r--src/Makefile.shlib60
2 files changed, 43 insertions, 20 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 4f393d7ee16..3fd046cedf4 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.56 1999/06/25 00:13:45 tgl Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.56.2.1 1999/07/30 04:13:44 scrappy Exp $
#
# NOTES
# Essentially all Postgres make files include this file and use the
@@ -220,6 +220,7 @@ GZCAT= @GZCAT@
# Name of the target platform.
PORTNAME= @PORTNAME@
+CPU= @CPU@
# Various grungy items needed to configure some platforms.
HAVE_POSIX_SIGNALS= @HAVE_POSIX_SIGNALS@
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index bb06b30fbe4..7ac06db9c8b 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -6,7 +6,7 @@
# Copyright (c) 1998, Regents of the University of California
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.12.2.2 1999/07/16 22:46:16 tgl Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.12.2.3 1999/07/30 04:13:44 scrappy Exp $
#
#-------------------------------------------------------------------------
@@ -56,25 +56,12 @@ install-shlib-dep :=
# Makefile.global (or really Makefile.port) to supply DLSUFFIX and other
# symbols.
-ifeq ($(PORTNAME), irix5)
- install-shlib-dep := install-shlib
- shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- LDFLAGS_SL := -shared
- CFLAGS += $(CFLAGS_SL)
-endif
+# Try to keep the sections in some kind of order, folks...
-ifeq ($(PORTNAME), freebsd)
- ifdef BSD_SHLIB
- install-shlib-dep := install-shlib
- ifdef ELF_SYSTEM
- shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
- LDFLAGS_SL := -x -shared -soname $(shlib)
- else
- shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- LDFLAGS_SL := -x -Bshareable -Bforcearchive
- endif
- CFLAGS += $(CFLAGS_SL)
- endif
+ifeq ($(PORTNAME), aix)
+ install-shlib-dep := install-shlib
+ shlib := lib$(NAME)$(DLSUFFIX)
+ SHLIB_LINK += -lc
endif
ifeq ($(PORTNAME), bsd)
@@ -108,6 +95,20 @@ ifeq ($(PORTNAME), bsdi)
endif
endif
+ifeq ($(PORTNAME), freebsd)
+ ifdef BSD_SHLIB
+ install-shlib-dep := install-shlib
+ ifdef ELF_SYSTEM
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+ LDFLAGS_SL := -x -shared -soname $(shlib)
+ else
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ LDFLAGS_SL := -x -Bshareable -Bforcearchive
+ endif
+ CFLAGS += $(CFLAGS_SL)
+ endif
+endif
+
ifeq ($(PORTNAME), hpux)
install-shlib-dep := install-shlib
# HPUX doesn't believe in version numbers for shlibs
@@ -116,6 +117,13 @@ ifeq ($(PORTNAME), hpux)
CFLAGS += $(CFLAGS_SL)
endif
+ifeq ($(PORTNAME), irix5)
+ install-shlib-dep := install-shlib
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ LDFLAGS_SL := -shared
+ CFLAGS += $(CFLAGS_SL)
+endif
+
ifeq ($(PORTNAME), linux)
install-shlib-dep := install-shlib
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
@@ -188,6 +196,7 @@ all: lib$(NAME).a $(shlib)
# Rules to build regular and shared libraries
ifneq ($(PORTNAME), win)
+
lib$(NAME).a: $(OBJS)
ifdef MK_NO_LORDER
$(AR) $(AROPT) $@ $(OBJS)
@@ -195,11 +204,14 @@ else
$(AR) $(AROPT) $@ `lorder $(OBJS) | tsort`
endif
$(RANLIB) $@
+
endif
ifneq ($(shlib),)
ifneq ($(PORTNAME), win)
+ifneq ($(PORTNAME), aix)
+# Normal case
$(shlib): $(OBJS)
$(LD) $(LDFLAGS_SL) -o $@ $(OBJS) $(SHLIB_LINK)
if [ "$(shlib)" != "lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)" ]; then \
@@ -213,6 +225,16 @@ $(shlib): $(OBJS)
else
+# AIX case
+$(shlib): lib$(NAME).a
+ $(MKLDEXPORT) lib$(NAME).a $(LIBDIR) > lib$(NAME)$(EXPSUFF)
+ $(LD) -H512 -bM:SRE -bI:$(SRCDIR)/backend/$(POSTGRES_IMP) -bE:lib$(NAME)$(EXPSUFF) -o $@ $< $(LDFLAGS) $(SHLIB_LINK)
+
+endif
+
+else
+
+# WIN case
$(shlib) lib$(NAME).a: $(OBJS) $(SRCDIR)/utils/dllinit.o
$(DLLTOOL) --export-all --output-def $(NAME).def $(OBJS)
$(DLLWRAP) -o $(shlib) --dllname $(shlib) --def $(NAME).def $(OBJS) $(SRCDIR)/utils/dllinit.o $(DLLINIT) $(SHLIB_LINK)