aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Henderson <bryanh@giraffe.netgate.net>1996-10-27 09:55:05 +0000
committerBryan Henderson <bryanh@giraffe.netgate.net>1996-10-27 09:55:05 +0000
commitb0d6f0aa639610f47bed818f7bc4e584cd9a391b (patch)
tree103835aa6881d565d6ab23d09b7784c4952d8a2b
parent1e39d14ff33f7ac436bbbd0b46a3e31faafed561 (diff)
downloadpostgresql-b0d6f0aa639610f47bed818f7bc4e584cd9a391b.tar.gz
postgresql-b0d6f0aa639610f47bed818f7bc4e584cd9a391b.zip
Simplify make files, add full dependencies.
-rw-r--r--src/Makefile.global633
-rw-r--r--src/backend/Makefile408
-rw-r--r--src/backend/access/Makefile46
-rw-r--r--src/backend/access/Makefile.inc36
-rw-r--r--src/backend/access/common/Makefile43
-rw-r--r--src/backend/access/common/Makefile.inc16
-rw-r--r--src/backend/access/gist/Makefile37
-rw-r--r--src/backend/access/gist/Makefile.inc16
-rw-r--r--src/backend/access/hash/Makefile38
-rw-r--r--src/backend/access/hash/Makefile.inc18
-rw-r--r--src/backend/access/heap/Makefile37
-rw-r--r--src/backend/access/heap/Makefile.inc14
-rw-r--r--src/backend/access/index/Makefile37
-rw-r--r--src/backend/access/index/Makefile.inc14
-rw-r--r--src/backend/access/nbtree/Makefile38
-rw-r--r--src/backend/access/nbtree/Makefile.inc15
-rw-r--r--src/backend/access/rtree/Makefile37
-rw-r--r--src/backend/access/rtree/Makefile.inc14
-rw-r--r--src/backend/access/transam/Makefile37
-rw-r--r--src/backend/access/transam/Makefile.inc14
-rw-r--r--src/backend/bootstrap/Makefile71
-rw-r--r--src/backend/bootstrap/Makefile.inc63
-rw-r--r--src/backend/catalog/Makefile62
-rw-r--r--src/backend/catalog/Makefile.inc68
-rw-r--r--src/backend/commands/Makefile39
-rw-r--r--src/backend/commands/Makefile.inc25
-rw-r--r--src/backend/executor/Makefile42
-rw-r--r--src/backend/executor/Makefile.inc29
-rw-r--r--src/backend/include/Makefile.inc16
-rw-r--r--src/backend/lib/Makefile37
-rw-r--r--src/backend/lib/Makefile.inc20
-rw-r--r--src/backend/libpq/Makefile50
-rw-r--r--src/backend/libpq/Makefile.inc28
-rw-r--r--src/backend/main/Makefile37
-rw-r--r--src/backend/main/Makefile.inc16
-rw-r--r--src/backend/nodes/Makefile39
-rw-r--r--src/backend/nodes/Makefile.inc33
-rw-r--r--src/backend/optimizer/Makefile32
-rw-r--r--src/backend/optimizer/Makefile.inc29
-rw-r--r--src/backend/optimizer/path/Makefile41
-rw-r--r--src/backend/optimizer/path/Makefile.inc21
-rw-r--r--src/backend/optimizer/plan/Makefile39
-rw-r--r--src/backend/optimizer/plan/Makefile.inc15
-rw-r--r--src/backend/optimizer/prep/Makefile39
-rw-r--r--src/backend/optimizer/prep/Makefile.inc14
-rw-r--r--src/backend/optimizer/util/Makefile40
-rw-r--r--src/backend/optimizer/util/Makefile.inc15
-rw-r--r--src/backend/parser/Makefile58
-rw-r--r--src/backend/parser/Makefile.inc45
-rw-r--r--src/backend/port/BSD44_derived/Makefile36
-rw-r--r--src/backend/port/BSD44_derived/Makefile.inc28
-rw-r--r--src/backend/port/Makefile37
-rw-r--r--src/backend/port/Makefile.inc21
-rw-r--r--src/backend/port/aix/Makefile36
-rw-r--r--src/backend/port/aix/Makefile.inc40
-rw-r--r--src/backend/port/alpha/Makefile36
-rw-r--r--src/backend/port/alpha/Makefile.inc25
-rw-r--r--src/backend/port/bsdi/Makefile36
-rw-r--r--src/backend/port/bsdi/Makefile.inc14
-rw-r--r--src/backend/port/bsdi_2_1/Makefile36
-rw-r--r--src/backend/port/bsdi_2_1/Makefile.inc13
-rw-r--r--src/backend/port/dgux/Makefile36
-rw-r--r--src/backend/port/dgux/Makefile.inc21
-rw-r--r--src/backend/port/hpux/Makefile36
-rw-r--r--src/backend/port/hpux/Makefile.inc59
-rw-r--r--src/backend/port/i386_solaris/Makefile36
-rw-r--r--src/backend/port/i386_solaris/Makefile.inc18
-rw-r--r--src/backend/port/irix5/Makefile36
-rw-r--r--src/backend/port/irix5/Makefile.inc18
-rw-r--r--src/backend/port/linux/Makefile40
-rw-r--r--src/backend/port/linux/Makefile.inc34
-rw-r--r--src/backend/port/sparc/Makefile36
-rw-r--r--src/backend/port/sparc/Makefile.inc21
-rw-r--r--src/backend/port/sparc_solaris/Makefile36
-rw-r--r--src/backend/port/sparc_solaris/Makefile.inc18
-rw-r--r--src/backend/port/svr4/Makefile36
-rw-r--r--src/backend/port/svr4/Makefile.inc18
-rw-r--r--src/backend/port/ultrix4/Makefile36
-rw-r--r--src/backend/port/ultrix4/Makefile.inc25
-rw-r--r--src/backend/port/win32/regex/Makefile.inc14
-rw-r--r--src/backend/postmaster/Makefile37
-rw-r--r--src/backend/postmaster/Makefile.inc16
-rw-r--r--src/backend/regex/Makefile39
-rw-r--r--src/backend/regex/Makefile.inc14
-rw-r--r--src/backend/rewrite/Makefile38
-rw-r--r--src/backend/rewrite/Makefile.inc22
-rw-r--r--src/backend/storage/Makefile43
-rw-r--r--src/backend/storage/Makefile.inc31
-rw-r--r--src/backend/storage/buffer/Makefile37
-rw-r--r--src/backend/storage/buffer/Makefile.inc16
-rw-r--r--src/backend/storage/file/Makefile37
-rw-r--r--src/backend/storage/file/Makefile.inc14
-rw-r--r--src/backend/storage/ipc/Makefile38
-rw-r--r--src/backend/storage/ipc/Makefile.inc15
-rw-r--r--src/backend/storage/large_object/Makefile37
-rw-r--r--src/backend/storage/large_object/Makefile.inc14
-rw-r--r--src/backend/storage/lmgr/Makefile37
-rw-r--r--src/backend/storage/lmgr/Makefile.inc14
-rw-r--r--src/backend/storage/page/Makefile37
-rw-r--r--src/backend/storage/page/Makefile.inc16
-rw-r--r--src/backend/storage/smgr/Makefile37
-rw-r--r--src/backend/storage/smgr/Makefile.inc14
-rw-r--r--src/backend/tcop/Makefile42
-rw-r--r--src/backend/tcop/Makefile.inc18
-rw-r--r--src/backend/tioga/Makefile37
-rw-r--r--src/backend/tioga/Makefile.inc21
-rw-r--r--src/backend/utils/Makefile68
-rw-r--r--src/backend/utils/Makefile.inc62
-rw-r--r--src/backend/utils/adt/Makefile41
-rw-r--r--src/backend/utils/adt/Makefile.inc20
-rw-r--r--src/backend/utils/cache/Makefile37
-rw-r--r--src/backend/utils/cache/Makefile.inc15
-rw-r--r--src/backend/utils/error/Makefile37
-rw-r--r--src/backend/utils/error/Makefile.inc14
-rw-r--r--src/backend/utils/fmgr/Makefile45
-rw-r--r--src/backend/utils/fmgr/Makefile.inc15
-rw-r--r--src/backend/utils/hash/Makefile37
-rw-r--r--src/backend/utils/hash/Makefile.inc14
-rw-r--r--src/backend/utils/init/Makefile40
-rw-r--r--src/backend/utils/init/Makefile.inc14
-rw-r--r--src/backend/utils/mmgr/Makefile37
-rw-r--r--src/backend/utils/mmgr/Makefile.inc15
-rw-r--r--src/backend/utils/sort/Makefile37
-rw-r--r--src/backend/utils/sort/Makefile.inc14
-rw-r--r--src/backend/utils/time/Makefile37
-rw-r--r--src/backend/utils/time/Makefile.inc14
-rw-r--r--src/mk/port/postgres.mk.BSD44_derived48
-rw-r--r--src/mk/port/postgres.mk.aix57
-rw-r--r--src/mk/port/postgres.mk.alpha52
-rw-r--r--src/mk/port/postgres.mk.bsdi40
-rw-r--r--src/mk/port/postgres.mk.bsdi_2_140
-rw-r--r--src/mk/port/postgres.mk.dgux39
-rw-r--r--src/mk/port/postgres.mk.hpux64
-rw-r--r--src/mk/port/postgres.mk.i386_solaris57
-rw-r--r--src/mk/port/postgres.mk.irix553
-rw-r--r--src/mk/port/postgres.mk.linux54
-rw-r--r--src/mk/port/postgres.mk.sparc38
-rw-r--r--src/mk/port/postgres.mk.sparc_solaris57
-rw-r--r--src/mk/port/postgres.mk.svr475
-rw-r--r--src/mk/port/postgres.mk.ultrix434
140 files changed, 3271 insertions, 2314 deletions
diff --git a/src/Makefile.global b/src/Makefile.global
index 3e20f2bc06d..8f3bbf0ee72 100644
--- a/src/Makefile.global
+++ b/src/Makefile.global
@@ -1,4 +1,4 @@
-#-------------------------------------------------------------------------
+#----------------------------------------------------------------------------
#
# Makefile.global--
# global configuration for the Makefiles
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.42 1996/10/23 07:33:04 scrappy Exp $
+# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.43 1996/10/27 09:45:05 bryanh Exp $
#
# NOTES
# This is seen by any Makefiles that include mk/postgres.mk. To
@@ -20,6 +20,10 @@
# since no dependecies are created for these. (of course you can
# be crafty and check what files really depend on them and just remake
# those).
+#
+# Before including this file, you must set the SRCDIR variable to the
+# path of the top of the Postgres source tree (the directory that
+# contains this file).
#
#-------------------------------------------------------------------------
@@ -40,8 +44,7 @@
# sparc - SUN SPARC on SunOS 4.1.3
# ultrix4 - DEC MIPS on Ultrix 4.4
# linux - Intel x86 on Linux 1.2 and Linux ELF
-# (For non-ELF Linux, you need to comment out
-# "LINUX_ELF=1" in src/mk/port/postgres.mk.linux)
+# (For non-ELF Linux, see LINUX_ELF below).
# BSD44_derived - OSs derived from 4.4-lite BSD (NetBSD, FreeBSD)
# bsdi - BSD/OS 2.0 and 2.01
# bsdi_2_1 - BSD/OS 2.1
@@ -59,8 +62,18 @@
# or the makefiles can get confused
PORTNAME= UNDEFINED
-# SRCDIR specifies where the source files are.
+# Ignore LINUX_ELF if you're not using Linux. But if you are, and you're
+# compiling to a.out (which means you're using the dld dynamic loading
+# library), set LINUX_ELF to null in Makefile.custom.
+LINUX_ELF= 1
+
+# SRCDIR specifies where the source files are. It should be defined before
+# we are included, but for transition purposes, we put this default here.
+ifdef SRCDIR
+MKDIR= $(SRCDIR)/mk
+else
SRCDIR= /usr/local/postgres95/src
+endif
# For convenience, POSTGRESDIR is where DATADIR, BINDIR, and LIBDIR
# and other target destinations are rooted. Of course, each of these is
@@ -217,6 +230,27 @@ X11_LIB = -lX11 -lsocket -lnsl
##############################################################################
#
+# YACC
+
+YFLAGS = -d
+
+##############################################################################
+#
+# Installation.
+#
+# For many ports, INSTALL is overridden below.
+INSTALL = install
+RANLIB = ranlib
+
+INSTLOPTS = -c -m 444
+INSTL_EXE_OPTS = -c -m 555
+INSTL_LIB_OPTS = -c -m 664
+
+
+objdir= obj
+
+##############################################################################
+#
# Customization.
#
# This includes your local customizations if Makefile.custom exists
@@ -226,6 +260,7 @@ ifneq ($(wildcard $(MKDIR)/../Makefile.custom), )
include $(MKDIR)/../Makefile.custom
endif
+#############################################################################
# include port specific rules and variables. For instance:
#
# signal(2) handling - this is here because it affects some of
@@ -245,7 +280,586 @@ endif
# is to do signal-handler reinstallation, which doesn't work well
# at all.
#
--include $(MKDIR)/port/postgres.mk.$(PORTNAME)
+# HISTORY: Before October 1996, this file included the following line:
+# -include $(MKDIR)/port/postgres.mk.$(PORTNAME)
+# Now, we instead have all the former contents of those .mk files inline
+# with ifeq ($(PORTNAME) ...). This makes it a little bit easier to use
+# Makefile.global because you don't have to set MKDIR too. It also makes
+# it easier to read the make files. Finally, it should help with
+# migration to autoconf. - Bryan
+
+# Since there are no longer separate files for each platform, much of the
+# commonality among the platforms ought to be factored out of the following.
+
+#----------------------------------------------------------------------
+ifeq ($PORTNAME, BSD44_derived)
+MK_PORT= BSD44_derived
+
+# cc is gcc, but never mind about that...
+CC= gcc
+
+INSTALL= /usr/bin/install
+RANLIB= /usr/bin/ranlib
+
+AROPT = cq
+
+# FreeBSD 2.1R with new Flex v2.5.2 in /usr/local
+LEX = flex
+LDADD+= -L/usr/local/lib -lfl
+
+#
+# for postgres.user.mk
+#
+CFLAGS_SL = -fpic -DPIC
+
+ifneq ($(HOSTTYPE), mips)
+SLSUFF= .so
+endif
+
+%.so: %.o
+ $(LD) -x -r -o $(objdir)/$(<F).obj $(objdir)/$(<F)
+ @echo building shared object $(objdir)/$(@F)
+ @rm -f $(objdir)/$(@F).pic
+ @${AR} cq $(objdir)/$(@F).pic `lorder $(objdir)/$(<F).obj | tsort`
+ ${RANLIB} $(objdir)/$(@F).pic
+ @rm -f $(objdir)/$(@F)
+ $(LD) -x -Bshareable -Bforcearchive \
+ -o $(objdir)/$(@F) $(objdir)/$(@F).pic
+endif
+
+#--------------------------------------------------------------------------
+
+ifeq ($(PORTNAME), aix)
+MK_PORT= aix
+
+# might want to try installbsd instead
+INSTALL= /usr/ucb/install
+
+#
+# for postgres.mk
+#
+
+# the -lm is because "pow" is defined in libbsd.a and we want pow(3m)
+LDADD_BE= -lm -lbsd
+
+# MAKE_EXPORTS is required for svr4 loaders that want a file of
+# symbol names to tell them what to export/import.
+MAKE_EXPORTS= true
+
+#
+# Random things that must be passed everywhere to enable
+# everything to compile. :-/
+#
+# The -qmaxmem is because of optimizer limits.
+# The HAVE_ANSI_CPP flag indicates that cc isn't ANSI but also doesn't
+# have a Reiser (pcc-style) cpp.
+#
+CFLAGS_BE+= -qchars=signed -qmaxmem=4000 -DHAVE_ANSI_CPP
+
+
+#
+# for postgres.user.mk
+#
+EXPSUFF= .exp
+SLSUFF= .so
+
+MKLDEXPORT=$(SRCDIR)/backend/port/aix/mkldexport.sh
+
+%$(EXPSUFF): %.o
+ $(MKLDEXPORT) $(objdir)/$(<F) `pwd` > $(objdir)/$(@F)
+
+%.so: %.o %$(EXPSUFF)
+ @echo The link stage here:
+ $(LD) -H512 -T512 -o $(objdir)/$(@F) -e _nostart \
+ -bI:$(LIBDIR)/postgres$(EXPSUFF) -bE:$*$(EXPSUFF) \
+ $*.o -lm -lc 2>/dev/null
+endif
+
+#---------------------------------------------------------------------------
+
+ifeq ($(PORTNAME), alpha)
+MK_PORT= alpha
+#
+# for postgres.mk
+#
+CFLAGS_BE+= -DUSE_POSIX_SIGNALS
+
+# NOFIXADE disallows unaligned access.
+# on Ultrix and OSF/1 it invokes an explicit syscall.
+# on HP-UX it turns off certain compiler options.
+# This is defined here because a bunch of clients include tmp/c.h,
+# which is where the work is done on HP-UX. It only affects the
+# backend on Ultrix and OSF/1.
+ifdef ENFORCE_ALIGNMENT
+CFLAGS_BE+= -DNOFIXADE
+else
+CFLAGS_BE+= -DNOPRINTADE
+endif
+
+# use the regex library
+USE_REGEX = 1
+
+#
+# for postgres.user.mk
+#
+SLSUFF= .so
+
+# cd into objdir so that so_locations is also in obj
+%.so: %.o
+ cd $(objdir); $(LD) -shared -expect_unresolved '*' -o $(@F) $(<F)
+
+CLEANFILES+= so_locations
+
+#
+# for postgres.shell.mk
+#
+DASH_N=
+BACKSLASH_C='\\\\c'
+
+endif
+
+#---------------------------------------------------------------------------
+
+ifeq ($(PORTNAME), bsdi)
+MK_PORT= bsdi
+
+# cc is gcc v1.42
+# gcc is gcc v2.6.3
+CC= gcc
+
+LEX= flex
+AROPT= cq
+
+# use the regex library
+USE_REGEX = 1
+
+LDADD_BE= -ldld -lcompat
+
+#
+# for postgres.user.mk
+#
+SLSUFF= .o
+
+#
+# for postgres.mk
+#
+CFLAGS_OPT= -g -DUSE_POSIX_SIGNALS # -O2
+
+endif
+
+#--------------------------------------------------------------------------
+
+ifeq ($(PORTNAME), bsdi_2_1)
+MK_PORT= bsdi_2_1
+
+# cc is gcc v1.42
+# gcc is gcc v2.7.2
+CC= gcc
+
+LEX= lex
+AROPT= cq
+
+LD_ADD+= -ltermcap
+
+#
+# for postgres.user.mk
+#
+SLSUFF= .o
+
+#
+# for postgres.mk
+#
+CFLAGS_OPT= -O2 -m486
+CFLAGS_BE = -DUSE_POSIX_SIGNALS
+
+endif
+
+#--------------------------------------------------------------------------
+
+ifeq ($(PORTNAME), dgux)
+MK_PORT= linux
+
+SLSUFF= .so
+#LDFLAGS+= -rdynamic
+
+
+CFLAGS_SL= -fpic
+%.so: %.o
+ cd $(objdir); $(CC) -shared -o $(@F) $(<F)
+
+#
+# for postgres.mk
+#
+CC= gcc
+CFLAGS_OPT= -O2 -pipe
+
+CFLAGS_BE= -D__USE_POSIX_SIGNALS -DUSE_POSIX_SIGNALS -O2
+LDADD_BE= -ldl -lfl
+
+LEX = flex
+YACC = bison -y
+
+INSTALL=/usr/bin/X11/bsdinst
+
+endif
+
+#----------------------------------------------------------------------------
+
+ifeq ($(PORTNAME), hpux)
+MK_PORT= hpux
+
+#
+# for postgres.mk
+#
+LDADD_BE= -lBSD
+
+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
+
+# (extended) ANSI flag for cc (-Ae is same as -Aa -D_HPUX_SOURCE)
+ifeq ($(CC), cc)
+CFLAGS_BE+= -Ae
+endif
+
+# This is a script from the MIT X11 distribution.
+INSTALL= bsdinst
+
+# RANLIB is not used on HP-UX
+RANLIB=touch
+
+#
+# for postgres.user.mk
+#
+CFLAGS_SL= +z
+SLSUFF= .sl
+
+%.sl: %.o
+ $(LD) -b -o $(objdir)/$(@F) $(objdir)/$(<F)
+
+#
+# for postgres.shell.mk
+#
+DASH_N= ''
+BACKSLASH_C='\\\\c'
+
+endif
+
+#--------------------------------------------------------------------------
+
+ifeq ($(PORTNAME), i386_solaris)
+MK_PORT= i386_solaris
+
+# cc won't work!
+CC= gcc
+
+#
+# for postgres.mk
+#
+CFLAGS_BE+= -DUSE_POSIX_SIGNALS
+
+# RANLIB is not used on solaris
+RANLIB=touch
+
+INSTALL=/usr/ucb/install
+
+#
+# Random things that must be passed everywhere to enable
+# everything to compile. :-/
+#
+# The extra -I flag is to scoop up extra BSD-emulating headers.
+CFLAGS_BE+= -DSYSV_DIRENT -I$(POSTGRESDIR)/src/backend/port/sparc_solaris
+LDADD_BE+= -lsocket -lnsl
+
+LD_ADD+= $(LDADD_BE)
+
+#
+# for postgres.user.mk
+#
+ifeq ($(CC), cc)
+CFLAGS_SL= -K PIC
+else
+CFLAGS_SL= -fPIC
+endif
+
+SLSUFF= .so
+
+%.so: %.o
+ $(LD) -G -Bdynamic -o $(objdir)/$(@F) $(objdir)/$(<F)
+
+#
+# for postgres.shell.mk
+#
+DASH_N=''
+BACKSLASH_C='\\\\c'
+
+endif
+
+#----------------------------------------------------------------------------
+
+ifeq ($(PORTNAME), irix5)
+MK_PORT= irix5
+
+CC= cc
+
+#
+# for postgres.mk
+#
+CFLAGS_BE+= -DUSE_POSIX_SIGNALS
+
+# RANLIB is not used on IRIX 5
+RANLIB=touch
+
+INSTALL=/sbin/bsdinst
+
+INSTLOPTS= -m 444
+INSTL_EXE_OPTS= -m 555
+INSTL_LIB_OPTS= -m 664
+
+#
+# Random things that must be passed everywhere to enable
+# everything to compile. :-/
+#
+CFLAGS_BE+= -DSYSV_DIRENT
+
+LD_ADD+= $(LDADD_BE)
+
+SLSUFF= .so
+
+%.so: %.o
+ $(LD) -G -Bdynamic -o $(objdir)/$(@F) $(objdir)/$(<F)
+
+#
+# for postgres.shell.mk
+#
+DASH_N=''
+BACKSLASH_C='\\\\c'
+
+endif
+
+#---------------------------------------------------------------------------
+
+ifeq ($(PORTNAME), linux)
+MK_PORT= linux
+
+ifndef LINUX_ELF
+SLSUFF= .o
+else
+SLSUFF= .so
+LDFLAGS+= -rdynamic
+endif
+MK_NO_LORDER= true
+
+# use the regex library
+USE_REGEX = 1
+
+#
+# for postgres.user.mk
+#
+CFLAGS_SL= -fpic
+%.so: %.o
+ cd $(objdir); $(CC) -shared -o $(@F) $(<F)
+
+#
+# for postgres.mk
+#
+CFLAGS_OPT= -O2 -pipe -m486
+
+# The Linux gnulib #defines the problem away for you and calls
+# the BSD routines if you give it the right flags.
+CFLAGS_BE= -D__USE_BSD -D__USE_BSD_SIGNAL
+LDADD_BE= -lbsd
+
+LEX = flex
+
+endif
+
+#---------------------------------------------------------------------------
+
+ifeq ($(PORTNAME), sparc)
+MK_PORT= sparc
+
+# cc won't work!
+CC= gcc
+
+# the ar on SunOs is dumb, can't use the s option
+AROPT= cq
+
+INSTALL= /usr/bin/install
+RANLIB= /usr/bin/ranlib
+
+#
+# for postgres.user.mk
+#
+ifeq ($(CC), cc)
+CFLAGS_SL= -PIC
+else
+CFLAGS_SL= -fPIC
+endif
+
+SLSUFF= .so
+
+%.so: %.o
+ $(LD) -dc -dp -Bdynamic -o $(objdir)/$(@F) $(objdir)/$(<F)
+
+endif
+
+#----------------------------------------------------------------------------
+
+ifeq ($(PORTNAME), sparc_solaris)
+MK_PORT= sparc_solaris
+
+# cc won't work!
+CC= gcc
+
+#
+# for postgres.mk
+#
+CFLAGS_BE+= -DUSE_POSIX_SIGNALS
+
+# RANLIB is not used on solaris
+RANLIB=touch
+
+INSTALL=/usr/ucb/install
+
+#
+# Random things that must be passed everywhere to enable
+# everything to compile. :-/
+#
+# The extra -I flag is to scoop up extra BSD-emulating headers.
+CFLAGS_BE+= -DSYSV_DIRENT -I$(SRCDIR)/backend/port/sparc_solaris
+LDADD_BE+= -lsocket -lnsl
+
+LD_ADD+= $(LDADD_BE)
+
+#
+# for postgres.user.mk
+#
+ifeq ($(CC), cc)
+CFLAGS_SL= -K PIC
+else
+CFLAGS_SL= -fPIC
+endif
+
+SLSUFF= .so
+
+%.so: %.o
+ $(LD) -G -Bdynamic -o $(objdir)/$(@F) $(objdir)/$(<F)
+
+#
+# for postgres.shell.mk
+#
+DASH_N=''
+BACKSLASH_C='\\\\c'
+
+endif
+
+#-----------------------------------------------------------------------------
+
+ifeq ($(PORTNAME), svr4)
+MK_PORT= svr4
+
+# cc won't work?
+#CC= gcc
+CC= cc -W0
+YACC= bison -y
+
+#
+# for postgres.mk
+#
+CFLAGS_BE+= -DUSE_POSIX_SIGNALS
+
+# MAKE_EXPORTS is required for svr4 loaders that want a file of
+# symbol names to tell them what to export/import.
+MAKE_EXPORTS= true
+
+# RANLIB is not used on svr4
+RANLIB=touch
+
+# GNU install
+INSTALL=/home/tools/bin/install
+
+#
+# Random things that must be passed everywhere to enable
+# everything to compile. :-/
+#
+# The extra -I flag is to scoop up extra BSD-emulating headers.
+CFLAGS_BE+= -DSYSV_DIRENT -I$(POSTGRESDIR)/src/backend/port/svr4
+LDADD_BE+= -lsocket -lnsl -lc /usr/ucblib/libucb.a
+
+LD_ADD+= $(LDADD_BE)
+
+#
+# for postgres.mk
+#
+CFLAGS_OPT= -O
+
+#
+# for postgres.user.mk
+#
+#CFLAGS_SL= -K pic
+ifeq ($(CC), cc)
+#CFLAGS_SL= -K PIC
+else
+#CFLAGS_SL= -fPIC
+endif
+
+SLSUFF= .so
+
+#%.so: %.o
+# $(LD) -G $(LDFLAGS) -o $(objdir)/$(@F) $(objdir)/$(<F)
+%.so: %.o
+ $(LD) -G -Bdynamic -o $(objdir)/$(@F) $(objdir)/$(<F)
+
+#
+# for postgres.shell.mk
+#
+DASH_N=''
+BACKSLASH_C='\\\\c'
+endif
+
+#---------------------------------------------------------------------------
+
+ifeq ($(PORTNAME), ultrix4)
+MK_PORT= ultrix4
+
+#
+# for postgres.mk
+#
+ifdef ENFORCE_ALIGNMENT
+CFLAGS_BE= -DNOFIXADE
+endif
+
+# install creates intermediate directories
+NO_BEFOREINSTL= true
+
+INSTALL= /usr/bin/install
+RANLIB= /usr/bin/ranlib
+
+#
+# for postgres.user.mk
+#
+CFLAGS_SL= -G 0
+SLSUFF= .o
+
+endif
+
+
##############################################################################
#
@@ -254,7 +868,6 @@ endif
srcdir= $(SRCDIR)
includedir= $(HEADERDIR)
-objdir= obj
# This goes here so that customization in Makefile.custom is effective
@@ -287,12 +900,8 @@ endif
# Globally pass PORTNAME
CFLAGS+= -DPORTNAME_$(PORTNAME) -D$(PORTNAME)
-CFLAGS += -I../../backend/port/$(PORTNAME)
-
-# Globally pass the default TCP port for postmaster(1).
-CFLAGS+= -DPOSTPORT='"$(POSTPORT)"'
-# include flags from mk/port/postgres.mk.$(PORTNAME)
+# include port-specific flags
CFLAGS+= $(CFLAGS_BE)
LDADD+= $(LDADD_BE)
LDFLAGS+= $(LDFLAGS_BE)
diff --git a/src/backend/Makefile b/src/backend/Makefile
index c39363841ba..8ce20d097e4 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -5,188 +5,236 @@
#
# Copyright (c) 1994, Regents of the University of California
#
+# Functional notes:
+#
+# Parallel make:
+#
+# This make file is set up so that you can do a parallel make (with
+# the --jobs option of make) and make multiple subdirectories at
+# once.
+#
+# However, the subdirectory make files are not so careful.
+# Normally, the --jobs option would get passed down to those
+# subdirectory makes, like any other make option, and they would
+# fail. But there's a trick: Put a value (max number of
+# processes) on the --jobs option, e.g. --jobs=4. Now, due to a
+# special feature of make, the --jobs option will not get passed
+# to the subdirectory makes. (make does this because if you only
+# want 4 tasks running, then splitting the subdirectory makes into
+# multiple tasks would violate your wishes).
+#
+#
+#
+# Implementation notes:
+#
+# We don't use $(LD) for linking. We use $(CC) instead. This is because
+# the $(CC) program apparently can do linking too, and it has certain
+# thinks like default options and search paths for libraries set up for
+# it that the more primitive $(LD) doesn't have.
+#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.9 1996/10/12 07:44:39 bryanh Exp $
+# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.10 1996/10/27 09:45:39 bryanh Exp $
#
#-------------------------------------------------------------------------
-#
-# The following turns on intermediate linking of partial objects to speed
-# the link cycle during development. (To turn this off, put "BIGOBJS=false"
-# in your custom makefile, ../Makefile.custom.)
-BIGOBJS= true
-
-PROG= postgres global1.bki.source local1_template1.bki.source
-
-MKDIR= ../mk
-include $(MKDIR)/postgres.mk
-
-include $(CURDIR)/access/Makefile.inc
-include $(CURDIR)/bootstrap/Makefile.inc
-include $(CURDIR)/catalog/Makefile.inc
-include $(CURDIR)/commands/Makefile.inc
-include $(CURDIR)/executor/Makefile.inc
-include $(CURDIR)/include/Makefile.inc
-include $(CURDIR)/lib/Makefile.inc
-include $(CURDIR)/libpq/Makefile.inc
-include $(CURDIR)/main/Makefile.inc
-include $(CURDIR)/nodes/Makefile.inc
-include $(CURDIR)/optimizer/Makefile.inc
-include $(CURDIR)/parser/Makefile.inc
-include $(CURDIR)/port/Makefile.inc
-include $(CURDIR)/postmaster/Makefile.inc
-include $(CURDIR)/regex/Makefile.inc
-include $(CURDIR)/rewrite/Makefile.inc
-include $(CURDIR)/storage/Makefile.inc
-include $(CURDIR)/tcop/Makefile.inc
-include $(CURDIR)/tioga/Makefile.inc
-include $(CURDIR)/utils/Makefile.inc
-
-SRCS:= ${SRCS_ACCESS} ${SRCS_BOOTSTRAP} $(SRCS_CATALOG) ${SRCS_COMMANDS} \
- ${SRCS_EXECUTOR} $(SRCS_LIB) $(SRCS_LIBPQ) ${SRCS_MAIN} \
- ${SRCS_NODES} ${SRCS_OPTIMIZER} ${SRCS_PARSER} ${SRCS_PORT} \
- $(SRCS_POSTMASTER) ${SRCS_REGEX} ${SRCS_REWRITE} ${SRCS_STORAGE} \
- ${SRCS_TCOP} ${SRCS_UTILS}
-
-ifeq ($(BIGOBJS), true)
-OBJS= ACCESS.o BOOTSTRAP.o COMMANDS.o EXECUTOR.o MAIN.o MISC.o NODES.o \
- PARSER.o OPTIMIZER.o REGEX.o REWRITE.o STORAGE.o TCOP.o UTILS.o
-CLEANFILES+= $(subst .s,.o,$(SRCS:.c=.o)) $(OBJS)
-else
-OBJS:= $(subst .s,.o,$(SRCS:%.c=$(objdir)/%.o))
-CLEANFILES+= $(notdir $(OBJS))
-endif
+SRCDIR = ..
+include ../Makefile.global
-#############################################################################
-#
-# TIOGA stuff
+##########################################################################
+# Determine linker flags for this platform (mainly, the libraries with
+# which to link).
+##########################################################################
+
+# All systems except NEXTSTEP require the math library.
+# Loader flags for system-dependent libraries are appended in
+# src/backend/port/$(PORTNAME)/Makefile.inc
#
-ifdef TIOGA
-SRCS+= $(SRCS_TIOGA)
- ifeq ($(BIGOBJS), true)
-TIOGA.o: $(SRCS_TIOGA:%.c=$(objdir)/%.o)
- $(make_partial)
-OBJS+= TIOGA.o
-CLEANFILES+= $(SRCS_TIOGA:%.c=%.o) TIOGA.o
- else
-OBJS+= $(SRCS_TIOGA:%.c=$(objdir)/%.o)
- endif
+ifneq ($(PORTNAME), next)
+LDADD+= -lm
endif
+ifeq ($(PORTNAME), aix)
+LDADD+= -ll -lld
+endif
-#############################################################################
-#
-# Compiling the postgres backend.
-#
-CFLAGS+= -DPOSTGRESDIR='"$(POSTGRESDIR)"' \
- -DPGDATADIR='"$(DATADIR)"' \
- -I$(CURDIR)/$(objdir) \
- -I$(CURDIR)/include \
- -I$(CURDIR)/port/$(PORTNAME) \
- -I../include
-
-# turn this on if you prefer European style dates instead of American
-# style dates
-ifdef EUROPEAN_DATES
-CFLAGS += -DEUROPEAN_STYLE
+ifeq ($(PORTNAME), alpha)
+LDADD+= -lln
endif
-# host based access flags
-ifdef HBA
-CFLAGS+= $(HBAFLAGS)
+ifeq ($(PORTNAME), bsdi)
+LDADD+= -ldld -lipc
endif
-
-#
-# All systems except NEXTSTEP require the math library.
-# Loader flags for system-dependent libraries are appended in
-# src/backend/port/$(PORTNAME)/Makefile.inc
+
+ifeq ($(PORTNAME), bsdi_2_1)
+LDADD+= -ldl -lipc
+endif
+
+ifeq ($(PORTNAME), hpux)
+# HP-UX needs:
+# -W l,-E export symbols for linking with the shared libraries
+# dynamic loader
+# -W p,-H400000 expand cpp #define table size so the Nodes files don't
+# break it
#
-ifneq ($(PORTNAME), next)
-LDADD+= -lm
+# -W p,-H400000
+ifeq ($(CC), cc)
+CFLAGS+= -W l,-E
+LDFLAGS+= -W l,-E
+LDADD+= -ll -ldld
+else
+ifeq ($(CC), gcc)
+LDADD+= -ll /usr/lib/libdld.sl
+endif
+endif
endif
-# kerberos flags
-ifdef KRBVERS
-CFLAGS+= $(KRBFLAGS)
-LDADD+= $(KRBLIBS)
+ifeq ($(PORTNAME), i386_solaris)
+LDADD+= -ll -ldl
+endif
+
+ifeq ($(PORTNAME), irix5)
+LDADD+= -ll
endif
-# statically link in libc for linux
ifeq ($(PORTNAME), linux)
-LDADD+= -lc
+ifdef LINUX_ELF
+LDADD+= -ldl
+else
+LDADD+= -ldld
+endif
+endif
+
+ifeq ($(PORTNAME), sparc)
+LDADD+= -lln -ldl
+endif
+
+ifeq ($(PORTNAME), sparc_solaris)
+LDADD+= -ll -ldl
endif
-# the following is special for Reliant UNIX SVR4 (formerly SINIX)
ifeq ($(PORTNAME), svr4)
+LDADD+= -ll -ldl
+# the following is special for Reliant UNIX SVR4 (formerly SINIX)
LDFLAGS+= -LD-Blargedynsym
endif
-postgres: $(POSTGRES_DEPEND) $(OBJS) $(EXPORTS)
- $(CC) $(LDFLAGS) -o $(objdir)/$(@F) $(addprefix $(objdir)/,$(notdir $(OBJS))) $(LDADD)
+ifeq ($(PORTNAME), ultrix4)
+LDADD+= -ldl -lln
+endif
+
+#############################################################################
+
+OBJS = access/SUBSYS.o bootstrap/SUBSYS.o catalog/SUBSYS.o \
+ commands/SUBSYS.o executor/SUBSYS.o \
+ lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o nodes/SUBSYS.o \
+ optimizer/SUBSYS.o parser/SUBSYS.o port/SUBSYS.o \
+ postmaster/SUBSYS.o regex/SUBSYS.o rewrite/SUBSYS.o \
+ storage/SUBSYS.o tcop/SUBSYS.o utils/SUBSYS.o
+
+ifdef TIOGA
+OBJS += tioga/SUBSYS.o
+endif
+
+all: postgres global1.bki.source local1_template1.bki.source
+
+postgres: postgres_group1 postgres_group2 postgres_group3 postgres_group4
+ $(CC) $(LDFLAGS) -o postgres $(OBJS) $(LDADD)
+
+postgres_group1:
+ $(MAKE) -C access SUBSYS.o
+ $(MAKE) -C bootstrap SUBSYS.o
+ $(MAKE) -C catalog SUBSYS.o
+ $(MAKE) -C commands SUBSYS.o
+postgres_group2:
+ $(MAKE) -C executor SUBSYS.o
+ $(MAKE) -C lib SUBSYS.o
+ $(MAKE) -C libpq SUBSYS.o
+ $(MAKE) -C main SUBSYS.o
+ $(MAKE) -C nodes SUBSYS.o
+postgres_group3:
+ $(MAKE) -C optimizer SUBSYS.o
+ $(MAKE) -C parser SUBSYS.o
+ $(MAKE) -C port SUBSYS.o PORTNAME=$(PORTNAME)
+ $(MAKE) -C postmaster SUBSYS.o
+ $(MAKE) -C regex SUBSYS.o
+postgres_group4:
+ $(MAKE) -C rewrite SUBSYS.o
+ $(MAKE) -C storage SUBSYS.o
+ $(MAKE) -C tcop SUBSYS.o
+ $(MAKE) -C utils SUBSYS.o
+ifdef TIOGA
+ $(MAKE) -C tioga SUBSYS.o
+endif
+
+global1.bki.source local1_template1.bki.source:
+ $(MAKE) -C catalog $@
+ cp catalog/$@ .
+
+
+############################################################################
+# The following targets are specified in make commands that appear in the
+# make files in our subdirectories.
-# Make this target first if you are doing a parallel make.
-# The targets in 'first' need to be made sequentially because of dependencies.
-# Then, you can make 'all' with parallelism turned on.
-first: $(POSTGRES_DEPEND)
+parse.h:
+ $(MAKE) -C parser parse.h
+ cp parser/parse.h .
+fmgr.h:
+ $(MAKE) -C utils fmgr.h
+ cp utils/fmgr.h .
#############################################################################
-#
-# Partial objects for platforms with slow linkers.
-#
-ifeq ($(BIGOBJS), true)
-
-OBJS_ACCESS:= $(SRCS_ACCESS:%.c=$(objdir)/%.o)
-OBJS_BOOTSTRAP:= $(SRCS_BOOTSTRAP:%.c=$(objdir)/%.o)
-OBJS_CATALOG:= $(SRCS_CATALOG:%.c=$(objdir)/%.o)
-OBJS_COMMANDS:= $(SRCS_COMMANDS:%.c=$(objdir)/%.o)
-OBJS_EXECUTOR:= $(SRCS_EXECUTOR:%.c=$(objdir)/%.o)
-OBJS_MAIN:= $(SRCS_MAIN:%.c=$(objdir)/%.o)
-OBJS_POSTMASTER:= $(SRCS_POSTMASTER:%.c=$(objdir)/%.o)
-OBJS_LIB:= $(SRCS_LIB:%.c=$(objdir)/%.o)
-OBJS_LIBPQ:= $(SRCS_LIBPQ:%.c=$(objdir)/%.o)
-OBJS_PORT:= $(addprefix $(objdir)/,$(subst .s,.o,$(SRCS_PORT:.c=.o)))
-OBJS_NODES:= $(SRCS_NODES:%.c=$(objdir)/%.o)
-OBJS_PARSER:= $(SRCS_PARSER:%.c=$(objdir)/%.o)
-OBJS_OPTIMIZER:= $(SRCS_OPTIMIZER:%.c=$(objdir)/%.o)
-OBJS_REGEX:= $(SRCS_REGEX:%.c=$(objdir)/%.o)
-OBJS_REWRITE:= $(SRCS_REWRITE:%.c=$(objdir)/%.o)
-OBJS_STORAGE:= $(SRCS_STORAGE:%.c=$(objdir)/%.o)
-OBJS_TCOP:= $(SRCS_TCOP:%.c=$(objdir)/%.o)
-OBJS_UTILS:= $(SRCS_UTILS:%.c=$(objdir)/%.o)
-
-ACCESS.o: $(OBJS_ACCESS)
- $(make_partial)
-BOOTSTRAP.o: $(OBJS_BOOTSTRAP)
- $(make_partial)
-COMMANDS.o: $(OBJS_COMMANDS)
- $(make_partial)
-EXECUTOR.o: $(OBJS_EXECUTOR)
- $(make_partial)
-MAIN.o: $(OBJS_MAIN) $(OBJS_POSTMASTER)
- $(make_partial)
-MISC.o: $(OBJS_CATALOG) $(OBJS_LIB) $(OBJS_LIBPQ) $(OBJS_PORT)
- $(make_partial)
-NODES.o: $(OBJS_NODES)
- $(make_partial)
-PARSER.o: $(OBJS_PARSER)
- $(make_partial)
-OPTIMIZER.o: $(OBJS_OPTIMIZER)
- $(make_partial)
-REGEX.o: $(OBJS_REGEX)
- $(make_partial)
-REWRITE.o: $(OBJS_REWRITE)
- $(make_partial)
-STORAGE.o: $(OBJS_STORAGE)
- $(make_partial)
-TCOP.o: $(OBJS_TCOP)
- $(make_partial)
-UTILS.o: $(OBJS_UTILS)
- $(make_partial)
+clean:
+ rm -f postgres fmgr.h parse.h \
+ global1.bki.source local1_template1.bki.source
+ $(MAKE) -C access clean
+ $(MAKE) -C bootstrap clean
+ $(MAKE) -C catalog clean
+ $(MAKE) -C commands clean
+ $(MAKE) -C executor clean
+ $(MAKE) -C lib clean
+ $(MAKE) -C libpq clean
+ $(MAKE) -C main clean
+ $(MAKE) -C nodes clean
+ $(MAKE) -C optimizer clean
+ $(MAKE) -C parser clean
+ $(MAKE) -C port clean PORTNAME=$(PORTNAME)
+ $(MAKE) -C postmaster clean
+ $(MAKE) -C regex clean
+ $(MAKE) -C rewrite clean
+ $(MAKE) -C storage clean
+ $(MAKE) -C tcop clean
+ $(MAKE) -C utils clean
+ifdef TIOGA
+ $(MAKE) -C tioga clean
+endif
+
+.DEFAULT:
+ $(MAKE) -C access $@
+ $(MAKE) -C bootstrap $@
+ $(MAKE) -C catalog $@
+ $(MAKE) -C commands $@
+ $(MAKE) -C executor $@
+ $(MAKE) -C lib $@
+ $(MAKE) -C libpq $@
+ $(MAKE) -C main $@
+ $(MAKE) -C nodes $@
+ $(MAKE) -C optimizer $@
+ $(MAKE) -C parser $@
+ $(MAKE) -C port $@ PORTNAME=$(PORTNAME)
+ $(MAKE) -C postmaster $@
+ $(MAKE) -C regex $@
+ $(MAKE) -C rewrite $@
+ $(MAKE) -C storage $@
+ $(MAKE) -C tcop $@
+ $(MAKE) -C utils $@
+ifdef TIOGA
+ $(MAKE) -C tioga $@
endif
+
#############################################################################
#
# Installation.
@@ -203,33 +251,26 @@ endif
# and (2) the parameters of a database system should be set at initdb time,
# not at postgres build time.
-install: beforeinstall postgres fmgr.h\
+D_LIBDIR = $(DESTDIR)$(LIBDIR)
+D_BINDIR = $(DESTDIR)$(BINDIR)
+
+install: $(D_LIBDIR) $(D_BINDIR) $(HEADERDIR) postgres fmgr.h\
global1.bki.source local1_template1.bki.source \
libpq/pg_hba.conf.sample
- $(INSTALL) $(INSTL_EXE_OPTS) $(objdir)/postgres \
- $(DESTDIR)$(BINDIR)/postgres
- @rm -f $(DESTDIR)$(BINDIR)/postmaster
- cd $(DESTDIR)$(BINDIR); ln -s postgres postmaster
- $(INSTALL) $(INSTLOPTS) $(objdir)/fmgr.h $(HEADERDIR)/fmgr.h
- $(INSTALL) $(INSTLOPTS) $(objdir)/global1.bki.source \
- $(DESTDIR)$(LIBDIR)/global1.bki.source
- $(INSTALL) $(INSTLOPTS) $(objdir)/local1_template1.bki.source \
- $(DESTDIR)$(LIBDIR)/local1_template1.bki.source
+ $(INSTALL) $(INSTL_EXE_OPTS) postgres $(D_BINDIR)/postgres
+ @rm -f $(D_BINDIR)/postmaster
+ cd $(D_BINDIR); ln -s postgres postmaster
+ $(INSTALL) $(INSTLOPTS) fmgr.h $(HEADERDIR)/fmgr.h
+ $(INSTALL) $(INSTLOPTS) global1.bki.source \
+ $(D_LIBDIR)/global1.bki.source
+ $(INSTALL) $(INSTLOPTS) local1_template1.bki.source \
+ $(D_LIBDIR)/local1_template1.bki.source
$(INSTALL) $(INSTLOPTS) libpq/pg_hba.conf.sample \
- $(DESTDIR)$(LIBDIR)/pg_hba.conf.sample
-
-# so we can get the UID of the postgres owner (w/o moving pg_id to
-# src/tools). We just want the vanilla LDFLAGS for pg_id
-IDLDFLAGS:= $(LDFLAGS)
-ifeq ($(PORTNAME), hpux)
-ifeq ($(CC), cc)
-IDLDFLAGS+= -Aa -D_HPUX_SOURCE
-endif
-endif
-
-CLEANFILES+= postgres pg_id fmgr.h
+ $(D_LIBDIR)/pg_hba.conf.sample
+$(D_BINDIR) $(D_LIBDIR) $(HEADERDIR):
+ mkdir $@
#############################################################################
#
@@ -242,30 +283,15 @@ CLEANFILES+= postgres pg_id fmgr.h
IDFILE= ID
.PHONY: $(IDFILE)
$(IDFILE):
- $(CURDIR)/makeID $(PORTNAME)
+ ./makeID $(PORTNAME)
#
# Special rule to generate cpp'd version of a .c file. This is
# especially useful given all the hellish macro processing going on.
# The cpp'd version has a .C suffix. To create foo.C from foo.c, just
# type
-# bmake foo.C
+# make foo.C
#
%.cpp: %.c
- $(CC) -E $(CFLAGS) $(<:.C=.c) | cat -s | cb | tr -s '\012*' '\012' > $(objdir)/$(@F)
-
-cppall: $(SRCS:.c=.cpp)
-
-#
-# To use Purify (SunOS only), define PURIFY to be the path (and
-# options) with which to invoke the Purify loader. Only the executable
-# needs to be loaded with Purify.
-#
-# PURIFY = /usr/sww/bin/purify -cache-dir=/usr/local/postgres/src/backend/purify-cache
-#.if defined(PURIFY)
-#${PROG}: $(POSTGRES_DEPEND) $(OBJS) $(EXPORTS)
-# ${PURIFY} ${CC} ${LDFLAGS} -o $(objdir)/$(@F) $(addprefix $(objdir)/,$(notdir $(OBJS))) $(LDADD)
-#
-#CLEANFILES+= .purify* .pure .lock.*.o *_pure_*.o *.pure_*link*
-#.endif
-
+ $(CC) -E $(CFLAGS) $(<:.C=.c) | cat -s | cb | tr -s '\012*' '\012' \
+ > $(@F)
diff --git a/src/backend/access/Makefile b/src/backend/access/Makefile
new file mode 100644
index 00000000000..0bd4e1770f7
--- /dev/null
+++ b/src/backend/access/Makefile
@@ -0,0 +1,46 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for the access methods module
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/access/Makefile,v 1.1 1996/10/27 09:45:42 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+all: SUBSYS.o
+
+SUBSYS.o:
+ $(MAKE) -C common SUBSYS.o
+ $(MAKE) -C gist SUBSYS.o
+ $(MAKE) -C hash SUBSYS.o
+ $(MAKE) -C heap SUBSYS.o
+ $(MAKE) -C index SUBSYS.o
+ $(MAKE) -C rtree SUBSYS.o
+ $(MAKE) -C nbtree SUBSYS.o
+ $(MAKE) -C transam SUBSYS.o
+ $(LD) -r -o SUBSYS.o \
+ common/SUBSYS.o gist/SUBSYS.o hash/SUBSYS.o heap/SUBSYS.o \
+ index/SUBSYS.o rtree/SUBSYS.o nbtree/SUBSYS.o transam/SUBSYS.o
+
+clean:
+ rm -f SUBSYS.o
+ $(MAKE) -C common clean
+ $(MAKE) -C gist clean
+ $(MAKE) -C hash clean
+ $(MAKE) -C heap clean
+ $(MAKE) -C index clean
+ $(MAKE) -C rtree clean
+ $(MAKE) -C nbtree clean
+ $(MAKE) -C transam clean
+
+.DEFAULT:
+ $(MAKE) -C common $@
+ $(MAKE) -C gist $@
+ $(MAKE) -C hash $@
+ $(MAKE) -C heap $@
+ $(MAKE) -C index $@
+ $(MAKE) -C rtree $@
+ $(MAKE) -C nbtree $@
+ $(MAKE) -C transam $@
+
diff --git a/src/backend/access/Makefile.inc b/src/backend/access/Makefile.inc
deleted file mode 100644
index eeff8b43be5..00000000000
--- a/src/backend/access/Makefile.inc
+++ /dev/null
@@ -1,36 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the access methods module
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/access/Attic/Makefile.inc,v 1.2 1996/08/26 06:26:37 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-accdir=$(CURDIR)/access
-VPATH:=$(VPATH):$(accdir):\
- $(accdir)/common:$(accdir)/gist:$(accdir)/hash:$(accdir)/heap:\
- $(accdir)/index:$(accdir)/rtree:$(accdir)/nbtree:$(accdir)/transam
-
-
-SUBSRCS=
-include $(accdir)/common/Makefile.inc
-include $(accdir)/gist/Makefile.inc
-include $(accdir)/hash/Makefile.inc
-include $(accdir)/heap/Makefile.inc
-include $(accdir)/index/Makefile.inc
-include $(accdir)/rtree/Makefile.inc
-include $(accdir)/nbtree/Makefile.inc
-include $(accdir)/transam/Makefile.inc
-SRCS_ACCESS:= $(SUBSRCS)
-
-HEADERS+= attnum.h funcindex.h genam.h gist.h hash.h \
- heapam.h hio.h htup.h ibit.h iqual.h istrat.h \
- itup.h nbtree.h printtup.h relscan.h rtree.h \
- sdir.h skey.h strat.h transam.h tupdesc.h tupmacs.h \
- valid.h xact.h
-
diff --git a/src/backend/access/common/Makefile b/src/backend/access/common/Makefile
new file mode 100644
index 00000000000..e199a40bca1
--- /dev/null
+++ b/src/backend/access/common/Makefile
@@ -0,0 +1,43 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for access/common
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/access/common/Makefile,v 1.1 1996/10/27 09:45:49 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = heaptuple.o heapvalid.o indextuple.o indexvalid.o printtup.o \
+ scankey.o tupdesc.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+heapvalid.o tupdesc.o: ../../fmgr.h
+
+../../fmgr.h:
+ $(MAKE) -C ../.. fmgr.h
+
+dep: ../../fmgr.h
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/access/common/Makefile.inc b/src/backend/access/common/Makefile.inc
deleted file mode 100644
index 5d5dd476274..00000000000
--- a/src/backend/access/common/Makefile.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for access/common
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/access/common/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:09 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= heaptuple.c heapvalid.c indextuple.c indexvalid.c printtup.c \
- scankey.c tupdesc.c
-
diff --git a/src/backend/access/gist/Makefile b/src/backend/access/gist/Makefile
new file mode 100644
index 00000000000..2963accb9cf
--- /dev/null
+++ b/src/backend/access/gist/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for access/gist
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/access/gist/Makefile,v 1.1 1996/10/27 09:45:57 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = gist.o gistget.o gistscan.o giststrat.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/access/gist/Makefile.inc b/src/backend/access/gist/Makefile.inc
deleted file mode 100644
index 8519ab0a582..00000000000
--- a/src/backend/access/gist/Makefile.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for access/rtree (R-Tree access method)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# /usr/local/devel/pglite/cvs/src/backend/access/rtree/Makefile.inc,v 1.2 1995/03/21 06:50:48 andrew Exp
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= gist.c gistget.c gistscan.c giststrat.c
-
-
diff --git a/src/backend/access/hash/Makefile b/src/backend/access/hash/Makefile
new file mode 100644
index 00000000000..72f69e616f1
--- /dev/null
+++ b/src/backend/access/hash/Makefile
@@ -0,0 +1,38 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for access/hash
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/access/hash/Makefile,v 1.1 1996/10/27 09:46:08 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = hash.o hashfunc.o hashinsert.o hashovfl.o hashpage.o hashscan.o \
+ hashsearch.o hashstrat.o hashutil.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/access/hash/Makefile.inc b/src/backend/access/hash/Makefile.inc
deleted file mode 100644
index 8ea221bc264..00000000000
--- a/src/backend/access/hash/Makefile.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for access/hash (hash access method)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/access/hash/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:10 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= hash.c hashfunc.c hashinsert.c hashovfl.c hashpage.c hashscan.c \
- hashsearch.c hashstrat.c hashutil.c
-
-
-
diff --git a/src/backend/access/heap/Makefile b/src/backend/access/heap/Makefile
new file mode 100644
index 00000000000..d2de8cfe91f
--- /dev/null
+++ b/src/backend/access/heap/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for access/heap
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/access/heap/Makefile,v 1.1 1996/10/27 09:46:16 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = heapam.o hio.o stats.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/access/heap/Makefile.inc b/src/backend/access/heap/Makefile.inc
deleted file mode 100644
index f4f4bbb7031..00000000000
--- a/src/backend/access/heap/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for access/heap
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:11 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= heapam.c hio.c stats.c
diff --git a/src/backend/access/index/Makefile b/src/backend/access/index/Makefile
new file mode 100644
index 00000000000..221a6b2a413
--- /dev/null
+++ b/src/backend/access/index/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for access/index
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/access/index/Makefile,v 1.1 1996/10/27 09:46:25 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = genam.o indexam.o istrat.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/access/index/Makefile.inc b/src/backend/access/index/Makefile.inc
deleted file mode 100644
index 0bc58830c8f..00000000000
--- a/src/backend/access/index/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for access/index
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/access/index/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:11 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= genam.c indexam.c istrat.c
diff --git a/src/backend/access/nbtree/Makefile b/src/backend/access/nbtree/Makefile
new file mode 100644
index 00000000000..3170bbe4f7b
--- /dev/null
+++ b/src/backend/access/nbtree/Makefile
@@ -0,0 +1,38 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for access/nbtree
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/access/nbtree/Makefile,v 1.1 1996/10/27 09:46:32 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = nbtcompare.o nbtinsert.o nbtpage.o nbtree.o nbtscan.o nbtsearch.o \
+ nbtstrat.o nbtutils.o nbtsort.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/access/nbtree/Makefile.inc b/src/backend/access/nbtree/Makefile.inc
deleted file mode 100644
index 50854008c01..00000000000
--- a/src/backend/access/nbtree/Makefile.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for access/nbtree (btree acess methods)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:11 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= nbtcompare.c nbtinsert.c nbtpage.c nbtree.c nbtscan.c nbtsearch.c \
- nbtstrat.c nbtutils.c nbtsort.c
diff --git a/src/backend/access/rtree/Makefile b/src/backend/access/rtree/Makefile
new file mode 100644
index 00000000000..6b88382a2e0
--- /dev/null
+++ b/src/backend/access/rtree/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for access/rtree
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/Makefile,v 1.1 1996/10/27 09:46:40 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = rtget.o rtproc.o rtree.o rtscan.o rtstrat.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/access/rtree/Makefile.inc b/src/backend/access/rtree/Makefile.inc
deleted file mode 100644
index a93a5e53290..00000000000
--- a/src/backend/access/rtree/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for access/rtree (R-Tree access method)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:12 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= rtget.c rtproc.c rtree.c rtscan.c rtstrat.c
diff --git a/src/backend/access/transam/Makefile b/src/backend/access/transam/Makefile
new file mode 100644
index 00000000000..f95cf269c74
--- /dev/null
+++ b/src/backend/access/transam/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for access/transam
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/access/transam/Makefile,v 1.1 1996/10/27 09:46:48 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = transam.o transsup.o varsup.o xact.o xid.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/access/transam/Makefile.inc b/src/backend/access/transam/Makefile.inc
deleted file mode 100644
index c4f5b95a0ae..00000000000
--- a/src/backend/access/transam/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for access/transam
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:13 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= transam.c transsup.c varsup.c xact.c xid.c
diff --git a/src/backend/bootstrap/Makefile b/src/backend/bootstrap/Makefile
new file mode 100644
index 00000000000..66ed86f3c52
--- /dev/null
+++ b/src/backend/bootstrap/Makefile
@@ -0,0 +1,71 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for the bootstrap module
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.1 1996/10/27 09:46:59 bryanh Exp $
+#
+#
+# We must build bootparse.c and bootscanner.c with yacc and lex and sed,
+# but bootstrap.c is part of the distribution.
+#
+# Another kinda weird Makefile cause we need two
+# scanner/parsers in the backend and most yaccs and lexs
+# don't have the prefix option.
+#
+# sed files are HACK CITY! - redo...
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../..
+include ../../Makefile.global
+
+INCLUDE_OPT = -I.. \
+ -I../port/$(PORTNAME) \
+ -I../include \
+ -I../../include
+
+CFLAGS += $(INCLUDE_OPT)
+
+BOOTYACCS = bootstrap_tokens.h bootparse.c
+
+OBJS = bootparse.o bootscanner.o bootstrap.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ ld -r -o SUBSYS.o $(OBJS)
+
+# bootstrap.o's dependency on bootstrap_tokens.h is computed by the
+# make depend, but we state it here explicitly anyway because
+# bootstrap_tokens.h doesn't even exist at first and if user fails to
+# do make depend, we still want the build to succeed.
+
+bootstrap.o: bootstrap_tokens.h
+
+bootstrap_tokens.h bootparse.c: bootparse.y
+ $(YACC) $(YFLAGS) $<
+ sed -f boot.sed < y.tab.c > bootparse.c
+ mv y.tab.h bootstrap_tokens.h
+ rm -f y.tab.c
+
+bootscanner.c: bootscanner.l
+ $(LEX) $<
+ sed -f boot.sed < lex.yy.c > bootscanner.c
+ rm -f lex.yy.c
+
+clean:
+ rm -f SUBSYS.o $(OBJS) bootparse.c bootstrap_tokens.h bootscanner.c
+# And the garbage that might have been left behind by partial build:
+ rm -f y.tab.h y.tab.c y.output lex.yy.c
+
+# This is unusual: We actually have to build some of the parts before
+# we know what the header file dependencies are.
+dep: bootparse.c bootscanner.c bootstrap_tokens.h
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/bootstrap/Makefile.inc b/src/backend/bootstrap/Makefile.inc
deleted file mode 100644
index 39feb651068..00000000000
--- a/src/backend/bootstrap/Makefile.inc
+++ /dev/null
@@ -1,63 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the bootstrap module
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/bootstrap/Attic/Makefile.inc,v 1.2 1996/09/26 15:40:37 momjian Exp $
-#
-#
-# Another kinda weird Makefile.inc cause we need two
-# scanner/parsers in the backend and most yaccs and lexs
-# don't have the prefix option.
-#
-# sed files are HACK CITY! - redo...
-#
-#-------------------------------------------------------------------------
-
-bootdir= $(CURDIR)/bootstrap
-VPATH:= $(VPATH):$(bootdir)
-
-BOOTYACCS= bootstrap_tokens.h bootparse.c
-#BOOTYACCS= bootparse.c
-
-SRCS_BOOTSTRAP= bootparse.c bootscanner.c bootstrap.c
-
-$(BOOTYACCS): bootparse.y
- cd $(objdir); \
- $(YACC) $(YFLAGS) $<; \
- sed -f $(bootdir)/boot.sed < y.tab.c > bootparse.c; \
- mv y.tab.h bootstrap_tokens.h; \
- rm -f y.tab.c
-
-$(objdir)/bootparse.o: bootparse.c
- $(cc_inobjdir)
-
-
-bootscanner.c: bootscanner.l
- cd $(objdir); \
- $(LEX) $<; \
- sed -f $(bootdir)/boot.sed < lex.yy.c > bootscanner.c; \
- rm -f lex.yy.c
-
-$(objdir)/bootscanner.o: bootscanner.c
- $(cc_inobjdir)
-
-
-
-#
-# The following insures that y.tab.h gets made as bootstrap.c
-# includes it
-#
-bootstrap.o: $(BOOTYACCS)
-
-POSTGRES_DEPEND+= $(BOOTYACCS) bootscanner.c
-
-
-CLEANFILES+= bootscanner.c $(BOOTYACCS) y.tab.h y.output
-
-HEADERS+= bootstrap.h
-
diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile
new file mode 100644
index 00000000000..b596feead12
--- /dev/null
+++ b/src/backend/catalog/Makefile
@@ -0,0 +1,62 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for catalog
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.1 1996/10/27 09:47:07 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../..
+include ../../Makefile.global
+
+INCLUDE_OPT = -I.. \
+ -I../port/$(PORTNAME) \
+ -I../include \
+ -I../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = catalog.o heap.o index.o indexing.o \
+ pg_aggregate.o pg_operator.o pg_proc.o pg_type.o
+
+all: SUBSYS.o global1.bki.source local1_template1.bki.source
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+GENBKI= ./genbki.sh
+
+GLOBALBKI_SRCS= $(addprefix ../../include/catalog/, \
+ pg_database.h pg_demon.h pg_magic.h pg_defaults.h \
+ pg_variable.h pg_server.h pg_user.h pg_hosts.h \
+ pg_group.h pg_log.h pg_time.h \
+ )
+
+LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \
+ pg_proc.h pg_type.h pg_attribute.h pg_class.h \
+ pg_inherits.h pg_index.h pg_version.h pg_statistic.h \
+ pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
+ pg_language.h pg_parg.h \
+ pg_aggregate.h pg_ipl.h pg_inheritproc.h \
+ pg_rewrite.h pg_listener.h indexing.h \
+ )
+
+global1.bki.source: $(GENBKI) $(GLOBALBKI_SRCS)
+ sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(GLOBALBKI_SRCS) > $@
+
+local1_template1.bki.source: $(GENBKI) $(LOCALBKI_SRCS)
+ sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(LOCALBKI_SRCS) > $@
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS) global1.bki.source local1_template1.bki.source
+
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/catalog/Makefile.inc b/src/backend/catalog/Makefile.inc
deleted file mode 100644
index 50c54664bda..00000000000
--- a/src/backend/catalog/Makefile.inc
+++ /dev/null
@@ -1,68 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the system catalogs module
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/Makefile.inc,v 1.3 1996/09/26 04:22:49 momjian Exp $
-#
-#-------------------------------------------------------------------------
-
-catdir=$(CURDIR)/catalog
-VPATH:=$(VPATH):$(catdir)
-
-cat_hdr_dir= ../include/catalog
-
-SRCS_CATALOG= catalog.c heap.c index.c indexing.c \
- pg_aggregate.c pg_operator.c pg_proc.c pg_type.c
-
-HEADERS+= catalog.h catname.h heap.h index.h indexing.h pg_aggregate.h \
- pg_am.h pg_amop.h pg_amproc.h pg_attribute.h pg_database.h \
- pg_defaults.h pg_demon.h pg_group.h pg_index.h pg_inheritproc.h \
- pg_inherits.h pg_ipl.h pg_language.h pg_listener.h \
- pg_log.h pg_magic.h pg_opclass.h pg_operator.h pg_parg.h \
- pg_proc.h pg_class.h \
- pg_rewrite.h pg_server.h pg_statistic.h pg_time.h pg_type.h \
- pg_user.h pg_variable.h pg_version.h
-
-#
-# The following is to create the .bki.source files.
-# TODO: sort headers, (figure some automatic way of of determining
-# the bki sources?)
-#
-# XXX - more grot. includes names and uid's in the header file. FIX THIS
-# (not sure if i got this right - which do i need - or should i
-# burn the whole damned thing)
-#
-ifdef ALLOW_PG_GROUP
-BKIOPTS= -DALLOW_PG_GROUP
-endif
-
-GENBKI= $(catdir)/genbki.sh
-
-GLOBALBKI_SRCS= $(addprefix $(cat_hdr_dir)/, \
- pg_database.h pg_demon.h pg_magic.h pg_defaults.h \
- pg_variable.h pg_server.h pg_user.h pg_hosts.h \
- pg_group.h pg_log.h pg_time.h \
- )
-
-LOCALBKI_SRCS= $(addprefix $(cat_hdr_dir)/, \
- pg_proc.h pg_type.h pg_attribute.h pg_class.h \
- pg_inherits.h pg_index.h pg_version.h pg_statistic.h \
- pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
- pg_language.h pg_parg.h \
- pg_aggregate.h pg_ipl.h pg_inheritproc.h \
- pg_rewrite.h pg_listener.h indexing.h \
- )
-
-global1.bki.source: $(GENBKI) $(GLOBALBKI_SRCS)
- sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(GLOBALBKI_SRCS) > $(objdir)/$(@F)
-
-local1_template1.bki.source: $(GENBKI) $(LOCALBKI_SRCS)
- sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(LOCALBKI_SRCS) > $(objdir)/$(@F)
-
-CLEANFILES+= global1.bki.source local1_template1.bki.source
-
diff --git a/src/backend/commands/Makefile b/src/backend/commands/Makefile
new file mode 100644
index 00000000000..ccf0f8451f1
--- /dev/null
+++ b/src/backend/commands/Makefile
@@ -0,0 +1,39 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for commands
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/commands/Makefile,v 1.1 1996/10/27 09:47:14 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../..
+include ../../Makefile.global
+
+INCLUDE_OPT = -I.. \
+ -I../port/$(PORTNAME) \
+ -I../include \
+ -I../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = async.o creatinh.o command.o copy.o defind.o define.o \
+ purge.o remove.o rename.o vacuum.o version.o view.o cluster.o \
+ recipe.o explain.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/commands/Makefile.inc b/src/backend/commands/Makefile.inc
deleted file mode 100644
index d05052dfccd..00000000000
--- a/src/backend/commands/Makefile.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the commands module
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/commands/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:18 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-VPATH:=$(VPATH):$(CURDIR)/commands
-
-
-SRCS_COMMANDS= async.c creatinh.c command.c copy.c defind.c define.c \
- purge.c remove.c rename.c vacuum.c version.c view.c cluster.c \
- recipe.c explain.c
-
-HEADERS+= async.h command.h copy.h creatinh.h defrem.h purge.h \
- rename.h vacuum.h version.h view.h cluster.h \
- recipe.h
-
-
diff --git a/src/backend/executor/Makefile b/src/backend/executor/Makefile
new file mode 100644
index 00000000000..cc1f5d1c2e1
--- /dev/null
+++ b/src/backend/executor/Makefile
@@ -0,0 +1,42 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for executor
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/executor/Makefile,v 1.1 1996/10/27 09:47:26 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../..
+include ../../Makefile.global
+
+INCLUDE_OPT = -I.. \
+ -I../port/$(PORTNAME) \
+ -I../include \
+ -I../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = execAmi.o execFlatten.o execJunk.o execMain.o \
+ execProcnode.o execQual.o execScan.o execTuples.o \
+ execUtils.o functions.o nodeAppend.o nodeAgg.o nodeHash.o \
+ nodeHashjoin.o nodeIndexscan.o nodeMaterial.o nodeMergejoin.o \
+ nodeNestloop.o nodeResult.o nodeSeqscan.o nodeSort.o \
+ nodeUnique.o nodeTee.o nodeGroup.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/executor/Makefile.inc b/src/backend/executor/Makefile.inc
deleted file mode 100644
index 211e725cec4..00000000000
--- a/src/backend/executor/Makefile.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the executor module
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/executor/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:24 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-VPATH:= $(VPATH):$(CURDIR)/executor
-
-SRCS_EXECUTOR= execAmi.c execFlatten.c execJunk.c execMain.c \
- execProcnode.c execQual.c execScan.c execTuples.c \
- execUtils.c functions.c nodeAppend.c nodeAgg.c nodeHash.c \
- nodeHashjoin.c nodeIndexscan.c nodeMaterial.c nodeMergejoin.c \
- nodeNestloop.c nodeResult.c nodeSeqscan.c nodeSort.c \
- nodeUnique.c nodeTee.c nodeGroup.c
-
-HEADERS+= execFlatten.h execdebug.h execdefs.h execdesc.h \
- executor.h functions.h hashjoin.h nodeAgg.h nodeAppend.h \
- nodeHash.h nodeHashjoin.h nodeIndexscan.h nodeMaterial.h \
- nodeMergejoin.h nodeNestloop.h nodeResult.h \
- nodeSeqscan.h nodeSort.h nodeUnique.h tuptable.h nodeTee.h \
- nodeGroup.h
-
diff --git a/src/backend/include/Makefile.inc b/src/backend/include/Makefile.inc
deleted file mode 100644
index b27b9fb009d..00000000000
--- a/src/backend/include/Makefile.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# this makefile is only use for collecting HEADERS
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/include/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:28 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-VPATH:= $(VPATH):$(CURDIR)/include
-
-HEADERS+= c.h libpq-fe.h miscadmin.h postgres.h
diff --git a/src/backend/lib/Makefile b/src/backend/lib/Makefile
new file mode 100644
index 00000000000..434128ad27f
--- /dev/null
+++ b/src/backend/lib/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for lib (miscellaneous stuff)
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/lib/Makefile,v 1.1 1996/10/27 09:47:37 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../..
+include ../../Makefile.global
+
+INCLUDE_OPT = -I.. \
+ -I../port/$(PORTNAME) \
+ -I../include \
+ -I../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = bit.o fstack.o hasht.o lispsort.o qsort.o stringinfo.o dllist.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/lib/Makefile.inc b/src/backend/lib/Makefile.inc
deleted file mode 100644
index c3a46d546ce..00000000000
--- a/src/backend/lib/Makefile.inc
+++ /dev/null
@@ -1,20 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the lib module (miscellaneous stuff)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/lib/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:28 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-VPATH:=$(VPATH):$(CURDIR)/lib
-
-
-SRCS_LIB= bit.c fstack.c hasht.c lispsort.c qsort.c stringinfo.c dllist.c
-
-HEADERS+= fstack.h hasht.h lispsort.h qsort.h stringinfo.h dllist.h
-
diff --git a/src/backend/libpq/Makefile b/src/backend/libpq/Makefile
new file mode 100644
index 00000000000..e019f636a15
--- /dev/null
+++ b/src/backend/libpq/Makefile
@@ -0,0 +1,50 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for libpq subsystem (backend half of libpq interface)
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.1 1996/10/27 09:47:47 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../..
+include ../../Makefile.global
+
+INCLUDE_OPT = -I.. \
+ -I../port/$(PORTNAME) \
+ -I../include \
+ -I../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+CFLAGS+= -DPOSTPORT='"$(POSTPORT)"'
+
+# kerberos flags
+ifdef KRBVERS
+CFLAGS+= $(KRBFLAGS)
+LDADD+= $(KRBLIBS)
+endif
+
+OBJS = be-dumpdata.o be-fsstubs.o be-pqexec.o \
+ auth.o hba.o pqcomm.o portal.o util.o portalbuf.o pqpacket.o pqsignal.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+be-dumpdata.o be-pqexec.o: ../fmgr.h
+
+../fmgr.h:
+ $(MAKE) -C .. fmgr.h
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/libpq/Makefile.inc b/src/backend/libpq/Makefile.inc
deleted file mode 100644
index 50c563fa6bd..00000000000
--- a/src/backend/libpq/Makefile.inc
+++ /dev/null
@@ -1,28 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the (backend side) libpq module
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/libpq/Attic/Makefile.inc,v 1.2 1996/10/11 09:47:11 bryanh Exp $
-#
-#-------------------------------------------------------------------------
-
-#
-# The frontend libpq interfaces to the backend through these files.
-#
-VPATH:= $(VPATH):$(CURDIR)/libpq
-
-SRCS_LIBPQ= be-dumpdata.c be-fsstubs.c be-pqexec.c
-
-#
-# These files are shared with the frontend library.
-#
-SRCS_LIBPQ+= auth.c hba.c pqcomm.c portal.c util.c portalbuf.c \
- pqpacket.c pqsignal.c
-
-HEADERS+= auth.h hba.h be-fsstubs.h libpq-be.h libpq-fs.h libpq.h \
- pqcomm.h pqsignal.h
diff --git a/src/backend/main/Makefile b/src/backend/main/Makefile
new file mode 100644
index 00000000000..a465d2a6adb
--- /dev/null
+++ b/src/backend/main/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for main
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/main/Makefile,v 1.1 1996/10/27 09:47:59 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../..
+include ../../Makefile.global
+
+INCLUDE_OPT = -I.. \
+ -I../port/$(PORTNAME) \
+ -I../include \
+ -I../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = main.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/main/Makefile.inc b/src/backend/main/Makefile.inc
deleted file mode 100644
index 1e66ad03cac..00000000000
--- a/src/backend/main/Makefile.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the main() of the postgres backend
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/main/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:31 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-VPATH:= $(VPATH):$(CURDIR)/main
-
-SRCS_MAIN= main.c
diff --git a/src/backend/nodes/Makefile b/src/backend/nodes/Makefile
new file mode 100644
index 00000000000..51eff228394
--- /dev/null
+++ b/src/backend/nodes/Makefile
@@ -0,0 +1,39 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for nodes
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/nodes/Makefile,v 1.1 1996/10/27 09:48:06 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../..
+include ../../Makefile.global
+
+INCLUDE_OPT = -I.. \
+ -I../port/$(PORTNAME) \
+ -I../include \
+ -I../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = nodeFuncs.o nodes.o list.o \
+ copyfuncs.o equalfuncs.o makefuncs.o outfuncs.o readfuncs.o \
+ print.o read.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/nodes/Makefile.inc b/src/backend/nodes/Makefile.inc
deleted file mode 100644
index a32fdbad6d1..00000000000
--- a/src/backend/nodes/Makefile.inc
+++ /dev/null
@@ -1,33 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the nodes module
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/nodes/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:32 scrappy Exp $
-#
-# NOTES
-# Originally, the nodes module is a home-brew, C++ like inheritance
-# system. However, the automatically generated tags, accessor functions
-# and the header files themselves are difficult to maintain. We need
-# real language support. Emulation doesn't quite do it...
-#
-# See nodes/README for an explanation of the new no-frills nodes
-# structures.
-# - ay 11/5/94
-#
-#-------------------------------------------------------------------------
-
-VPATH:= $(VPATH):$(CURDIR)/nodes
-
-
-SRCS_NODES= nodeFuncs.c nodes.c list.c \
- copyfuncs.c equalfuncs.c makefuncs.c outfuncs.c readfuncs.c \
- print.c read.c
-
-HEADERS+= execnodes.h makefuncs.h memnodes.h nodeFuncs.h nodes.h \
- params.h parsenodes.h pg_list.h plannodes.h primnodes.h relation.h
-
diff --git a/src/backend/optimizer/Makefile b/src/backend/optimizer/Makefile
new file mode 100644
index 00000000000..5c587fe55bb
--- /dev/null
+++ b/src/backend/optimizer/Makefile
@@ -0,0 +1,32 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for optimizer
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/optimizer/Makefile,v 1.1 1996/10/27 09:48:14 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+all: SUBSYS.o
+
+SUBSYS.o:
+ $(MAKE) -C path SUBSYS.o
+ $(MAKE) -C plan SUBSYS.o
+ $(MAKE) -C prep SUBSYS.o
+ $(MAKE) -C util SUBSYS.o
+ $(LD) -r -o SUBSYS.o \
+ path/SUBSYS.o plan/SUBSYS.o prep/SUBSYS.o util/SUBSYS.o
+
+clean:
+ rm -f SUBSYS.o
+ $(MAKE) -C path clean
+ $(MAKE) -C plan clean
+ $(MAKE) -C prep clean
+ $(MAKE) -C util clean
+
+.DEFAULT:
+ $(MAKE) -C path $@
+ $(MAKE) -C plan $@
+ $(MAKE) -C prep $@
+ $(MAKE) -C util $@
diff --git a/src/backend/optimizer/Makefile.inc b/src/backend/optimizer/Makefile.inc
deleted file mode 100644
index bd453d69645..00000000000
--- a/src/backend/optimizer/Makefile.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the optimizer module
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/optimizer/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:34 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-optdir=$(CURDIR)/optimizer
-VPATH:=$(VPATH):$(optdir):\
- $(optdir)/path:$(optdir)/prep:$(optdir)/util:$(optdir)/plan
-
-SUBSRCS=
-include $(optdir)/path/Makefile.inc
-include $(optdir)/prep/Makefile.inc
-include $(optdir)/util/Makefile.inc
-include $(optdir)/plan/Makefile.inc
-SRCS_OPTIMIZER:= $(SUBSRCS)
-
-HEADERS+= clauseinfo.h clauses.h cost.h internal.h joininfo.h keys.h \
- ordering.h pathnode.h paths.h plancat.h planmain.h \
- planner.h prep.h tlist.h var.h xfunc.h
-
-
diff --git a/src/backend/optimizer/path/Makefile b/src/backend/optimizer/path/Makefile
new file mode 100644
index 00000000000..9814270f088
--- /dev/null
+++ b/src/backend/optimizer/path/Makefile
@@ -0,0 +1,41 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for optimizer/path
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/optimizer/path/Makefile,v 1.1 1996/10/27 09:48:20 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = allpaths.o clausesel.o costsize.o hashutils.o indxpath.o \
+ joinpath.o joinrels.o joinutils.o mergeutils.o orindxpath.o \
+ prune.o
+
+# not ready yet: predmig.o xfunc.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/optimizer/path/Makefile.inc b/src/backend/optimizer/path/Makefile.inc
deleted file mode 100644
index 6bb014b0a90..00000000000
--- a/src/backend/optimizer/path/Makefile.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for optimizer/path
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:35 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS= allpaths.c clausesel.c costsize.c hashutils.c indxpath.c \
- joinpath.c joinrels.c joinutils.c mergeutils.c orindxpath.c \
- prune.c
-
-# not ready yet: predmig.c xfunc.c
-
-
-
diff --git a/src/backend/optimizer/plan/Makefile b/src/backend/optimizer/plan/Makefile
new file mode 100644
index 00000000000..ea0a8f95ddb
--- /dev/null
+++ b/src/backend/optimizer/plan/Makefile
@@ -0,0 +1,39 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for optimizer/plan
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/optimizer/plan/Makefile,v 1.1 1996/10/27 09:48:33 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = createplan.o initsplan.o planmain.o planner.o setrefs.o
+
+# not ready yet: predmig.o xfunc.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/optimizer/plan/Makefile.inc b/src/backend/optimizer/plan/Makefile.inc
deleted file mode 100644
index eccd412e9ff..00000000000
--- a/src/backend/optimizer/plan/Makefile.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for optimizer/plan
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/optimizer/plan/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:37 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= createplan.c initsplan.c planmain.c planner.c \
- setrefs.c
diff --git a/src/backend/optimizer/prep/Makefile b/src/backend/optimizer/prep/Makefile
new file mode 100644
index 00000000000..6cd0da7440a
--- /dev/null
+++ b/src/backend/optimizer/prep/Makefile
@@ -0,0 +1,39 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for optimizer/prep
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/optimizer/prep/Makefile,v 1.1 1996/10/27 09:48:46 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = archive.o prepqual.o preptlist.o prepunion.o
+
+# not ready yet: predmig.o xfunc.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/optimizer/prep/Makefile.inc b/src/backend/optimizer/prep/Makefile.inc
deleted file mode 100644
index 40026716c9e..00000000000
--- a/src/backend/optimizer/prep/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for optimizer/prep
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/optimizer/prep/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:37 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= archive.c prepqual.c preptlist.c prepunion.c
diff --git a/src/backend/optimizer/util/Makefile b/src/backend/optimizer/util/Makefile
new file mode 100644
index 00000000000..1713a2215a4
--- /dev/null
+++ b/src/backend/optimizer/util/Makefile
@@ -0,0 +1,40 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for optimizer/util
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.1 1996/10/27 09:48:53 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = clauseinfo.o clauses.o indexnode.o internal.o plancat.o \
+ joininfo.o keys.o ordering.o pathnode.o relnode.o tlist.o var.o
+
+# not ready yet: predmig.o xfunc.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/optimizer/util/Makefile.inc b/src/backend/optimizer/util/Makefile.inc
deleted file mode 100644
index 18955d282c8..00000000000
--- a/src/backend/optimizer/util/Makefile.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for optimizer/util
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:38 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= clauseinfo.c clauses.c indexnode.c internal.c plancat.c \
- joininfo.c keys.c ordering.c pathnode.c relnode.c tlist.c var.c
diff --git a/src/backend/parser/Makefile b/src/backend/parser/Makefile
new file mode 100644
index 00000000000..69705bb4ac8
--- /dev/null
+++ b/src/backend/parser/Makefile
@@ -0,0 +1,58 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for parser
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.1 1996/10/27 09:49:05 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../..
+include ../../Makefile.global
+
+INCLUDE_OPT = -I.. \
+ -I../port/$(PORTNAME) \
+ -I../include \
+ -I../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = analyze.o catalog_utils.o dbcommands.o gram.o \
+ keywords.o parser.o parse_query.o scan.o scansup.o sysfunc.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+gram.c parse.h: gram.y
+ $(YACC) $(YFLAGS) $<
+ mv y.tab.c gram.c
+ mv y.tab.h parse.h
+
+scan.c: scan.l
+ $(LEX) $<
+ mv lex.yy.c scan.c
+
+# The following dependencies on parse.h are computed by
+# make depend, but we state them here explicitly anyway because
+# parse.h doesn't even exist at first and if user fails to
+# do make depend, we still want the build to succeed.
+
+analyze.o keywords.o scan.o: parse.h
+
+# This is unusual: We actually have to build some of the parts before
+# we know what the header file dependencies are.
+dep: gram.c scan.c
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS) gram.c parse.h scan.c
+# And the garbage that might have been left behind by partial build:
+ rm -f y.tab.c y.tab.h lex.yy.c
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/parser/Makefile.inc b/src/backend/parser/Makefile.inc
deleted file mode 100644
index 0a86f9e45c5..00000000000
--- a/src/backend/parser/Makefile.inc
+++ /dev/null
@@ -1,45 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the parser module
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/parser/Attic/Makefile.inc,v 1.5 1996/09/26 15:40:45 momjian Exp $
-#
-#-------------------------------------------------------------------------
-
-VPATH:= $(VPATH):$(CURDIR)/parser
-
-PARSEYACCS= gram.c parse.h
-#PARSEYACCS= gram.c
-
-$(PARSEYACCS): gram.y
- $(YACC) $(YFLAGS) $<
- mv y.tab.c $(objdir)/gram.c
- mv y.tab.h $(objdir)/parse.h
-
-$(objdir)/gram.o: gram.c
- $(cc_inobjdir)
-
-
-scan.c: scan.l
- cd $(objdir); $(LEX) $<; mv lex.yy.c scan.c
-
-$(objdir)/scan.o: scan.c
- $(cc_inobjdir)
-
-
-SRCS_PARSER+= analyze.c catalog_utils.c dbcommands.c gram.c \
- keywords.c parser.c parse_query.c scan.c scansup.c sysfunc.c
-
-CLEANFILES+= scan.c ${PARSEYACCS}
-
-POSTGRES_DEPEND+= scan.c $(PARSEYACCS)
-
-HEADERS+= catalog_utils.h io.h parse_query.h parsetree.h \
- dbcommands.h keywords.h sysfunc.c
-
-
diff --git a/src/backend/port/BSD44_derived/Makefile b/src/backend/port/BSD44_derived/Makefile
new file mode 100644
index 00000000000..2ddd33efea7
--- /dev/null
+++ b/src/backend/port/BSD44_derived/Makefile
@@ -0,0 +1,36 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for port/BSD44_derived
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/BSD44_derived/Attic/Makefile,v 1.1 1996/10/27 09:49:20 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = dl.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/port/BSD44_derived/Makefile.inc b/src/backend/port/BSD44_derived/Makefile.inc
deleted file mode 100644
index bee6aea9ebd..00000000000
--- a/src/backend/port/BSD44_derived/Makefile.inc
+++ /dev/null
@@ -1,28 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for port/BSD44_derived (for OSs derived from 4.4-lite BSD)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/port/BSD44_derived/Attic/Makefile.inc,v 1.3 1996/10/19 06:36:52 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-#
-# 4.4-lite BSD-derived OSs require that the lex library be included,
-# in case yywrap is defined
-#
-LDADD+= -ll
-
-HAVE_Cplusplus= true
-
-#
-# 4.4-lite BSD-derived OSs have a little trouble with partially-implemented
-# dynamic loading soutines. See the comments in port-protos.h.
-#
-SUBSRCS= dl.c
-
-HEADERS+= float.h machine.h port-protos.h
diff --git a/src/backend/port/Makefile b/src/backend/port/Makefile
new file mode 100644
index 00000000000..23f287de933
--- /dev/null
+++ b/src/backend/port/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for the port-specific subsystem of the backend
+#
+# You must invoke this make file with the PORTNAME variable set to the
+# name of a port, i.e. the name of a subdirectory of the current directory.
+# Example:
+#
+# make SUBSYS.o PORTNAME=linux
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/Makefile,v 1.1 1996/10/27 09:49:14 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+ifndef PORTNAME
+.DEFAULT all:
+ @echo "Error: Must invoke make with PORTNAME= argument."
+ @false
+else
+
+all: SUBSYS.o
+
+SUBSYS.o:
+ $(MAKE) -C $(PORTNAME) SUBSYS.o
+ cp $(PORTNAME)/SUBSYS.o .
+
+clean:
+ rm -f SUBSYS.o
+ $(MAKE) -C $(PORTNAME) clean
+
+.DEFAULT:
+ $(MAKE) -C $(PORTNAME) $@
+
+
+endif
diff --git a/src/backend/port/Makefile.inc b/src/backend/port/Makefile.inc
deleted file mode 100644
index a21fd46968f..00000000000
--- a/src/backend/port/Makefile.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the port module (for code specific to various UNIX
-# platforms)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:41 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-portdir= $(CURDIR)/port/$(PORTNAME)
-VPATH:= $(VPATH):$(portdir)
-
-SUBSRCS=
-include $(portdir)/Makefile.inc
-SRCS_PORT:= $(SUBSRCS)
-
diff --git a/src/backend/port/aix/Makefile b/src/backend/port/aix/Makefile
new file mode 100644
index 00000000000..3e95b2162c5
--- /dev/null
+++ b/src/backend/port/aix/Makefile
@@ -0,0 +1,36 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for port/aix
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/aix/Attic/Makefile,v 1.1 1996/10/27 09:49:27 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = dlfcn.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/port/aix/Makefile.inc b/src/backend/port/aix/Makefile.inc
deleted file mode 100644
index aecde8f7799..00000000000
--- a/src/backend/port/aix/Makefile.inc
+++ /dev/null
@@ -1,40 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for port/aix (AIX specific stuff)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/port/aix/Attic/Makefile.inc,v 1.3 1996/10/18 04:46:55 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-#
-# aix has fast linkers and don't need the BIGOBJ stuff.
-#
-BIGOBJS=false
-
-LDFLAGS+= -bE:$(objdir)/$(PROG).exp
-
-LDADD+= -ll -lld
-
-HEADERS+= dlfcn.h machine.h port-protos.h
-
-SUBSRCS+= dlfcn.c
-
-MKLDEXPORT=$(POSTGRESDIR)/src/backend/port/aix/mkldexport.sh
-
-${PROG}.exp: ${PROG}.noexp
- mv -f $(objdir)/${PROG}.noexp $(objdir)/${PROG}
- $(MKLDEXPORT) $(objdir)/${PROG} ${BINDIR} > $(objdir)/${PROG}.exp
- mv -f $(objdir)/${PROG} $(objdir)/${PROG}.noexp
-
-${PROG}.noexp: ${OBJS}
- touch -f $(objdir)/${PROG}.exp
- ${CC} ${LDFLAGS} -o $(objdir)/${PROG}.noexp ${OBJS} ${LDADD}
-
-EXPORTS= ${PROG}.exp
-
-CLEANFILES+= ${PROG}.noexp ${PROG}.exp
diff --git a/src/backend/port/alpha/Makefile b/src/backend/port/alpha/Makefile
new file mode 100644
index 00000000000..44e1407883c
--- /dev/null
+++ b/src/backend/port/alpha/Makefile
@@ -0,0 +1,36 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for port/alpha
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/alpha/Attic/Makefile,v 1.1 1996/10/27 09:49:37 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = port.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/port/alpha/Makefile.inc b/src/backend/port/alpha/Makefile.inc
deleted file mode 100644
index 5e9c70af491..00000000000
--- a/src/backend/port/alpha/Makefile.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for port/alpha (Alpha OSF/1 specific stuff)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/port/alpha/Attic/Makefile.inc,v 1.2 1996/10/18 04:47:04 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-LDADD+= -lln
-
-#
-# The YACC grammar is too big..
-#
-#.if !defined(CDEBUG)
-##CFLAGS+= -Olimit 2000
-#.endif
-
-HEADERS+= machine.h port-protos.h
-
-SUBSRCS= port.c
diff --git a/src/backend/port/bsdi/Makefile b/src/backend/port/bsdi/Makefile
new file mode 100644
index 00000000000..4e79822f7dd
--- /dev/null
+++ b/src/backend/port/bsdi/Makefile
@@ -0,0 +1,36 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for port/bsdi
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/bsdi/Attic/Makefile,v 1.1 1996/10/27 09:49:44 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = dynloader.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/port/bsdi/Makefile.inc b/src/backend/port/bsdi/Makefile.inc
deleted file mode 100644
index 347ded2c668..00000000000
--- a/src/backend/port/bsdi/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for port/bsdi
-#
-# NOTES
-# The BSD/OS port is included here by courtesy of Kurt Lidl.
-#
-# (5) 1994, Kurt Lidl, lidl@pix.com
-#
-#-------------------------------------------------------------------------
-
-LDADD+= -ldld -lipc
-SUBSRCS= dynloader.c
diff --git a/src/backend/port/bsdi_2_1/Makefile b/src/backend/port/bsdi_2_1/Makefile
new file mode 100644
index 00000000000..b5bb21445c1
--- /dev/null
+++ b/src/backend/port/bsdi_2_1/Makefile
@@ -0,0 +1,36 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for port/bsdi_2_1
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/bsdi_2_1/Attic/Makefile,v 1.1 1996/10/27 09:49:50 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = port.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/port/bsdi_2_1/Makefile.inc b/src/backend/port/bsdi_2_1/Makefile.inc
deleted file mode 100644
index cb9bd71e88a..00000000000
--- a/src/backend/port/bsdi_2_1/Makefile.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for port/bsdi_2_1
-#
-# NOTES
-# The BSD/OS port is included here by courtesy of Kurt Lidl.
-#
-# (5) 1994, Kurt Lidl, lidl@pix.com
-#
-#-------------------------------------------------------------------------
-
-LDADD+= -ldl -lipc
diff --git a/src/backend/port/dgux/Makefile b/src/backend/port/dgux/Makefile
new file mode 100644
index 00000000000..e84f9ab4114
--- /dev/null
+++ b/src/backend/port/dgux/Makefile
@@ -0,0 +1,36 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for port/dgux
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/dgux/Attic/Makefile,v 1.1 1996/10/27 09:49:57 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = port.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/port/dgux/Makefile.inc b/src/backend/port/dgux/Makefile.inc
deleted file mode 100644
index e01dd8d8b2b..00000000000
--- a/src/backend/port/dgux/Makefile.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for port/linux (Linux specific stuff)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/port/dgux/Attic/Makefile.inc,v 1.3 1996/10/18 04:47:13 scrappy Exp $
-#
-# NOTES
-# The Linux port is included here by courtesy of Kai Petzke.
-#
-# (C) 1994, Kai Petzke, wpp@marie.physik.tu-berlin.de
-#
-#-------------------------------------------------------------------------
-
-BIGOBJS= false
-
-HEADERS+= machine.h port-protos.h
diff --git a/src/backend/port/hpux/Makefile b/src/backend/port/hpux/Makefile
new file mode 100644
index 00000000000..2ca2af0dce8
--- /dev/null
+++ b/src/backend/port/hpux/Makefile
@@ -0,0 +1,36 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for port/hpux
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/hpux/Attic/Makefile,v 1.1 1996/10/27 09:50:12 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = port.o dynloader.o tas.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/port/hpux/Makefile.inc b/src/backend/port/hpux/Makefile.inc
deleted file mode 100644
index af338020112..00000000000
--- a/src/backend/port/hpux/Makefile.inc
+++ /dev/null
@@ -1,59 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for port/hpux (HP-UX specific stuff)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/port/hpux/Attic/Makefile.inc,v 1.2 1996/10/18 00:33:22 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-#
-# HP-UX needs:
-# -W l,-E export symbols for linking with the shared libraries
-# dynamic loader
-# -W p,-H400000 expand cpp #define table size so the Nodes files don't
-# break it
-#
-# -W p,-H400000
-ifeq ($(CC), cc)
-CFLAGS+= -W l,-E
-LDFLAGS+= -W l,-E
-LDADD+= -ll -ldld
-else
-ifeq ($(CC), gcc)
-LDADD+= -ll /usr/lib/libdld.sl
-endif
-endif
-
-#
-# The #pragma trick required on 8.07 no longer works -- the #pragma
-# is thoroughly broken. However, the +u flag has been extended to
-# handle alignment requirement arguments (defaulting to 2) for things
-# other than struct references, so the #pragma is no longer needed.
-#
-
-#
-# (1) The YACC grammar is too big..
-# (HP-UX 9.0x, x<2, added basic block limits for +O2; 9.0x, x>=2, changed
-# the syntax to something else.)
-#
-# (2) The 9.00 optimizer chokes on some of our source.
-#
-#.if (${HPUX_MAJOR} == "09")
-#. if !defined(CDEBUG)
-#. if (${HPUX_MINOR} == "00" || ${HPUX_MINOR} == "01")
-#CFLAGS+= +Obb600
-#CFLAGS+= -DWEAK_C_OPTIMIZER
-#. else
-#CFLAGS+= +Onolimit
-#. endif
-#. endif
-#.endif
-
-HEADERS+= fixade.h machine.h port-protos.h
-
-SUBSRCS+= dynloader.c port.c tas.s
diff --git a/src/backend/port/i386_solaris/Makefile b/src/backend/port/i386_solaris/Makefile
new file mode 100644
index 00000000000..b3450ec68c8
--- /dev/null
+++ b/src/backend/port/i386_solaris/Makefile
@@ -0,0 +1,36 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for port/i386_solaris
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/i386_solaris/Attic/Makefile,v 1.1 1996/10/27 09:50:17 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = port.o tas.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/port/i386_solaris/Makefile.inc b/src/backend/port/i386_solaris/Makefile.inc
deleted file mode 100644
index efc5ca0f76c..00000000000
--- a/src/backend/port/i386_solaris/Makefile.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for port/i386_solaris (X86/Solaris 2.x specific stuff)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/port/i386_solaris/Attic/Makefile.inc,v 1.5 1996/10/18 04:48:16 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-LDADD+= -ll -ldl
-
-SUBSRCS+= port.c tas.s
-
-HEADERS+= machine.h port-protos.h rusagestub.h
diff --git a/src/backend/port/irix5/Makefile b/src/backend/port/irix5/Makefile
new file mode 100644
index 00000000000..34630be1372
--- /dev/null
+++ b/src/backend/port/irix5/Makefile
@@ -0,0 +1,36 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for port/irix5
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/irix5/Attic/Makefile,v 1.1 1996/10/27 09:50:24 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = port.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/port/irix5/Makefile.inc b/src/backend/port/irix5/Makefile.inc
deleted file mode 100644
index 887cadab7a3..00000000000
--- a/src/backend/port/irix5/Makefile.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for port/irix5 (IRIX 5 specific stuff)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# /usr/local/devel/pglite/cvs/src/backend/port/sparc_solaris/Makefile.inc,v 1.3 1995/03/21 06:51:21 andrew Exp
-#
-#-------------------------------------------------------------------------
-
-LDADD+= -ll
-
-SUBSRCS+= port.c
-
-HEADERS+= machine.h port-protos.h
diff --git a/src/backend/port/linux/Makefile b/src/backend/port/linux/Makefile
new file mode 100644
index 00000000000..9ee8ad8ef54
--- /dev/null
+++ b/src/backend/port/linux/Makefile
@@ -0,0 +1,40 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for port/linux
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/linux/Attic/Makefile,v 1.1 1996/10/27 09:50:31 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+ifdef LINUX_ELF
+OBJS = port.o
+else
+OBJS = dynloader.o
+endif
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/port/linux/Makefile.inc b/src/backend/port/linux/Makefile.inc
deleted file mode 100644
index 00ed140f3b7..00000000000
--- a/src/backend/port/linux/Makefile.inc
+++ /dev/null
@@ -1,34 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for port/linux (Linux specific stuff)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/port/linux/Attic/Makefile.inc,v 1.2 1996/10/18 00:33:32 scrappy Exp $
-#
-# NOTES
-# The Linux port is included here by courtesy of Kai Petzke.
-#
-# (C) 1994, Kai Petzke, wpp@marie.physik.tu-berlin.de
-#
-#-------------------------------------------------------------------------
-
-#
-# linux has fast linkers and don't need the BIGOBJ stuff.
-#
-BIGOBJS= false
-
-
-ifdef LINUX_ELF
-CC=gcc
-LDADD+= -ldl
-CFLAGS+= -DLINUX_ELF
-else
-LDADD+= -ldld
-SUBSRCS+= dynloader.c
-endif
-
-HEADERS+= machine.h port-protos.h
diff --git a/src/backend/port/sparc/Makefile b/src/backend/port/sparc/Makefile
new file mode 100644
index 00000000000..f92e659e765
--- /dev/null
+++ b/src/backend/port/sparc/Makefile
@@ -0,0 +1,36 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for port/sparc
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/sparc/Attic/Makefile,v 1.1 1996/10/27 09:50:43 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = strtol.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/port/sparc/Makefile.inc b/src/backend/port/sparc/Makefile.inc
deleted file mode 100644
index 736903f1366..00000000000
--- a/src/backend/port/sparc/Makefile.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for port/sparc (SPARC/SunOS 4 specific stuff)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/port/sparc/Attic/Makefile.inc,v 1.2 1996/10/18 04:48:32 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-LDADD+= -lln -ldl
-
-#
-# SunOS 4 strtol is broken -- doesn't report overflow using errno.
-#
-SUBSRCS= strtol.c
-
-HEADERS+= float.h machine.h port-protos.h
diff --git a/src/backend/port/sparc_solaris/Makefile b/src/backend/port/sparc_solaris/Makefile
new file mode 100644
index 00000000000..30b9a223e97
--- /dev/null
+++ b/src/backend/port/sparc_solaris/Makefile
@@ -0,0 +1,36 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for port/sparc_solaris
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/sparc_solaris/Attic/Makefile,v 1.1 1996/10/27 09:50:50 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = port.o tas.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/port/sparc_solaris/Makefile.inc b/src/backend/port/sparc_solaris/Makefile.inc
deleted file mode 100644
index e1723cca29b..00000000000
--- a/src/backend/port/sparc_solaris/Makefile.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for port/sparc_solaris (SPARC/Solaris 2.x specific stuff)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/port/sparc_solaris/Attic/Makefile.inc,v 1.2 1996/10/18 04:48:47 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-LDADD+= -ll -ldl
-
-SUBSRCS+= port.c tas.s
-
-HEADERS+= machine.h port-protos.h rusagestub.h
diff --git a/src/backend/port/svr4/Makefile b/src/backend/port/svr4/Makefile
new file mode 100644
index 00000000000..d1e78edc7ca
--- /dev/null
+++ b/src/backend/port/svr4/Makefile
@@ -0,0 +1,36 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for port/svr4
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/svr4/Attic/Makefile,v 1.1 1996/10/27 09:50:57 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = port.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/port/svr4/Makefile.inc b/src/backend/port/svr4/Makefile.inc
deleted file mode 100644
index 5e0cf5d6cc9..00000000000
--- a/src/backend/port/svr4/Makefile.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for port/svr4 (Intel x86/Intel SVR4 specific stuff)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# /usr/local/devel/pglite/cvs/src/backend/port/svr4/Makefile.inc,v 1.3 1995/03/21 06:51:21 andrew Exp
-#
-#-------------------------------------------------------------------------
-
-LDADD+= -ll -ldl
-
-SUBSRCS+= port.c
-
-HEADERS+= machine.h port-protos.h rusagestub.h
diff --git a/src/backend/port/ultrix4/Makefile b/src/backend/port/ultrix4/Makefile
new file mode 100644
index 00000000000..550fdc9c12a
--- /dev/null
+++ b/src/backend/port/ultrix4/Makefile
@@ -0,0 +1,36 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for port/ultrix
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/Makefile,v 1.1 1996/10/27 09:51:05 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = dynloader.o port.o strdup.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/port/ultrix4/Makefile.inc b/src/backend/port/ultrix4/Makefile.inc
deleted file mode 100644
index e7754d62123..00000000000
--- a/src/backend/port/ultrix4/Makefile.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for port/ultrix (Ultrix4.x specific stuff)
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/Makefile.inc,v 1.2 1996/10/18 04:49:09 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-LDADD+= -ldl -lln
-
-#
-# The YACC grammar is too big..
-#
-#.if !defined(CDEBUG)
-#CFLAGS+= -Olimit 2000
-#.endif
-
-HEADERS+= dl.h machine.h port-protos.h
-
-SUBSRCS+= dynloader.c port.c strdup.c
diff --git a/src/backend/port/win32/regex/Makefile.inc b/src/backend/port/win32/regex/Makefile.inc
deleted file mode 100644
index f9853f31ce2..00000000000
--- a/src/backend/port/win32/regex/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-
-# regex sources
-.PATH: ${.CURDIR}/regex
-
-CFLAGS+=-DPOSIX_MISTAKE
-
-SRCS+= regcomp.c regerror.c regexec.c regfree.c
-
-MAN3+= regex.0
-MAN7+= re_format.0
-
-MLINKS+=regex.3 regcomp.3 regex.3 regexec.3 regex.3 regerror.3
-MLINKS+=regexec.3 regfree.3
diff --git a/src/backend/postmaster/Makefile b/src/backend/postmaster/Makefile
new file mode 100644
index 00000000000..73b8e40b9bc
--- /dev/null
+++ b/src/backend/postmaster/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for postmaster
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/postmaster/Makefile,v 1.1 1996/10/27 09:51:20 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../..
+include ../../Makefile.global
+
+INCLUDE_OPT = -I.. \
+ -I../port/$(PORTNAME) \
+ -I../include \
+ -I../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = postmaster.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/postmaster/Makefile.inc b/src/backend/postmaster/Makefile.inc
deleted file mode 100644
index 8f6bfd57422..00000000000
--- a/src/backend/postmaster/Makefile.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the postmaster module
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/postmaster/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:49 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-VPATH:= $(VPATH):$(CURDIR)/postmaster
-
-SRCS_POSTMASTER= postmaster.c
diff --git a/src/backend/regex/Makefile b/src/backend/regex/Makefile
new file mode 100644
index 00000000000..b405ac8abfc
--- /dev/null
+++ b/src/backend/regex/Makefile
@@ -0,0 +1,39 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for regex
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/regex/Makefile,v 1.1 1996/10/27 09:51:27 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../..
+include ../../Makefile.global
+
+INCLUDE_OPT = -I.. \
+ -I../port/$(PORTNAME) \
+ -I../include \
+ -I../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+CFLAGS+=-DPOSIX_MISTAKE
+
+
+OBJS = regcomp.o regerror.o regexec.o regfree.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/regex/Makefile.inc b/src/backend/regex/Makefile.inc
deleted file mode 100644
index 229fd2d9644..00000000000
--- a/src/backend/regex/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-
-# regex sources
-VPATH:=$(VPATH):$(CURDIR)/regex
-
-CFLAGS+=-DPOSIX_MISTAKE -I$(CURDIR)/regex
-
-SRCS_REGEX= regcomp.c regerror.c regexec.c regfree.c
-
-MAN3+= regex.0
-MAN7+= re_format.0
-
-MLINKS+=regex.3 regcomp.3 regex.3 regexec.3 regex.3 regerror.3
-MLINKS+=regexec.3 regfree.3
diff --git a/src/backend/rewrite/Makefile b/src/backend/rewrite/Makefile
new file mode 100644
index 00000000000..261bc334eef
--- /dev/null
+++ b/src/backend/rewrite/Makefile
@@ -0,0 +1,38 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for rewrite
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/rewrite/Makefile,v 1.1 1996/10/27 09:51:38 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../..
+include ../../Makefile.global
+
+INCLUDE_OPT = -I.. \
+ -I../port/$(PORTNAME) \
+ -I../include \
+ -I../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = rewriteRemove.o rewriteDefine.o \
+ rewriteHandler.o rewriteManip.o rewriteSupport.o locks.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/rewrite/Makefile.inc b/src/backend/rewrite/Makefile.inc
deleted file mode 100644
index 9212f50a968..00000000000
--- a/src/backend/rewrite/Makefile.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the rewrite rules module
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:51 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-VPATH:= $(VPATH):$(CURDIR)/rewrite
-
-
-SRCS_REWRITE= rewriteRemove.c rewriteDefine.c \
- rewriteHandler.c rewriteManip.c rewriteSupport.c locks.c
-
-HEADERS+= rewriteRemove.h rewriteDefine.h rewriteHandler.h \
- rewriteManip.h rewriteSupport.h locks.h prs2lock.h
-
diff --git a/src/backend/storage/Makefile b/src/backend/storage/Makefile
new file mode 100644
index 00000000000..d353badd784
--- /dev/null
+++ b/src/backend/storage/Makefile
@@ -0,0 +1,43 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for the storage manager subsystem
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/storage/Makefile,v 1.1 1996/10/27 09:51:49 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+all: SUBSYS.o
+
+SUBSYS.o:
+ $(MAKE) -C buffer SUBSYS.o
+ $(MAKE) -C file SUBSYS.o
+ $(MAKE) -C ipc SUBSYS.o
+ $(MAKE) -C large_object SUBSYS.o
+ $(MAKE) -C lmgr SUBSYS.o
+ $(MAKE) -C page SUBSYS.o
+ $(MAKE) -C smgr SUBSYS.o
+ $(LD) -r -o SUBSYS.o \
+ buffer/SUBSYS.o file/SUBSYS.o ipc/SUBSYS.o large_object/SUBSYS.o \
+ lmgr/SUBSYS.o page/SUBSYS.o smgr/SUBSYS.o
+
+clean:
+ rm -f SUBSYS.o
+ $(MAKE) -C buffer clean
+ $(MAKE) -C file clean
+ $(MAKE) -C ipc clean
+ $(MAKE) -C large_object clean
+ $(MAKE) -C lmgr clean
+ $(MAKE) -C page clean
+ $(MAKE) -C smgr clean
+
+.DEFAULT:
+ $(MAKE) -C buffer $@
+ $(MAKE) -C file $@
+ $(MAKE) -C ipc $@
+ $(MAKE) -C large_object $@
+ $(MAKE) -C lmgr $@
+ $(MAKE) -C page $@
+ $(MAKE) -C smgr $@
+
diff --git a/src/backend/storage/Makefile.inc b/src/backend/storage/Makefile.inc
deleted file mode 100644
index aef287ca71a..00000000000
--- a/src/backend/storage/Makefile.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the storage modules
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/storage/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:52 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-stordir= $(CURDIR)/storage
-VPATH:= $(VPATH):$(stordir):$(stordir)/buffer:$(stordir)/file:$(stordir)/ipc:\
- $(stordir)/large_object:$(stordir)/lmgr:$(stordir)/page:$(stordir)/smgr
-
-SUBSRCS=
-include $(stordir)/buffer/Makefile.inc
-include $(stordir)/file/Makefile.inc
-include $(stordir)/ipc/Makefile.inc
-include $(stordir)/large_object/Makefile.inc
-include $(stordir)/lmgr/Makefile.inc
-include $(stordir)/page/Makefile.inc
-include $(stordir)/smgr/Makefile.inc
-SRCS_STORAGE:= $(SUBSRCS)
-
-HEADERS+= backendid.h block.h buf.h buf_internals.h bufmgr.h bufpage.h \
- fd.h ipc.h item.h itemid.h itempos.h \
- itemptr.h large_object.h lmgr.h lock.h multilev.h off.h page.h \
- pagenum.h pos.h proc.h shmem.h sinval.h sinvaladt.h smgr.h spin.h
diff --git a/src/backend/storage/buffer/Makefile b/src/backend/storage/buffer/Makefile
new file mode 100644
index 00000000000..d1670ae5ca4
--- /dev/null
+++ b/src/backend/storage/buffer/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for storage/buffer
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/storage/buffer/Makefile,v 1.1 1996/10/27 09:51:54 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = buf_table.o buf_init.o bufmgr.o freelist.o localbuf.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/storage/buffer/Makefile.inc b/src/backend/storage/buffer/Makefile.inc
deleted file mode 100644
index 1d507f9227b..00000000000
--- a/src/backend/storage/buffer/Makefile.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for storage/buffer
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:53 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= buf_table.c buf_init.c bufmgr.c freelist.c localbuf.c
-
-SRCS_SITEMGR+= buf_table.c buf_init.c freelist.c
diff --git a/src/backend/storage/file/Makefile b/src/backend/storage/file/Makefile
new file mode 100644
index 00000000000..a1077d3b337
--- /dev/null
+++ b/src/backend/storage/file/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for storage/file
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/storage/file/Makefile,v 1.1 1996/10/27 09:52:01 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = fd.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/storage/file/Makefile.inc b/src/backend/storage/file/Makefile.inc
deleted file mode 100644
index 767cbecd38a..00000000000
--- a/src/backend/storage/file/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for storage/file
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/storage/file/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:55 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= fd.c
diff --git a/src/backend/storage/ipc/Makefile b/src/backend/storage/ipc/Makefile
new file mode 100644
index 00000000000..96e2a059455
--- /dev/null
+++ b/src/backend/storage/ipc/Makefile
@@ -0,0 +1,38 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for storage/ipc
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/storage/ipc/Makefile,v 1.1 1996/10/27 09:52:10 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = ipc.o ipci.o s_lock.o shmem.o shmqueue.o sinval.o \
+ sinvaladt.o spin.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/storage/ipc/Makefile.inc b/src/backend/storage/ipc/Makefile.inc
deleted file mode 100644
index b426dba0ff0..00000000000
--- a/src/backend/storage/ipc/Makefile.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for storage/ipc
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:54 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= ipc.c ipci.c s_lock.c shmem.c shmqueue.c sinval.c \
- sinvaladt.c spin.c
diff --git a/src/backend/storage/large_object/Makefile b/src/backend/storage/large_object/Makefile
new file mode 100644
index 00000000000..4be19106da7
--- /dev/null
+++ b/src/backend/storage/large_object/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for storage/large_object
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/storage/large_object/Makefile,v 1.1 1996/10/27 09:52:20 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = inv_api.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/storage/large_object/Makefile.inc b/src/backend/storage/large_object/Makefile.inc
deleted file mode 100644
index fd27b46a49d..00000000000
--- a/src/backend/storage/large_object/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for storage/large_object
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/storage/large_object/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:55 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= inv_api.c
diff --git a/src/backend/storage/lmgr/Makefile b/src/backend/storage/lmgr/Makefile
new file mode 100644
index 00000000000..a96ceb8ba4e
--- /dev/null
+++ b/src/backend/storage/lmgr/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for storage/lmgr
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Makefile,v 1.1 1996/10/27 09:52:27 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = lmgr.o lock.o multi.o proc.o single.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/storage/lmgr/Makefile.inc b/src/backend/storage/lmgr/Makefile.inc
deleted file mode 100644
index ac507558b57..00000000000
--- a/src/backend/storage/lmgr/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for storage/lmgr
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:55 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= lmgr.c lock.c multi.c proc.c single.c
diff --git a/src/backend/storage/page/Makefile b/src/backend/storage/page/Makefile
new file mode 100644
index 00000000000..69fad34546c
--- /dev/null
+++ b/src/backend/storage/page/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for storage/page
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/storage/page/Makefile,v 1.1 1996/10/27 09:52:34 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = bufpage.o itemptr.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/storage/page/Makefile.inc b/src/backend/storage/page/Makefile.inc
deleted file mode 100644
index 2a7d8408512..00000000000
--- a/src/backend/storage/page/Makefile.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for storage/page
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/storage/page/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:58 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= bufpage.c itemptr.c
-
-
diff --git a/src/backend/storage/smgr/Makefile b/src/backend/storage/smgr/Makefile
new file mode 100644
index 00000000000..5ef937d503e
--- /dev/null
+++ b/src/backend/storage/smgr/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for storage/smgr
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/storage/smgr/Makefile,v 1.1 1996/10/27 09:52:40 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = md.o mm.o smgr.o smgrtype.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/storage/smgr/Makefile.inc b/src/backend/storage/smgr/Makefile.inc
deleted file mode 100644
index 8ff067afbe8..00000000000
--- a/src/backend/storage/smgr/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for storage/smgr
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/storage/smgr/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:59 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= md.c mm.c smgr.c smgrtype.c
diff --git a/src/backend/tcop/Makefile b/src/backend/tcop/Makefile
new file mode 100644
index 00000000000..b54291de4c4
--- /dev/null
+++ b/src/backend/tcop/Makefile
@@ -0,0 +1,42 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for tcop
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.1 1996/10/27 09:52:53 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../..
+include ../../Makefile.global
+
+INCLUDE_OPT = -I.. \
+ -I../port/$(PORTNAME) \
+ -I../include \
+ -I../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = aclchk.o dest.o fastpath.o postgres.o pquery.o utility.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+utility.o: ../parse.h
+
+../parse.h:
+ make -C .. parse.h
+
+dep: ../parse.h
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/tcop/Makefile.inc b/src/backend/tcop/Makefile.inc
deleted file mode 100644
index 7bc44a67fd9..00000000000
--- a/src/backend/tcop/Makefile.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the traffic cop module
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/tcop/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:59 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-VPATH:= $(VPATH):$(CURDIR)/tcop
-
-SRCS_TCOP= aclchk.c dest.c fastpath.c postgres.c pquery.c utility.c
-
-HEADERS+= dest.h fastpath.h pquery.h tcopdebug.h tcopprot.h utility.h
diff --git a/src/backend/tioga/Makefile b/src/backend/tioga/Makefile
new file mode 100644
index 00000000000..ec46c5abdcd
--- /dev/null
+++ b/src/backend/tioga/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for tioga
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/tioga/Attic/Makefile,v 1.1 1996/10/27 09:53:00 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../..
+include ../../Makefile.global
+
+INCLUDE_OPT = -I.. \
+ -I../port/$(PORTNAME) \
+ -I../include \
+ -I../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = tgRecipe.o Varray.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/tioga/Makefile.inc b/src/backend/tioga/Makefile.inc
deleted file mode 100644
index 57086e6db6d..00000000000
--- a/src/backend/tioga/Makefile.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the Tioga module
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/tioga/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:22:00 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-VPATH:= $(VPATH):$(CURDIR)/tioga
-
-SRCS_TIOGA= tgRecipe.c Varray.c
-
-HEADERS+= tgRecipe.h Arr_TgRecipe.h Varray.h
-
-
-
diff --git a/src/backend/utils/Makefile b/src/backend/utils/Makefile
new file mode 100644
index 00000000000..7e0668c9943
--- /dev/null
+++ b/src/backend/utils/Makefile
@@ -0,0 +1,68 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for utils
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/utils/Makefile,v 1.1 1996/10/27 09:53:07 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+INCLUDE_OPT = -I.. \
+ -I../include \
+ -I../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+all: SUBSYS.o
+
+SUBSYS.o: fmgrtab.o
+ $(MAKE) -C adt SUBSYS.o
+ $(MAKE) -C cache SUBSYS.o
+ $(MAKE) -C error SUBSYS.o
+ $(MAKE) -C fmgr SUBSYS.o
+ $(MAKE) -C hash SUBSYS.o
+ $(MAKE) -C init SUBSYS.o
+ $(MAKE) -C mmgr SUBSYS.o
+ $(MAKE) -C sort SUBSYS.o
+ $(MAKE) -C time SUBSYS.o
+ $(LD) -r -o SUBSYS.o \
+ fmgrtab.o adt/SUBSYS.o cache/SUBSYS.o error/SUBSYS.o \
+ fmgr/SUBSYS.o hash/SUBSYS.o init/SUBSYS.o mmgr/SUBSYS.o \
+ sort/SUBSYS.o time/SUBSYS.o
+
+fmgrtab.o: ../fmgr.h
+
+../fmgr.h:
+ $(MAKE) -C .. fmgr.h
+
+fmgr.h fmgrtab.c: ./Gen_fmgrtab.sh ../../include/catalog/pg_proc.h
+ sh $(SHOPTS) Gen_fmgrtab.sh ../../include/catalog/pg_proc.h
+
+clean:
+ rm -f SUBSYS.o fmgr.h fmgrtab.o fmgrtab.c
+ $(MAKE) -C adt clean
+ $(MAKE) -C cache clean
+ $(MAKE) -C error clean
+ $(MAKE) -C fmgr clean
+ $(MAKE) -C hash clean
+ $(MAKE) -C init clean
+ $(MAKE) -C mmgr clean
+ $(MAKE) -C sort clean
+ $(MAKE) -C time clean
+
+dep: fmgr.h fmgrtab.c
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+ $(MAKE) -C adt dep
+ $(MAKE) -C cache dep
+ $(MAKE) -C error dep
+ $(MAKE) -C fmgr dep
+ $(MAKE) -C hash dep
+ $(MAKE) -C init dep
+ $(MAKE) -C mmgr dep
+ $(MAKE) -C sort dep
+ $(MAKE) -C time dep
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
diff --git a/src/backend/utils/Makefile.inc b/src/backend/utils/Makefile.inc
deleted file mode 100644
index e74e35084a4..00000000000
--- a/src/backend/utils/Makefile.inc
+++ /dev/null
@@ -1,62 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for the utilities modules
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Makefile.inc,v 1.2 1996/08/28 02:13:10 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-utilsdir= $(CURDIR)/utils
-VPATH:= $(VPATH):$(utilsdir):\
- $(utilsdir)/adt:$(utilsdir)/cache:$(utilsdir)/error:$(utilsdir)/fmgr:\
- $(utilsdir)/hash:$(utilsdir)/init:$(utilsdir)/mmgr:$(utilsdir)/sort:\
- $(utilsdir)/time
-
-SUBSRCS=
-include $(utilsdir)/adt/Makefile.inc
-include $(utilsdir)/cache/Makefile.inc
-include $(utilsdir)/error/Makefile.inc
-include $(utilsdir)/fmgr/Makefile.inc
-include $(utilsdir)/hash/Makefile.inc
-include $(utilsdir)/init/Makefile.inc
-include $(utilsdir)/mmgr/Makefile.inc
-include $(utilsdir)/sort/Makefile.inc
-include $(utilsdir)/time/Makefile.inc
-SRCS_UTILS:= $(SUBSRCS) fmgrtab.c
-
-GENFMGRTAB= $(utilsdir)/Gen_fmgrtab.sh
-#GENFMGRTABFILES= fmgr.h fmgrtab.c
-GENFMGRTABFILES= fmgrtab.c
-
-#
-# BKIOPTS is set in ../catalog/Makefile.inc and sets the -D flags for
-# the DATA(...); statements. Hence, ../catalog/Makefile.inc had better
-# get slurped in prior to this Makefile.inc, or BKIOPTS should be set
-# in a higher directory level.
-#
-$(GENFMGRTABFILES): $(GENFMGRTAB) ../../include/catalog/pg_proc.h
- cd $(objdir); \
- sh $(SHOPTS) $(GENFMGRTAB) $(BKIOPTS) ../../include/catalog/pg_proc.h
-
-$(objdir)/fmgrtab.o: fmgrtab.c
- $(cc_inobjdir)
-
-POSTGRES_DEPEND+= ${GENFMGRTABFILES}
-
-#
-#${PROG}: ${GENFMGRTABFILES}
-#
-
-CLEANFILES+= $(GENFMGRTABFILES)
-
-HEADERS+= acl.h array.h bit.h builtins.h catcache.h datum.h \
- dynamic_loader.h elog.h exc.h excid.h fcache.h fmgrtab.h \
- geo-decls.h hsearch.h inval.h lselect.h lsyscache.h mcxt.h \
- memutils.h module.h nabstime.h oidcompos.h palloc.h \
- portal.h psort.h rel.h rel2.h relcache.h sets.h \
- syscache.h tqual.h
diff --git a/src/backend/utils/adt/Makefile b/src/backend/utils/adt/Makefile
new file mode 100644
index 00000000000..954582a0b0d
--- /dev/null
+++ b/src/backend/utils/adt/Makefile
@@ -0,0 +1,41 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for utils/adt
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.1 1996/10/27 09:53:15 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = acl.o arrayfuncs.o arrayutils.o bool.o char.o chunk.o date.o \
+ datum.o dt.o filename.o float.o geo-ops.o geo-selfuncs.o int.o \
+ misc.o nabstime.o name.o not_in.o numutils.o oid.o \
+ oidname.o oidint2.o oidint4.o regexp.o regproc.o selfuncs.o \
+ tid.o varchar.o varlena.o sets.o datetimes.o like.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/utils/adt/Makefile.inc b/src/backend/utils/adt/Makefile.inc
deleted file mode 100644
index 9a7d353f175..00000000000
--- a/src/backend/utils/adt/Makefile.inc
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for utils/adt
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:22:02 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= acl.c arrayfuncs.c arrayutils.c bool.c char.c chunk.c date.c \
- datum.c dt.c filename.c float.c geo-ops.c geo-selfuncs.c int.c \
- misc.c nabstime.c name.c not_in.c numutils.c oid.c \
- oidname.c oidint2.c oidint4.c regexp.c regproc.c selfuncs.c \
- tid.c varchar.c varlena.c sets.c datetimes.c like.c
-
diff --git a/src/backend/utils/cache/Makefile b/src/backend/utils/cache/Makefile
new file mode 100644
index 00000000000..c944479c58c
--- /dev/null
+++ b/src/backend/utils/cache/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for utils/cache
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/utils/cache/Makefile,v 1.1 1996/10/27 09:53:26 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = catcache.o inval.o rel.o relcache.o syscache.o lsyscache.o fcache.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/utils/cache/Makefile.inc b/src/backend/utils/cache/Makefile.inc
deleted file mode 100644
index c6a688e5e83..00000000000
--- a/src/backend/utils/cache/Makefile.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for utils/cache
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:22:06 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= catcache.c inval.c rel.c relcache.c syscache.c lsyscache.c fcache.c
-
diff --git a/src/backend/utils/error/Makefile b/src/backend/utils/error/Makefile
new file mode 100644
index 00000000000..154b95e3149
--- /dev/null
+++ b/src/backend/utils/error/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for utils/error
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/utils/error/Makefile,v 1.1 1996/10/27 09:53:33 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = assert.o elog.o exc.o excabort.o excid.o format.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/utils/error/Makefile.inc b/src/backend/utils/error/Makefile.inc
deleted file mode 100644
index 2c3d469669b..00000000000
--- a/src/backend/utils/error/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for utils/error
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:22:07 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= assert.c elog.c exc.c excabort.c excid.c format.c
diff --git a/src/backend/utils/fmgr/Makefile b/src/backend/utils/fmgr/Makefile
new file mode 100644
index 00000000000..b214470578d
--- /dev/null
+++ b/src/backend/utils/fmgr/Makefile
@@ -0,0 +1,45 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for utils/fmgr
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/utils/fmgr/Makefile,v 1.1 1996/10/27 09:53:40 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+ifeq ($(PORTNAME), linux)
+# LINUX_ELF tells us to use the ELF dynamic load facilities that come with
+# Linux.
+ifdef LINUX_ELF
+CFLAGS+=-DLINUX_ELF
+endif
+endif
+
+OBJS = dfmgr.o fmgr.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/utils/fmgr/Makefile.inc b/src/backend/utils/fmgr/Makefile.inc
deleted file mode 100644
index 19615544317..00000000000
--- a/src/backend/utils/fmgr/Makefile.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for utils/fmgr
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/utils/fmgr/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:22:07 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= dfmgr.c fmgr.c
-
diff --git a/src/backend/utils/hash/Makefile b/src/backend/utils/hash/Makefile
new file mode 100644
index 00000000000..79d0c194dd5
--- /dev/null
+++ b/src/backend/utils/hash/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for utils/hash
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/utils/hash/Makefile,v 1.1 1996/10/27 09:53:48 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = dynahash.o hashfn.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/utils/hash/Makefile.inc b/src/backend/utils/hash/Makefile.inc
deleted file mode 100644
index 3f9710488e5..00000000000
--- a/src/backend/utils/hash/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for utils/hash
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/utils/hash/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:22:08 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= dynahash.c hashfn.c
diff --git a/src/backend/utils/init/Makefile b/src/backend/utils/init/Makefile
new file mode 100644
index 00000000000..4ce8f93030c
--- /dev/null
+++ b/src/backend/utils/init/Makefile
@@ -0,0 +1,40 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for utils/init
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/utils/init/Makefile,v 1.1 1996/10/27 09:54:01 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS += $(INCLUDE_OPT)
+# The following defines really ought to go in config.h
+CFLAGS += -DPOSTGRESDIR='"$(POSTGRESDIR)"' -DPGDATADIR='"$(DATADIR)"' \
+ -DPOSTPORT='"$(POSTPORT)"'
+
+OBJS = enbl.o findbe.o globals.o magic.o miscinit.o postinit.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/utils/init/Makefile.inc b/src/backend/utils/init/Makefile.inc
deleted file mode 100644
index d773037f36d..00000000000
--- a/src/backend/utils/init/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for utils/init
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:22:08 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= enbl.c findbe.c globals.c magic.c miscinit.c postinit.c
diff --git a/src/backend/utils/mmgr/Makefile b/src/backend/utils/mmgr/Makefile
new file mode 100644
index 00000000000..d855f61e1d6
--- /dev/null
+++ b/src/backend/utils/mmgr/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for utils/mmgr
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Makefile,v 1.1 1996/10/27 09:54:06 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = aset.o mcxt.o palloc.o portalmem.o oset.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/utils/mmgr/Makefile.inc b/src/backend/utils/mmgr/Makefile.inc
deleted file mode 100644
index 6a4a67a81d1..00000000000
--- a/src/backend/utils/mmgr/Makefile.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for utils/mmgr
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:22:09 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= aset.c mcxt.c palloc.c portalmem.c oset.c
-
diff --git a/src/backend/utils/sort/Makefile b/src/backend/utils/sort/Makefile
new file mode 100644
index 00000000000..14096e3abd5
--- /dev/null
+++ b/src/backend/utils/sort/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for utils/sort
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/utils/sort/Makefile,v 1.1 1996/10/27 09:54:15 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = lselect.o psort.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/utils/sort/Makefile.inc b/src/backend/utils/sort/Makefile.inc
deleted file mode 100644
index 4775407acac..00000000000
--- a/src/backend/utils/sort/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for utils/sort
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:22:10 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= lselect.c psort.c
diff --git a/src/backend/utils/time/Makefile b/src/backend/utils/time/Makefile
new file mode 100644
index 00000000000..38c7c2f56cd
--- /dev/null
+++ b/src/backend/utils/time/Makefile
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for utils/time
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/backend/utils/time/Makefile,v 1.1 1996/10/27 09:54:25 bryanh Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR = ../../..
+include ../../../Makefile.global
+
+INCLUDE_OPT = -I../.. \
+ -I../../port/$(PORTNAME) \
+ -I../../include \
+ -I../../../include
+
+CFLAGS+=$(INCLUDE_OPT)
+
+OBJS = tqual.o
+
+all: SUBSYS.o
+
+SUBSYS.o: $(OBJS)
+ $(LD) -r -o SUBSYS.o $(OBJS)
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f SUBSYS.o $(OBJS)
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
diff --git a/src/backend/utils/time/Makefile.inc b/src/backend/utils/time/Makefile.inc
deleted file mode 100644
index 5e5d842e348..00000000000
--- a/src/backend/utils/time/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile.inc--
-# Makefile for utils/time
-#
-# Copyright (c) 1994, Regents of the University of California
-#
-#
-# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/utils/time/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:22:10 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-
-SUBSRCS+= tqual.c
diff --git a/src/mk/port/postgres.mk.BSD44_derived b/src/mk/port/postgres.mk.BSD44_derived
deleted file mode 100644
index 4a231bda312..00000000000
--- a/src/mk/port/postgres.mk.BSD44_derived
+++ /dev/null
@@ -1,48 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# postgres.mk.BSD44_derived--
-# specific rules for OSs derived from 4.4-lite BSD
-# e.g. NetBSD, FreeBSD and BSD/OS
-#
-# Copyright (c) 1994-5, Regents of the University of California
-#
-# $Id: postgres.mk.BSD44_derived,v 1.3 1996/10/11 03:56:41 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-ifndef MK_PORT
-MK_PORT= BSD44_derived
-
-# cc is gcc, but never mind about that...
-CC= gcc
-
-INSTALL= /usr/bin/install
-RANLIB= /usr/bin/ranlib
-
-AROPT = cq
-
-# FreeBSD 2.1R with new Flex v2.5.2 in /usr/local
-LEX = flex
-LDADD+= -L/usr/local/lib -lfl
-
-#
-# for postgres.user.mk
-#
-CFLAGS_SL = -fpic -DPIC
-
-ifeq ($(HOSTTYPE), mips)
-#SLSUFF= .so
-else
-SLSUFF= .so
-endif
-
-%.so: %.o
- $(LD) -x -r -o $(objdir)/$(<F).obj $(objdir)/$(<F)
- @echo building shared object $(objdir)/$(@F)
- @rm -f $(objdir)/$(@F).pic
- @${AR} cq $(objdir)/$(@F).pic `lorder $(objdir)/$(<F).obj | tsort`
- ${RANLIB} $(objdir)/$(@F).pic
- @rm -f $(objdir)/$(@F)
- $(LD) -x -Bshareable -Bforcearchive \
- -o $(objdir)/$(@F) $(objdir)/$(@F).pic
-
-endif
diff --git a/src/mk/port/postgres.mk.aix b/src/mk/port/postgres.mk.aix
deleted file mode 100644
index 592443e08e7..00000000000
--- a/src/mk/port/postgres.mk.aix
+++ /dev/null
@@ -1,57 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# postgres.mk.aix--
-# IBM POWER/aix specific rules and variables
-#
-# Copyright (c) 1994-5, Regents of the University of California
-#
-# $Id: postgres.mk.aix,v 1.2 1996/07/23 03:24:47 scrappy Exp $
-#
-#
-#-------------------------------------------------------------------------
-ifndef MK_PORT
-MK_PORT= aix
-
-# might want to try installbsd instead
-INSTALL= /usr/ucb/install
-
-#
-# for postgres.mk
-#
-
-# the -lm is because "pow" is defined in libbsd.a and we want pow(3m)
-LDADD_BE= -lm -lbsd
-
-# MAKE_EXPORTS is required for svr4 loaders that want a file of
-# symbol names to tell them what to export/import.
-MAKE_EXPORTS= true
-
-#
-# Random things that must be passed everywhere to enable
-# everything to compile. :-/
-#
-# The -qmaxmem is because of optimizer limits.
-# The HAVE_ANSI_CPP flag indicates that cc isn't ANSI but also doesn't
-# have a Reiser (pcc-style) cpp.
-#
-CFLAGS_BE+= -qchars=signed -qmaxmem=4000 -DHAVE_ANSI_CPP
-
-
-#
-# for postgres.user.mk
-#
-EXPSUFF= .exp
-SLSUFF= .so
-
-MKLDEXPORT=$(srcdir)/backend/port/aix/mkldexport.sh
-
-%$(EXPSUFF): %.o
- $(MKLDEXPORT) $(objdir)/$(<F) `pwd` > $(objdir)/$(@F)
-
-%.so: %.o %$(EXPSUFF)
- @echo The link stage here:
- $(LD) -H512 -T512 -o $(objdir)/$(@F) -e _nostart \
- -bI:$(LIBDIR)/postgres$(EXPSUFF) -bE:$*$(EXPSUFF) \
- $*.o -lm -lc 2>/dev/null
-
-endif
diff --git a/src/mk/port/postgres.mk.alpha b/src/mk/port/postgres.mk.alpha
deleted file mode 100644
index c3d9071e3d3..00000000000
--- a/src/mk/port/postgres.mk.alpha
+++ /dev/null
@@ -1,52 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# postgres.mk.alpha--
-# DEC Alpha AXP/OSF specific rules and variables
-#
-# Copyright (c) 1994-5, Regents of the University of California
-#
-# $Id: postgres.mk.alpha,v 1.1.1.1 1996/07/09 06:22:20 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-ifndef MK_PORT
-MK_PORT= alpha
-
-
-#
-# for postgres.mk
-#
-CFLAGS_BE+= -DUSE_POSIX_SIGNALS
-
-# NOFIXADE disallows unaligned access.
-# on Ultrix and OSF/1 it invokes an explicit syscall.
-# on HP-UX it turns off certain compiler options.
-# This is defined here because a bunch of clients include tmp/c.h,
-# which is where the work is done on HP-UX. It only affects the
-# backend on Ultrix and OSF/1.
-ifdef ENFORCE_ALIGNMENT
-CFLAGS_BE+= -DNOFIXADE
-else
-CFLAGS_BE+= -DNOPRINTADE
-endif
-
-# use the regex library
-USE_REGEX = 1
-
-#
-# for postgres.user.mk
-#
-SLSUFF= .so
-
-# cd into objdir so that so_locations is also in obj
-%.so: %.o
- cd $(objdir); $(LD) -shared -expect_unresolved '*' -o $(@F) $(<F)
-
-CLEANFILES+= so_locations
-
-#
-# for postgres.shell.mk
-#
-DASH_N=
-BACKSLASH_C='\\\\c'
-
-endif
diff --git a/src/mk/port/postgres.mk.bsdi b/src/mk/port/postgres.mk.bsdi
deleted file mode 100644
index a2aa1df6ae7..00000000000
--- a/src/mk/port/postgres.mk.bsdi
+++ /dev/null
@@ -1,40 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# postgres.mk.bsdi--
-# Intel x86/BSDi v2.0 specific rules and variables
-#
-# for questions about the BSD/OS port, contact Kurt Lidl (lidl@pix.com)
-#
-# Copyright (c) 1994-5, Regents of the University of California
-#
-# NOTE
-# you may remove lines that start with ## which are general comments
-#-------------------------------------------------------------------------
-ifndef MK_PORT
-MK_PORT= bsdi
-
-# cc is gcc v1.42
-# gcc is gcc v2.6.3
-CC= gcc
-
-RANLIB= ranlib
-INSTALL= install
-LEX= flex
-AROPT= cq
-
-# use the regex library
-USE_REGEX = 1
-
-LDADD_BE= -ldld -lcompat
-
-#
-# for postgres.user.mk
-#
-SLSUFF= .o
-
-#
-# for postgres.mk
-#
-CFLAGS_OPT= -g -DUSE_POSIX_SIGNALS # -O2
-
-endif
diff --git a/src/mk/port/postgres.mk.bsdi_2_1 b/src/mk/port/postgres.mk.bsdi_2_1
deleted file mode 100644
index b35e75b3092..00000000000
--- a/src/mk/port/postgres.mk.bsdi_2_1
+++ /dev/null
@@ -1,40 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# postgres.mk.bsdi--
-# Intel x86/BSDi v2.1 specific rules and variables
-#
-# for questions about the BSD/OS port, contact:
-# Bruce Momjian (maillist@candle.pha.pa.us)
-# Kurt Lidl (lidl@pix.com)
-#
-# Copyright (c) 1994-5, Regents of the University of California
-#
-# NOTE
-# you may remove lines that start with ## which are general comments
-#-------------------------------------------------------------------------
-ifndef MK_PORT
-MK_PORT= bsdi_2_1
-
-# cc is gcc v1.42
-# gcc is gcc v2.7.2
-CC= gcc
-
-RANLIB= ranlib
-INSTALL= install
-LEX= lex
-AROPT= cq
-
-LD_ADD+= -ltermcap
-
-#
-# for postgres.user.mk
-#
-SLSUFF= .o
-
-#
-# for postgres.mk
-#
-CFLAGS_OPT= -O2 -m486
-CFLAGS_BE = -DUSE_POSIX_SIGNALS
-
-endif
diff --git a/src/mk/port/postgres.mk.dgux b/src/mk/port/postgres.mk.dgux
deleted file mode 100644
index 9569e7d92e8..00000000000
--- a/src/mk/port/postgres.mk.dgux
+++ /dev/null
@@ -1,39 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# postgres.mk.linux--
-# Intel x86/Linux specific rules and variables
-#
-# Copyright (c) 1994-5, Regents of the University of California
-#
-# $Id: postgres.mk.dgux,v 1.1 1996/07/25 20:45:05 scrappy Exp $
-#
-# NOTE
-# you may remove lines that start with ## which are general comments
-#-------------------------------------------------------------------------
-ifndef MK_PORT
-MK_PORT= linux
-
-RANLIB= ranlib
-SLSUFF= .so
-#LDFLAGS+= -rdynamic
-
-
-CFLAGS_SL= -fpic
-%.so: %.o
- cd $(objdir); $(CC) -shared -o $(@F) $(<F)
-
-#
-# for postgres.mk
-#
-CC= gcc
-CFLAGS_OPT= -O2 -pipe
-
-CFLAGS_BE= -D__USE_POSIX_SIGNALS -DUSE_POSIX_SIGNALS -O2
-LDADD_BE= -ldl -lfl
-
-LEX = flex
-YACC = bison -y
-
-INSTALL=/usr/bin/X11/bsdinst
-
-endif
diff --git a/src/mk/port/postgres.mk.hpux b/src/mk/port/postgres.mk.hpux
deleted file mode 100644
index c97d5212eef..00000000000
--- a/src/mk/port/postgres.mk.hpux
+++ /dev/null
@@ -1,64 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# postgres.mk.hpux--
-# HP PA-RISC/HP-UX specific rules and variables
-#
-# Copyright (c) 1994-5, Regents of the University of California
-#
-# $Id: postgres.mk.hpux,v 1.1.1.1 1996/07/09 06:22:20 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-ifndef MK_PORT
-MK_PORT= hpux
-
-#
-# for postgres.mk
-#
-LDADD_BE= -lBSD
-
-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
-
-# (extended) ANSI flag for cc (-Ae is same as -Aa -D_HPUX_SOURCE)
-ifeq ($(CC), cc)
-CFLAGS_BE+= -Ae
-endif
-
-# This is a script from the MIT X11 distribution.
-INSTALL= bsdinst
-
-# RANLIB is not used on HP-UX
-RANLIB=touch
-
-#
-# for postgres.user.mk
-#
-CFLAGS_SL= +z
-SLSUFF= .sl
-
-%.sl: %.o
- $(LD) -b -o $(objdir)/$(@F) $(objdir)/$(<F)
-
-#
-# for postgres.shell.mk
-#
-DASH_N= ''
-BACKSLASH_C='\\\\c'
-
-endif \ No newline at end of file
diff --git a/src/mk/port/postgres.mk.i386_solaris b/src/mk/port/postgres.mk.i386_solaris
deleted file mode 100644
index f5c3dce7d7b..00000000000
--- a/src/mk/port/postgres.mk.i386_solaris
+++ /dev/null
@@ -1,57 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# postgres.mk.sparc_solaris--
-# SUN SPARC/solaris specific rules and variables
-#
-# Copyright (c) 1994-5, Regents of the University of California
-#
-# $Id: postgres.mk.i386_solaris,v 1.1 1996/07/20 08:36:33 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-ifndef MK_PORT
-MK_PORT= i386_solaris
-
-# cc won't work!
-CC= gcc
-
-#
-# for postgres.mk
-#
-CFLAGS_BE+= -DUSE_POSIX_SIGNALS
-
-# RANLIB is not used on solaris
-RANLIB=touch
-
-INSTALL=/usr/ucb/install
-
-#
-# Random things that must be passed everywhere to enable
-# everything to compile. :-/
-#
-# The extra -I flag is to scoop up extra BSD-emulating headers.
-CFLAGS_BE+= -DSYSV_DIRENT -I$(POSTGRESDIR)/src/backend/port/sparc_solaris
-LDADD_BE+= -lsocket -lnsl
-
-LD_ADD+= $(LDADD_BE)
-
-#
-# for postgres.user.mk
-#
-ifeq ($(CC), cc)
-CFLAGS_SL= -K PIC
-else
-CFLAGS_SL= -fPIC
-endif
-
-SLSUFF= .so
-
-%.so: %.o
- $(LD) -G -Bdynamic -o $(objdir)/$(@F) $(objdir)/$(<F)
-
-#
-# for postgres.shell.mk
-#
-DASH_N=''
-BACKSLASH_C='\\\\c'
-
-endif
diff --git a/src/mk/port/postgres.mk.irix5 b/src/mk/port/postgres.mk.irix5
deleted file mode 100644
index 85a77824497..00000000000
--- a/src/mk/port/postgres.mk.irix5
+++ /dev/null
@@ -1,53 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# postgres.mk.irix5--
-# IRIX5 specific rules and variables. This port is contributed by
-# Paul 'Shag' Walmsley <ccshag@everest.cclabs.missouri.edu>.
-#
-# Copyright (c) 1994-5, Regents of the University of California
-#
-# postgres.mk.sparc_solaris,v 1.5 1995/04/30 07:51:21 andrew Exp
-#
-#-------------------------------------------------------------------------
-ifndef MK_PORT
-MK_PORT= irix5
-
-CC= cc
-
-#
-# for postgres.mk
-#
-CFLAGS_BE+= -DUSE_POSIX_SIGNALS
-
-# RANLIB is not used on IRIX 5
-RANLIB=touch
-
-INSTALL=/sbin/bsdinst
-
-INSTLOPTS= -m 444
-INSTL_EXE_OPTS= -m 555
-INSTL_LIB_OPTS= -m 664
-
-#
-# Random things that must be passed everywhere to enable
-# everything to compile. :-/
-#
-CFLAGS_BE+= -DSYSV_DIRENT
-
-LD_ADD+= $(LDADD_BE)
-
-SLSUFF= .so
-
-%.so: %.o
- $(LD) -G -Bdynamic -o $(objdir)/$(@F) $(objdir)/$(<F)
-
-#
-# for postgres.shell.mk
-#
-DASH_N=''
-BACKSLASH_C='\\\\c'
-
-endif
-
-
-
diff --git a/src/mk/port/postgres.mk.linux b/src/mk/port/postgres.mk.linux
deleted file mode 100644
index 54170b53070..00000000000
--- a/src/mk/port/postgres.mk.linux
+++ /dev/null
@@ -1,54 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# postgres.mk.linux--
-# Intel x86/Linux specific rules and variables
-#
-# Copyright (c) 1994-5, Regents of the University of California
-#
-# $Id: postgres.mk.linux,v 1.1.1.1 1996/07/09 06:22:20 scrappy Exp $
-#
-# NOTE
-# you may remove lines that start with ## which are general comments
-#-------------------------------------------------------------------------
-ifndef MK_PORT
-MK_PORT= linux
-
-# Comment the following flag if you're not using Linux ELF
-LINUX_ELF = 1
-
-ifndef LINUX_ELF
-RANLIB= ranlib
-SLSUFF= .o
-else
-RANLIB= ranlib
-SLSUFF= .so
-LDFLAGS+= -rdynamic
-endif
-INSTALL= install
-MK_NO_LORDER= true
-
-# use the regex library
-USE_REGEX = 1
-
-#
-# for postgres.user.mk
-#
-#CFLAGS_SL= -fPIC
-CFLAGS_SL= -fpic
-%.so: %.o
- cd $(objdir); $(CC) -shared -o $(@F) $(<F)
-
-#
-# for postgres.mk
-#
-CFLAGS_OPT= -O2 -pipe -m486
-
-# The Linux gnulib #defines the problem away for you and calls
-# the BSD routines if you give it the right flags.
-CFLAGS_BE= -D__USE_BSD -D__USE_BSD_SIGNAL
-LDADD_BE= -lbsd
-
-LEX = flex
-#YACC = bison -y
-
-endif
diff --git a/src/mk/port/postgres.mk.sparc b/src/mk/port/postgres.mk.sparc
deleted file mode 100644
index 2b9cd788a04..00000000000
--- a/src/mk/port/postgres.mk.sparc
+++ /dev/null
@@ -1,38 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# postgres.mk.sparc--
-# SUN SPARC/SunOS 4.x specific rules and variables
-#
-# Copyright (c) 1994-5, Regents of the University of California
-#
-# $Id: postgres.mk.sparc,v 1.1.1.1 1996/07/09 06:22:20 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-ifndef MK_PORT
-MK_PORT= sparc
-
-# cc won't work!
-CC= gcc
-
-# the ar on SunOs is dumb, can't use the s option
-AROPT= cq
-
-INSTALL= /usr/bin/install
-RANLIB= /usr/bin/ranlib
-
-#
-# for postgres.user.mk
-#
-ifeq ($(CC), cc)
-CFLAGS_SL= -PIC
-else
-CFLAGS_SL= -fPIC
-endif
-
-SLSUFF= .so
-
-%.so: %.o
- $(LD) -dc -dp -Bdynamic -o $(objdir)/$(@F) $(objdir)/$(<F)
-
-
-endif
diff --git a/src/mk/port/postgres.mk.sparc_solaris b/src/mk/port/postgres.mk.sparc_solaris
deleted file mode 100644
index 4f86e1859f1..00000000000
--- a/src/mk/port/postgres.mk.sparc_solaris
+++ /dev/null
@@ -1,57 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# postgres.mk.sparc_solaris--
-# SUN SPARC/solaris specific rules and variables
-#
-# Copyright (c) 1994-5, Regents of the University of California
-#
-# $Id: postgres.mk.sparc_solaris,v 1.2 1996/07/23 03:24:47 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-ifndef MK_PORT
-MK_PORT= sparc_solaris
-
-# cc won't work!
-CC= gcc
-
-#
-# for postgres.mk
-#
-CFLAGS_BE+= -DUSE_POSIX_SIGNALS
-
-# RANLIB is not used on solaris
-RANLIB=touch
-
-INSTALL=/usr/ucb/install
-
-#
-# Random things that must be passed everywhere to enable
-# everything to compile. :-/
-#
-# The extra -I flag is to scoop up extra BSD-emulating headers.
-CFLAGS_BE+= -DSYSV_DIRENT -I$(srcdir)/backend/port/sparc_solaris
-LDADD_BE+= -lsocket -lnsl
-
-LD_ADD+= $(LDADD_BE)
-
-#
-# for postgres.user.mk
-#
-ifeq ($(CC), cc)
-CFLAGS_SL= -K PIC
-else
-CFLAGS_SL= -fPIC
-endif
-
-SLSUFF= .so
-
-%.so: %.o
- $(LD) -G -Bdynamic -o $(objdir)/$(@F) $(objdir)/$(<F)
-
-#
-# for postgres.shell.mk
-#
-DASH_N=''
-BACKSLASH_C='\\\\c'
-
-endif
diff --git a/src/mk/port/postgres.mk.svr4 b/src/mk/port/postgres.mk.svr4
deleted file mode 100644
index f7c132a7d1d..00000000000
--- a/src/mk/port/postgres.mk.svr4
+++ /dev/null
@@ -1,75 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# postgres.mk.svr4--
-# Intel x86/Intel SVR4 specific rules and variables
-#
-# Copyright (c) 1994-5, Regents of the University of California
-#
-# $Id: postgres.mk.svr4,v 1.2 1996/08/19 13:52:54 scrappy Exp $
-#
-# NOTE
-# This file has not been tested. -ay 3/95
-#
-#-------------------------------------------------------------------------
-ifndef MK_PORT
-MK_PORT= svr4
-
-# cc won't work?
-#CC= gcc
-CC= cc -W0
-YACC= bison -y
-
-#
-# for postgres.mk
-#
-CFLAGS_BE+= -DUSE_POSIX_SIGNALS
-
-# MAKE_EXPORTS is required for svr4 loaders that want a file of
-# symbol names to tell them what to export/import.
-MAKE_EXPORTS= true
-
-# RANLIB is not used on svr4
-RANLIB=touch
-
-# GNU install
-INSTALL=/home/tools/bin/install
-
-#
-# Random things that must be passed everywhere to enable
-# everything to compile. :-/
-#
-# The extra -I flag is to scoop up extra BSD-emulating headers.
-CFLAGS_BE+= -DSYSV_DIRENT -I$(POSTGRESDIR)/src/backend/port/svr4
-LDADD_BE+= -lsocket -lnsl -lc /usr/ucblib/libucb.a
-
-LD_ADD+= $(LDADD_BE)
-
-#
-# for postgres.mk
-#
-CFLAGS_OPT= -O
-
-#
-# for postgres.user.mk
-#
-#CFLAGS_SL= -K pic
-ifeq ($(CC), cc)
-#CFLAGS_SL= -K PIC
-else
-#CFLAGS_SL= -fPIC
-endif
-
-SLSUFF= .so
-
-#%.so: %.o
-# $(LD) -G $(LDFLAGS) -o $(objdir)/$(@F) $(objdir)/$(<F)
-%.so: %.o
- $(LD) -G -Bdynamic -o $(objdir)/$(@F) $(objdir)/$(<F)
-
-#
-# for postgres.shell.mk
-#
-DASH_N=''
-BACKSLASH_C='\\\\c'
-
-endif
diff --git a/src/mk/port/postgres.mk.ultrix4 b/src/mk/port/postgres.mk.ultrix4
deleted file mode 100644
index fa63d02aa5e..00000000000
--- a/src/mk/port/postgres.mk.ultrix4
+++ /dev/null
@@ -1,34 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# postgres.mk.ultrix4--
-# DEC MIPS/Ultrix 4.x specific rules and variables
-#
-# Copyright (c) 1994-5, Regents of the University of California
-#
-# $Id: postgres.mk.ultrix4,v 1.1.1.1 1996/07/09 06:22:20 scrappy Exp $
-#
-#-------------------------------------------------------------------------
-ifndef MK_PORT
-MK_PORT= ultrix4
-
-#
-# for postgres.mk
-#
-ifdef ENFORCE_ALIGNMENT
-CFLAGS_BE= -DNOFIXADE
-endif
-
-# install creates intermediate directories
-NO_BEFOREINSTL= true
-
-INSTALL= /usr/bin/install
-RANLIB= /usr/bin/ranlib
-
-#
-# for postgres.user.mk
-#
-CFLAGS_SL= -G 0
-SLSUFF= .o
-
-
-endif