From 09a5dabc30e979431cddec7466d079e8c7d76dcd Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" <scrappy@hub.org> Date: Sat, 12 Apr 1997 10:33:10 +0000 Subject: [PATCH] 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 --- src/Makefile.global.in | 182 ++------------------------- src/makefiles/Makefile.BSD44_derived | 9 ++ src/makefiles/Makefile.aix | 21 ++++ src/makefiles/Makefile.alpha | 2 + src/makefiles/Makefile.dgux | 2 + src/makefiles/Makefile.hpux | 23 ++++ src/makefiles/Makefile.i386_solaris | 2 + src/makefiles/Makefile.irix5 | 7 ++ src/makefiles/Makefile.linux | 8 ++ src/makefiles/Makefile.sparc_solaris | 2 + src/makefiles/Makefile.sunos4 | 2 + src/makefiles/Makefile.svr4 | 9 ++ src/makefiles/Makefile.ultrix4 | 2 + src/makefiles/Makefile.univel | 12 ++ 14 files changed, 110 insertions(+), 173 deletions(-) create mode 100644 src/makefiles/Makefile.BSD44_derived create mode 100644 src/makefiles/Makefile.aix create mode 100644 src/makefiles/Makefile.alpha create mode 100644 src/makefiles/Makefile.dgux create mode 100644 src/makefiles/Makefile.hpux create mode 100644 src/makefiles/Makefile.i386_solaris create mode 100644 src/makefiles/Makefile.irix5 create mode 100644 src/makefiles/Makefile.linux create mode 100644 src/makefiles/Makefile.sparc_solaris create mode 100644 src/makefiles/Makefile.sunos4 create mode 100644 src/makefiles/Makefile.svr4 create mode 100644 src/makefiles/Makefile.ultrix4 create mode 100644 src/makefiles/Makefile.univel 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 + -- GitLab