aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1997-04-12 10:33:10 +0000
committerMarc G. Fournier <scrappy@hub.org>1997-04-12 10:33:10 +0000
commit09a5dabc30e979431cddec7466d079e8c7d76dcd (patch)
treea08fbea5b60222851bd7193938e5ef70a8d90351 /src
parent7113e880b8e97e1b26dbbf91a025263311eb6812 (diff)
downloadpostgresql-09a5dabc30e979431cddec7466d079e8c7d76dcd.tar.gz
postgresql-09a5dabc30e979431cddec7466d079e8c7d76dcd.zip
Remove port specific Makefile 'targets' (ie. shared libraries) from
Makefile.global and move them to seperate 'include' makefiles Over time, should become even more port specific: ie. Makefile.BSD44_derived should be broken down into netbsd/freebsd specific ports
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in182
-rw-r--r--src/makefiles/Makefile.BSD44_derived9
-rw-r--r--src/makefiles/Makefile.aix21
-rw-r--r--src/makefiles/Makefile.alpha2
-rw-r--r--src/makefiles/Makefile.dgux2
-rw-r--r--src/makefiles/Makefile.hpux23
-rw-r--r--src/makefiles/Makefile.i386_solaris2
-rw-r--r--src/makefiles/Makefile.irix57
-rw-r--r--src/makefiles/Makefile.linux8
-rw-r--r--src/makefiles/Makefile.sparc_solaris2
-rw-r--r--src/makefiles/Makefile.sunos42
-rw-r--r--src/makefiles/Makefile.svr49
-rw-r--r--src/makefiles/Makefile.ultrix42
-rw-r--r--src/makefiles/Makefile.univel12
14 files changed, 110 insertions, 173 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index a3f3d0e465c..e5efb1eed14 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.19 1997/04/04 11:21:39 scrappy Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.20 1997/04/12 10:32:03 scrappy Exp $
#
# NOTES
# Essentially all Postgres make files include this file and use the
@@ -227,16 +227,6 @@ DASH_N= @DASH_N@
BACKSLASH_C= @BACKSLASH_C@
-##############################################################################
-#
-# Customization.
-#
-# This includes your local customizations if Makefile.custom exists
-# in the source directory. This file doesn't exist in the original
-# distribution so that it doesn't get overwritten when you upgrade.
-ifneq ($(wildcard $(SRCDIR)/Makefile.custom), )
-include $(SRCDIR)/Makefile.custom
-endif
#-------------------------------------------------------------
# See the subdirectory template for default settings for these
@@ -251,171 +241,17 @@ CFLAGS_SL= @SHARED_LIB@
LDFLAGS= @LDFLAGS@ @LIBS@
DLSUFFIX= @DLSUFFIX@
-#----------------------------------------------------------------------
-ifeq ($(PORTNAME), BSD44_derived)
-%.so: %.o
- $(LD) -x -r -o $<.obj $<
- @echo building shared object $@
- @rm -f $@.pic
- @${AR} cq $@.pic `lorder $<.obj | tsort`
- ${RANLIB} $@.pic
- @rm -f $@
- $(LD) -x -Bshareable -Bforcearchive \
- -o $@ $@.pic
-endif
-
-#--------------------------------------------------------------------------
-
-ifeq ($(PORTNAME), aix)
-
-# MAKE_EXPORTS is required for svr4 loaders that want a file of
-# symbol names to tell them what to export/import.
-MAKE_EXPORTS= true
-
-EXPSUFF= .exp
-
-POSTGRES_EXP= $(SRCDIR)/backend/postgres$(EXPSUFF)
-
-MKLDEXPORT=$(SRCDIR)/backend/port/aix/mkldexport.sh
-
-%$(EXPSUFF): %.o
- $(MKLDEXPORT) $< `pwd` > $@
-
-$(POSTGRES_EXP):
- $(MAKE) -C $(SRCDIR)/backend postgres.exp
-
-%.so: %.o %$(EXPSUFF) $(POSTGRES_EXP)
- @echo Making share library $@ from $*.o, $*$(EXPSUFF), and postgres.exp
- $(LD) -H512 -T512 -o $@ -e _nostart \
- -bI:$(POSTGRES_EXP) -bE:$*$(EXPSUFF) \
- $*.o @MATH_LIB@ -lc 2>/dev/null
-endif
-
-#---------------------------------------------------------------------------
-
-ifeq ($(PORTNAME), alpha)
-%.so: %.o
- $(LD) -shared -expect_unresolved '*' -o $@ $<
-endif
-
-#--------------------------------------------------------------------------
-
-ifeq ($(PORTNAME), dgux)
-%.so: %.o
- $(CC) -shared -o $@ $<
-endif
-
-#----------------------------------------------------------------------------
-
-ifeq ($(PORTNAME), hpux)
-
-#ifdef ENFORCE_ALIGNMENT
-# CFLAGS_BE= -DNOFIXADE
-#else
-# HPUX_VERS:= $(shell uname -r)
-# HPUX_MAJOR= ${HPUX_VERS:R:E}
-# HPUX_MINOR= ${HPUX_VERS:E}
-# ifeq ($(HPUX_MAJOR), 08)
-# CFLAGS_BE+= +u -DHP_S500_ALIGN
-# LDFLAGS_BE+= +u
-# else
-# ifeq ($(HPUX_MAJOR), 09)
-# ifeq ($(CC), cc)
-# CFLAGS_BE+= +u4
-# LDFLAGS_BE+= +u4
-# endif
-# endif
-# endif
-#endif
-
-%.sl: %.o
- $(LD) -b -o $@ $<
-
-endif
-
-#--------------------------------------------------------------------------
-
-ifeq ($(PORTNAME), i386_solaris)
-%.so: %.o
- $(LD) -G -Bdynamic -o $@ $<
-endif
-
-#----------------------------------------------------------------------------
-
-ifeq ($(PORTNAME), irix5)
-
-# RANLIB is not used on IRIX 5
-RANLIB= touch
-
-%.so: %.o
- $(LD) -G -Bdynamic -o $@ $< $(LDFLAGS)
-
-endif
-
-#---------------------------------------------------------------------------
-
-ifeq ($(PORTNAME), linux)
-ifdef LINUX_ELF
-LDFLAGS+= -rdynamic
-endif
-MK_NO_LORDER= true
-
-%.so: %.o
- $(CC) -shared -o $@ $<
-
-endif
-
-#---------------------------------------------------------------------------
-
-ifeq ($(PORTNAME), sunos4)
-%.so: %.o
- $(LD) -dc -dp -Bdynamic -o $@ $<
-endif
-
-#----------------------------------------------------------------------------
-
-ifeq ($(PORTNAME), sparc_solaris)
-%.so: %.o
- $(LD) -G -Bdynamic -o $@ $<
-endif
-
-#-----------------------------------------------------------------------------
-
-ifeq ($(PORTNAME), svr4)
-# MAKE_EXPORTS is required for svr4 loaders that want a file of
-# symbol names to tell them what to export/import.
-MAKE_EXPORTS= true
-
-LDFLAGS+= /usr/ucblib/libucb.a -LD-Blargedynsym
-
-%.so: %.o
- $(LD) -G -Bdynamic -o $@ $<
-
-endif
-
-#---------------------------------------------------------------------------
-
-ifeq ($(PORTNAME), ultrix4)
-# install creates intermediate directories
-NO_BEFOREINSTL= true
-endif
-
-
-#-----------------------------------------------------------------------------
+include $(SRCDIR)/Makefile.port
+##############################################################################
#
-# The univel port is almost guaranteed NOT to work yet.
+# Customization.
#
-ifeq ($(PORTNAME), univel)
-# MAKE_EXPORTS is required for svr4 loaders that want a file of
-# symbol names to tell them what to export/import.
-#MAKE_EXPORTS= true
-
-%.so: %.o
- $(LD) -G -Bdynamic -o $@ $<
-
-INSTALL= /usr/ucb/install
-
+# This includes your local customizations if Makefile.custom exists
+# in the source directory. This file doesn't exist in the original
+# distribution so that it doesn't get overwritten when you upgrade.
+ifneq ($(wildcard $(SRCDIR)/Makefile.custom), )
+include $(SRCDIR)/Makefile.custom
endif
# This goes here so that customization in Makefile.custom is effective
diff --git a/src/makefiles/Makefile.BSD44_derived b/src/makefiles/Makefile.BSD44_derived
new file mode 100644
index 00000000000..1c17504605c
--- /dev/null
+++ b/src/makefiles/Makefile.BSD44_derived
@@ -0,0 +1,9 @@
+%.so: %.o
+ $(LD) -x -r -o $<.obj $<
+ @echo building shared object $@
+ @rm -f $@.pic
+ @${AR} cq $@.pic `lorder $<.obj | tsort`
+ ${RANLIB} $@.pic
+ @rm -f $@
+ $(LD) -x -Bshareable -Bforcearchive \
+ -o $@ $@.pic
diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix
new file mode 100644
index 00000000000..acd10c2fbc9
--- /dev/null
+++ b/src/makefiles/Makefile.aix
@@ -0,0 +1,21 @@
+# MAKE_EXPORTS is required for svr4 loaders that want a file of
+# symbol names to tell them what to export/import.
+MAKE_EXPORTS= true
+
+EXPSUFF= .exp
+
+POSTGRES_EXP= $(SRCDIR)/backend/postgres$(EXPSUFF)
+
+MKLDEXPORT=$(SRCDIR)/backend/port/aix/mkldexport.sh
+
+%$(EXPSUFF): %.o
+ $(MKLDEXPORT) $< `pwd` > $@
+
+$(POSTGRES_EXP):
+ $(MAKE) -C $(SRCDIR)/backend postgres.exp
+
+%.so: %.o %$(EXPSUFF) $(POSTGRES_EXP)
+ @echo Making share library $@ from $*.o, $*$(EXPSUFF), and postgres.exp
+ $(LD) -H512 -T512 -o $@ -e _nostart \
+ -bI:$(POSTGRES_EXP) -bE:$*$(EXPSUFF) \
+ $*.o @MATH_LIB@ -lc 2>/dev/null
diff --git a/src/makefiles/Makefile.alpha b/src/makefiles/Makefile.alpha
new file mode 100644
index 00000000000..a9e8e948ec6
--- /dev/null
+++ b/src/makefiles/Makefile.alpha
@@ -0,0 +1,2 @@
+%.so: %.o
+ $(LD) -shared -expect_unresolved '*' -o $@ $<
diff --git a/src/makefiles/Makefile.dgux b/src/makefiles/Makefile.dgux
new file mode 100644
index 00000000000..21a43c0f15a
--- /dev/null
+++ b/src/makefiles/Makefile.dgux
@@ -0,0 +1,2 @@
+%.so: %.o
+ $(CC) -shared -o $@ $<
diff --git a/src/makefiles/Makefile.hpux b/src/makefiles/Makefile.hpux
new file mode 100644
index 00000000000..9b530f76815
--- /dev/null
+++ b/src/makefiles/Makefile.hpux
@@ -0,0 +1,23 @@
+
+#ifdef ENFORCE_ALIGNMENT
+# CFLAGS_BE= -DNOFIXADE
+#else
+# HPUX_VERS:= $(shell uname -r)
+# HPUX_MAJOR= ${HPUX_VERS:R:E}
+# HPUX_MINOR= ${HPUX_VERS:E}
+# ifeq ($(HPUX_MAJOR), 08)
+# CFLAGS_BE+= +u -DHP_S500_ALIGN
+# LDFLAGS_BE+= +u
+# else
+# ifeq ($(HPUX_MAJOR), 09)
+# ifeq ($(CC), cc)
+# CFLAGS_BE+= +u4
+# LDFLAGS_BE+= +u4
+# endif
+# endif
+# endif
+#endif
+
+%.sl: %.o
+ $(LD) -b -o $@ $<
+
diff --git a/src/makefiles/Makefile.i386_solaris b/src/makefiles/Makefile.i386_solaris
new file mode 100644
index 00000000000..b67d7ed5e21
--- /dev/null
+++ b/src/makefiles/Makefile.i386_solaris
@@ -0,0 +1,2 @@
+%.so: %.o
+ $(LD) -G -Bdynamic -o $@ $<
diff --git a/src/makefiles/Makefile.irix5 b/src/makefiles/Makefile.irix5
new file mode 100644
index 00000000000..e0f705d051e
--- /dev/null
+++ b/src/makefiles/Makefile.irix5
@@ -0,0 +1,7 @@
+
+# RANLIB is not used on IRIX 5
+RANLIB= touch
+
+%.so: %.o
+ $(LD) -G -Bdynamic -o $@ $< $(LDFLAGS)
+
diff --git a/src/makefiles/Makefile.linux b/src/makefiles/Makefile.linux
new file mode 100644
index 00000000000..21df0c8a23a
--- /dev/null
+++ b/src/makefiles/Makefile.linux
@@ -0,0 +1,8 @@
+ifdef LINUX_ELF
+LDFLAGS+= -rdynamic
+endif
+MK_NO_LORDER= true
+
+%.so: %.o
+ $(CC) -shared -o $@ $<
+
diff --git a/src/makefiles/Makefile.sparc_solaris b/src/makefiles/Makefile.sparc_solaris
new file mode 100644
index 00000000000..b67d7ed5e21
--- /dev/null
+++ b/src/makefiles/Makefile.sparc_solaris
@@ -0,0 +1,2 @@
+%.so: %.o
+ $(LD) -G -Bdynamic -o $@ $<
diff --git a/src/makefiles/Makefile.sunos4 b/src/makefiles/Makefile.sunos4
new file mode 100644
index 00000000000..3bcdf0806c5
--- /dev/null
+++ b/src/makefiles/Makefile.sunos4
@@ -0,0 +1,2 @@
+%.so: %.o
+ $(LD) -dc -dp -Bdynamic -o $@ $<
diff --git a/src/makefiles/Makefile.svr4 b/src/makefiles/Makefile.svr4
new file mode 100644
index 00000000000..9c9e5b3e5af
--- /dev/null
+++ b/src/makefiles/Makefile.svr4
@@ -0,0 +1,9 @@
+# MAKE_EXPORTS is required for svr4 loaders that want a file of
+# symbol names to tell them what to export/import.
+MAKE_EXPORTS= true
+
+LDFLAGS+= /usr/ucblib/libucb.a -LD-Blargedynsym
+
+%.so: %.o
+ $(LD) -G -Bdynamic -o $@ $<
+
diff --git a/src/makefiles/Makefile.ultrix4 b/src/makefiles/Makefile.ultrix4
new file mode 100644
index 00000000000..cf46e90819b
--- /dev/null
+++ b/src/makefiles/Makefile.ultrix4
@@ -0,0 +1,2 @@
+# install creates intermediate directories
+NO_BEFOREINSTL= true
diff --git a/src/makefiles/Makefile.univel b/src/makefiles/Makefile.univel
new file mode 100644
index 00000000000..3bfc5c0799e
--- /dev/null
+++ b/src/makefiles/Makefile.univel
@@ -0,0 +1,12 @@
+#
+# The univel port is almost guaranteed NOT to work yet.
+#
+# MAKE_EXPORTS is required for svr4 loaders that want a file of
+# symbol names to tell them what to export/import.
+#MAKE_EXPORTS= true
+
+%.so: %.o
+ $(LD) -G -Bdynamic -o $@ $<
+
+INSTALL= /usr/ucb/install
+