@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.16 1997/04/03 21:25:59 scrappy Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.17 1997/04/04 07:57:45 scrappy Exp $
#
# NOTES
# Essentially all Postgres make files include this file and use the
@ -243,60 +243,22 @@ ifneq ($(wildcard $(SRCDIR)/Makefile.custom), )
i n c l u d e $( SRCDIR ) / M a k e f i l e . c u s t o m
e n d i f
#############################################################################
# include port specific rules and variables.
#
#
# 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 easier to read the make
# files and to make certain updates. It should also help with the 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.
##############################################################################
#
# AR
i f n e q ( , $( findstring /$ ( PORTNAME ) /, /BSD 44_derived /bsdi /sparc /) )
AROPT = cq
e l s e
AROPT = crs
e n d i f
##############################################################################
#
# Shared libraries.
# This is overridden for many PORTNAMEs below.
DLSUFFIX = .so
#
# CC
#
#-------------------------------------------------------------
# See the subdirectory template for default settings for these
#-------------------------------------------------------------
CC = @CC@
#
# LEX
#
LEX = @LEX@
CFLAGS = @CPPFLAGS@
AROPT = @AROPT@
CFLAGS = @CPPFLAGS@ @ALL@
CFLAGS_SL = @SHARED_LIBS@
CFLAGS_BE = @BACKEND@
LDFLAGS = @LDFLAGS@
LDADD_BE = @LIBS@
LD_ADD = $( LDADD_BE)
DLSUFFIX = @DLSUFFIX@
#----------------------------------------------------------------------
i f e q ( $( PORTNAME ) , B S D 4 4 _ d e r i v e d )
# cc is gcc, but never mind about that...
# FreeBSD 2.1R with new Flex v2.5.2 in /usr/local
CFLAGS_SL = -fpic -DPIC
%.so : %.o
$( LD) -x -r -o $<.obj $<
@echo building shared object $@
@ -316,17 +278,6 @@ ifeq ($(PORTNAME), aix)
# 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
EXPSUFF = .exp
POSTGRES_EXP = $( SRCDIR) /backend/postgres$( EXPSUFF)
@ -349,57 +300,13 @@ endif
#---------------------------------------------------------------------------
i f e q ( $( PORTNAME ) , a l p h a )
# 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.
i f d e f E N F O R C E _ A L I G N M E N T
CFLAGS_BE = -DNOFIXADE
e l s e
CFLAGS_BE = -DNOPRINTADE
e n d i f
# use the regex library
USE_REGEX = 1
%.so : %.o
$( LD) -shared -expect_unresolved '*' -o $@ $<
DASH_N =
BACKSLASH_C = '\\\\c'
e n d i f
#---------------------------------------------------------------------------
i f e q ( $( PORTNAME ) , b s d i )
PRE_BSDI_2_1 = false
i f e q ( $( shell uname -r ) , 2 . 0 )
PRE_BSDI_2_1 = true
e n d i f
i f e q ( $( shell uname -r ) , 2 . 0 1 )
PRE_BSDI_2_1 = true
e n d i f
i f e q ( $( PRE_BSDI_ 2_ 1) , t r u e )
# cc is gcc v1.42
# gcc is gcc v2.6.3
# use the regex library
USE_REGEX = 1
CFLAGS_BE = -DPRE_BSDI_2_1
e n d i f
DLSUFFIX = .o
e n d i f
#--------------------------------------------------------------------------
i f e q ( $( PORTNAME ) , d g u x )
CFLAGS_SL = -fpic
%.so : %.o
$( CC) -shared -o $@ $<
@ -410,50 +317,29 @@ endif
#----------------------------------------------------------------------------
i f e q ( $( PORTNAME ) , h p u x )
# -W l,-E export symbols for linking with the shared libraries
# dynamic loader
i f e q ( $( CC ) , c c )
CFLAGS_BE = -W l,-E
LDFLAGS_BE = -W l,-E
e n d i f
i f e q ( $( CC ) , g c c )
LDADD_BE += /usr/lib/libdld.sl
e n d i f
i f d e f E N F O R C E _ A L I G N M E N T
CFLAGS_BE = -DNOFIXADE
e l s 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
else
ifeq ( $( HPUX_MAJOR) , 09)
ifeq ( $( CC) , cc)
CFLAGS_BE += +u4
LDFLAGS_BE += +u4
endif
endif
endif
e n d i f
# (extended) ANSI flag for cc (-Ae is same as -Aa -D_HPUX_SOURCE)
i f e q ( $( CC ) , c c )
CFLAGS_BE += -Ae
e n d i f
CFLAGS_SL = +z
DLSUFFIX = .sl
#ifdef ENFORCE_ALIGNMENT
# CFLAGS_BE= -DNOFIXADE
#else
# HPUX_VERS:= $(shell uname -r)
# HPUX_MAJOR= ${HPUX_VERS:R:E}
# HPUX_MINOR= ${HPUX_VERS:E}
# ifeq ($(HPUX_MAJOR), 08)
# CFLAGS_BE+= +u -DHP_S500_ALIGN
# LDFLAGS_BE+= +u
# else
# ifeq ($(HPUX_MAJOR), 09)
# ifeq ($(CC), cc)
# CFLAGS_BE+= +u4
# LDFLAGS_BE+= +u4
# endif
# endif
# endif
#endif
%.sl : %.o
$( LD) -b -o $@ $<
DASH_N = ''
BACKSLASH_C = '\\\\c'
e n d i f
#--------------------------------------------------------------------------
@ -461,27 +347,9 @@ endif
i f e q ( $( PORTNAME ) , i 3 8 6 _ s o l a r i s )
# cc won't work!
#
# Random things that must be passed everywhere to enable
# everything to compile. :-/
#
# The extra -I flag is to scoop up extra BSD-emulating headers.
# 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
i f e q ( $( CC ) , c c )
CFLAGS_SL = -K PIC
e l s e
CFLAGS_SL = -fPIC
e n d i f
%.so : %.o
$( LD) -G -Bdynamic -o $@ $<
DASH_N = ''
BACKSLASH_C = '\\\\c'
e n d i f
#----------------------------------------------------------------------------
@ -494,26 +362,16 @@ RANLIB= touch
%.so : %.o
$( LD) -G -Bdynamic -o $@ $< $( LD_ADD)
DASH_N = ''
BACKSLASH_C = '\\\\c'
e n d i f
#---------------------------------------------------------------------------
i f e q ( $( PORTNAME ) , l i n u x )
i f n d e f L I N U X _ E L F
DLSUFFIX = .o
e l s e
DLSUFFIX = .so
i f d e f L I N U X _ E L F
LDFLAGS_BE = -rdynamic
e n d i f
MK_NO_LORDER = true
# use the regex library
USE_REGEX = 1
CFLAGS_SL = -fpic
%.so : %.o
$( CC) -shared -o $@ $<
@ -522,13 +380,6 @@ endif
#---------------------------------------------------------------------------
i f e q ( $( PORTNAME ) , s u n o s 4 )
i f e q ( $( CC ) , c c )
CFLAGS_SL = -PIC
e l s e
CFLAGS_SL = -fPIC
e n d i f
%.so : %.o
$( LD) -dc -dp -Bdynamic -o $@ $<
e n d i f
@ -536,66 +387,34 @@ endif
#----------------------------------------------------------------------------
i f e q ( $( PORTNAME ) , s p a r c _ s o l a r i s )
#
# 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 = -I$( SRCDIR) /backend/port/sparc_solaris
i f e q ( $( CC ) , c c )
CFLAGS_SL = -K PIC
e l s e
CFLAGS_SL = -fPIC
e n d i f
%.so : %.o
$( LD) -G -Bdynamic -o $@ $<
DASH_N = ''
BACKSLASH_C = '\\\\c'
e n d i f
#-----------------------------------------------------------------------------
i f e q ( $( PORTNAME ) , s v r 4 )
CFLAGS += -W0
YACC = bison -y
# 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 extra -I flag is to scoop up extra BSD-emulating headers.
CFLAGS_BE += -I$( SRCDIR) /backend/port/svr4
LDADD_BE += /usr/ucblib/libucb.a
LDFLAGS_BE = -LD-Blargedynsym
%.so : %.o
$( LD) -G -Bdynamic -o $@ $<
DASH_N = ''
BACKSLASH_C = '\\\\c'
e n d i f
#---------------------------------------------------------------------------
i f e q ( $( PORTNAME ) , u l t r i x 4 )
i f d e f E N F O R C E _ A L I G N M E N T
CFLAGS_BE = -DNOFIXADE
e n d i f
# install creates intermediate directories
NO_BEFOREINSTL = true
CFLAGS_SL = -G 0
DLSUFFIX = .o
e n d i f
@ -605,10 +424,6 @@ endif
# The univel port is almost guaranteed NOT to work yet.
#
i f e q ( $( PORTNAME ) , u n i v e l )
#CFLAGS+= -DHAVE_RUSAGE -DTRACEDEBUG -DASYNC_DEBUG
CFLAGS += -DHAVE_RUSAGE -m486 -Dsvr4
CFLAGS_SL = -fPIC
YACC = bison -y
#
@ -621,29 +436,13 @@ LDADD= $(LD_ADD)
# 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 extra -I flag is to scoop up extra BSD-emulating headers.
CFLAGS_BE += -I$( SRCDIR) /backend/port/univel
%.so : %.o
$( LD) -G -Bdynamic -o $@ $<
DASH_N = ''
BACKSLASH_C = '\\\\c'
INSTALL = /usr/ucb/install
e n d i f
#---------------------------------------------------------------------------
i f e q ( $( PORTNAME ) , n e x t s t e p )
AROPT = rc
DLSUFFIX = .o
e n d i f
# This goes here so that customization in Makefile.custom is effective
##############################################################################