#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.70 1996/11/17 20:30:32 momjian Exp $
+# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.71 1996/11/18 02:23:16 bryanh Exp $
#
# NOTES
# Essentially all Postgres make files include this file and use the
endif
#############################################################################
-# include port specific rules and variables. For instance:
+# include port specific rules and variables.
#
-# signal(2) handling - this is here because it affects some of
-# the frontend commands as well as the backend server.
-#
-# Ultrix and SunOS provide BSD signal(2) semantics by default.
-#
-# SVID2 and POSIX signal(2) semantics differ from BSD signal(2)
-# semantics. We can use the POSIX sigaction(2) on systems that
-# allow us to request restartable signals (SA_RESTART).
-#
-# Some systems don't allow restartable signals at all unless we
-# link to a special BSD library.
-#
-# We devoutly hope that there aren't any systems that provide
-# neither POSIX signals nor BSD signals. The alternative
-# is to do signal-handler reinstallation, which doesn't work well
-# at all.
#
# HISTORY: Before October 1996, this file included the following line:
# -include $(MKDIR)/port/postgres.mk.$(PORTNAME)
#----------------------------------------------------------------------
ifeq ($(PORTNAME), BSD44_derived)
-MK_PORT= BSD44_derived
-
# cc is gcc, but never mind about that...
CC= gcc
# FreeBSD 2.1R with new Flex v2.5.2 in /usr/local
LEX= flex
-LDADD+= -L/usr/local/lib -lfl
+LDADD_BE= -L/usr/local/lib -lfl
CFLAGS_SL= -fpic -DPIC
#--------------------------------------------------------------------------
ifeq ($(PORTNAME), aix)
-MK_PORT= aix
-
# might want to try installbsd instead
INSTALL= /usr/ucb/install
# the -lm is because "pow" is defined in libbsd.a and we want pow(3m)
-LDADD_BE= -lm -lbsd
+LDADD_BE= -lm -lbsd -ll -lld
# MAKE_EXPORTS is required for svr4 loaders that want a file of
# symbol names to tell them what to export/import.
# 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
+CFLAGS_BE= -qchars=signed -qmaxmem=4000
EXPSUFF= .exp
#---------------------------------------------------------------------------
ifeq ($(PORTNAME), alpha)
-MK_PORT= alpha
-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.
# 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
+CFLAGS_BE= -DNOFIXADE
else
-CFLAGS_BE+= -DNOPRINTADE
+CFLAGS_BE= -DNOPRINTADE
endif
+LDADD_BE= -lln
# use the regex library
USE_REGEX= 1
%.so: %.o
$(LD) -shared -expect_unresolved '*' -o $@ $<
-CLEANFILES+= so_locations
-
DASH_N=
BACKSLASH_C= '\\\\c'
#---------------------------------------------------------------------------
ifeq ($(PORTNAME), bsdi)
-MK_PORT= bsdi
-
CC= gcc
PRE_BSDI_2_1= false
# cc is gcc v1.42
# gcc is gcc v2.7.2
LEX= lex
- LD_ADD+= -ltermcap
+ LDADD_BE= -ltermcap -ldl -lipc
else
# cc is gcc v1.42
# gcc is gcc v2.6.3
# use the regex library
USE_REGEX= 1
CFLAGS_BE= -DPRE_BSDI_2_1
- LDADD_BE= -ldld -lcompat
+ LDADD_BE= -ldld -lcompat -lipc
endif
endif
#--------------------------------------------------------------------------
ifeq ($(PORTNAME), dgux)
-MK_PORT= linux
-
CFLAGS_SL= -fpic
%.so: %.o
$(CC) -shared -o $@ $<
CC= gcc
-CFLAGS_BE= -D__USE_POSIX_SIGNALS -DUSE_POSIX_SIGNALS
LDADD_BE= -ldl -lfl
LEX= flex
#----------------------------------------------------------------------------
ifeq ($(PORTNAME), hpux)
-MK_PORT= hpux
+# -W l,-E export symbols for linking with the shared libraries
+# dynamic loader
-LDADD_BE= -lBSD
+LDADD_BE= -lBSD -ll
+ifeq $(CC), cc)
+ CFLAGS_BE= -W l,-E
+ LDFLAGS_BE= -W l,-E
+ LDADD_BE+= -ldld
+endif
+ifeq ($(CC), gcc)
+ LDADD_BE+= /usr/lib/libdld.sl
+endif
ifdef ENFORCE_ALIGNMENT
-CFLAGS_BE= -DNOFIXADE
+ CFLAGS_BE= -DNOFIXADE
else
-HPUX_VERS:= $(shell uname -r)
-HPUX_MAJOR= ${HPUX_VERS:R:E}
-HPUX_MINOR= ${HPUX_VERS:E}
+ 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
#--------------------------------------------------------------------------
ifeq ($(PORTNAME), i386_solaris)
-MK_PORT= i386_solaris
-
# cc won't work!
CC= gcc
-CFLAGS_BE+= -DUSE_POSIX_SIGNALS
-
# RANLIB is not used on solaris
RANLIB= touch
# 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)
+# This needs to be fixed. Things other than the backend should not be
+# accessing headers in the backend directory.
+CFLAGS_BE= -I$(SRCDIR)/backend/port/sparc_solaris
+LDADD_BE= -lsocket -lnsl -ll -ldl
ifeq ($(CC), cc)
CFLAGS_SL= -K PIC
#----------------------------------------------------------------------------
ifeq ($(PORTNAME), irix5)
-MK_PORT= irix5
-
-CFLAGS_BE+= -DUSE_POSIX_SIGNALS
+LDADD_BE= -ll
# RANLIB is not used on IRIX 5
RANLIB= touch
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)
-
%.so: %.o
$(LD) -G -Bdynamic -o $@ $<
#---------------------------------------------------------------------------
ifeq ($(PORTNAME), linux)
-MK_PORT= linux
-
ifndef LINUX_ELF
SLSUFF= .o
+LDADD_BE= -ldld
else
SLSUFF= .so
-LDFLAGS+= -rdynamic
+LDADD_BE= -ldl
+LDFLAGS_BE= -rdynamic
endif
MK_NO_LORDER= true
# 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
+LDADD_BE+= -lbsd
LEX= flex
#---------------------------------------------------------------------------
ifeq ($(PORTNAME), sparc)
-MK_PORT= sparc
-
# cc won't work!
CC= gcc
else
CFLAGS_SL= -fPIC
endif
+LDADD_BE= -lln -ldl
%.so: %.o
$(LD) -dc -dp -Bdynamic -o $@ $<
#----------------------------------------------------------------------------
ifeq ($(PORTNAME), sparc_solaris)
-MK_PORT= sparc_solaris
-
# cc won't work!
CC= gcc
-CFLAGS_BE+= -DUSE_POSIX_SIGNALS
+LDADD_BE= -ll -ldl
# RANLIB is not used on solaris
RANLIB= touch
# 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
+CFLAGS_BE= -I$(SRCDIR)/backend/port/sparc_solaris
LDADD_BE+= -lsocket -lnsl
-LD_ADD+= $(LDADD_BE)
-
ifeq ($(CC), cc)
CFLAGS_SL= -K PIC
else
#-----------------------------------------------------------------------------
ifeq ($(PORTNAME), svr4)
-MK_PORT= svr4
-
CFLAGS+= -W0
YACC= bison -y
-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
# everything to compile. :-/
#
# The extra -I flag is to scoop up extra BSD-emulating headers.
-CFLAGS_BE+= -DSYSV_DIRENT -I$(SRCDIR)/backend/port/svr4
-LDADD_BE+= -lsocket -lnsl -lc /usr/ucblib/libucb.a
-
-LD_ADD+= $(LDADD_BE)
-
-ifeq ($(CC), cc)
-#CFLAGS_SL= -K PIC
-else
-#CFLAGS_SL= -fPIC
-endif
+CFLAGS_BE+= -I$(SRCDIR)/backend/port/svr4
+LDADD_BE= -lsocket -lnsl -lc /usr/ucblib/libucb.a -ll -ldl
+LDFLAGS_BE= -LD-Blargedynsym
%.so: %.o
$(LD) -G -Bdynamic -o $@ $<
#---------------------------------------------------------------------------
ifeq ($(PORTNAME), ultrix4)
-MK_PORT= ultrix4
-
ifdef ENFORCE_ALIGNMENT
CFLAGS_BE= -DNOFIXADE
endif
+LDADD_BE= -ldl -lln
# install creates intermediate directories
NO_BEFOREINSTL= true
endif
+ifneq ($(PORTNAME), next)
+LDADD_BE+= -lm
+endif
# This goes here so that customization in Makefile.custom is effective
##############################################################################
ifdef COPT
CFLAGS+= $(COPT)
- LDFLAGS+= $(COPT)
else
ifndef CFLAGS_OPT
CFLAGS_OPT= -O
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.15 1996/11/12 06:46:04 bryanh Exp $
+# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.16 1996/11/18 02:23:41 bryanh Exp $
#
#-------------------------------------------------------------------------
SRCDIR = ..
include ../Makefile.global
-
-##########################################################################
-# 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
-#
-ifneq ($(PORTNAME), next)
-LDADD+= -lm
-endif
-
-ifeq ($(PORTNAME), aix)
-LDADD+= -ll -lld
-endif
-
-ifeq ($(PORTNAME), alpha)
-LDADD+= -lln
-endif
-
-ifeq ($(PORTNAME), bsdi)
- ifeq ($(PRE_BSDI_2_1), false)
- LDADD+= -ldl -lipc
- else
- LDADD+= -ldld -lipc
- endif
-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
-#
-# -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
-
-ifeq ($(PORTNAME), i386_solaris)
-LDADD+= -ll -ldl
-endif
-
-ifeq ($(PORTNAME), irix5)
-LDADD+= -ll
-endif
-
-ifeq ($(PORTNAME), linux)
-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
-
-ifeq ($(PORTNAME), svr4)
-LDADD+= -ll -ldl
-# the following is special for Reliant UNIX SVR4 (formerly SINIX)
-LDFLAGS+= -LD-Blargedynsym
-endif
-
-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 \