Commit c7b40e60 authored by Marc G. Fournier's avatar Marc G. Fournier

This commit represents a clean compile with the new templates under

FreeBSD

The Makefile(s) have all been cleaned up such that there is a single
LDFLAGS vs LD_ADD or LDADD or LDFLAGS or LDFLAGS_BE.  The Makefile(s)
should be alot more straightforward then they were before...and
consistent
parent e292a9d6
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.17 1997/04/04 07:57:45 scrappy Exp $ # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.18 1997/04/04 10:38:23 scrappy Exp $
# #
# NOTES # NOTES
# Essentially all Postgres make files include this file and use the # Essentially all Postgres make files include this file and use the
...@@ -249,12 +249,9 @@ endif ...@@ -249,12 +249,9 @@ endif
CC= @CC@ CC= @CC@
LEX= @LEX@ LEX= @LEX@
AROPT= @AROPT@ AROPT= @AROPT@
CFLAGS= @CPPFLAGS@ @ALL@ CFLAGS= @CPPFLAGS@ @CFLAGS@
CFLAGS_SL= @SHARED_LIBS@ CFLAGS_SL= @SHARED_LIB@
CFLAGS_BE= @BACKEND@ LDFLAGS= @LDFLAGS@ @LIBS@
LDFLAGS= @LDFLAGS@
LDADD_BE= @LIBS@
LD_ADD= $(LDADD_BE)
DLSUFFIX= @DLSUFFIX@ DLSUFFIX= @DLSUFFIX@
#---------------------------------------------------------------------- #----------------------------------------------------------------------
...@@ -360,7 +357,7 @@ ifeq ($(PORTNAME), irix5) ...@@ -360,7 +357,7 @@ ifeq ($(PORTNAME), irix5)
RANLIB= touch RANLIB= touch
%.so: %.o %.so: %.o
$(LD) -G -Bdynamic -o $@ $< $(LD_ADD) $(LD) -G -Bdynamic -o $@ $< $(LDFLAGS)
endif endif
...@@ -368,7 +365,7 @@ endif ...@@ -368,7 +365,7 @@ endif
ifeq ($(PORTNAME), linux) ifeq ($(PORTNAME), linux)
ifdef LINUX_ELF ifdef LINUX_ELF
LDFLAGS_BE= -rdynamic LDFLAGS+= -rdynamic
endif endif
MK_NO_LORDER= true MK_NO_LORDER= true
...@@ -402,8 +399,7 @@ YACC= bison -y ...@@ -402,8 +399,7 @@ YACC= bison -y
# symbol names to tell them what to export/import. # symbol names to tell them what to export/import.
MAKE_EXPORTS= true MAKE_EXPORTS= true
LDADD_BE+= /usr/ucblib/libucb.a LDFLAGS+= /usr/ucblib/libucb.a -LD-Blargedynsym
LDFLAGS_BE= -LD-Blargedynsym
%.so: %.o %.so: %.o
$(LD) -G -Bdynamic -o $@ $< $(LD) -G -Bdynamic -o $@ $<
...@@ -426,12 +422,6 @@ endif ...@@ -426,12 +422,6 @@ endif
ifeq ($(PORTNAME), univel) ifeq ($(PORTNAME), univel)
YACC= bison -y YACC= bison -y
#
# Some of the Makefiles use LDADD, others use LD_ADD.
# This makes them the same.
#
LDADD= $(LD_ADD)
# MAKE_EXPORTS is required for svr4 loaders that want a file of # MAKE_EXPORTS is required for svr4 loaders that want a file of
# symbol names to tell them what to export/import. # symbol names to tell them what to export/import.
#MAKE_EXPORTS= true #MAKE_EXPORTS= true
...@@ -483,32 +473,14 @@ endif ...@@ -483,32 +473,14 @@ endif
ifneq ($(CUSTOM_COPT),) ifneq ($(CUSTOM_COPT),)
COPT= $(CUSTOM_COPT) COPT= $(CUSTOM_COPT)
else
ifeq ($(CC), gcc)
COPT= -O2 -Werror
else
COPT= -O
endif
endif endif
ifeq ($(CC), gcc) ifeq ($(CC), gcc)
# Some flags only gcc recognizes...
# PostgreSQL should *always* compile with these enabled
CFLAGS+= -Wall -Wmissing-prototypes CFLAGS+= -Wall -Wmissing-prototypes
endif endif
# Globally pass debugging/optimization/profiling flags based
# on the options selected above.
ifdef COPT ifdef COPT
CFLAGS+= $(COPT) CFLAGS+= $(COPT)
else
ifndef CFLAGS_OPT
CFLAGS_OPT= -O
endif
CFLAGS+= $(CFLAGS_OPT)
endif endif
ifndef CASSERT ifndef CASSERT
...@@ -517,13 +489,7 @@ endif ...@@ -517,13 +489,7 @@ endif
ifdef PROFILE ifdef PROFILE
CFLAGS+= $(PROFILE) CFLAGS+= $(PROFILE)
LDFLAGS+= $(PROFILE)
endif endif
# Globally pass PORTNAME # Globally pass PORTNAME
CFLAGS+= -D$(PORTNAME) CFLAGS+= -D$(PORTNAME)
# include port-specific flags
CFLAGS+= $(CFLAGS_BE)
LDFLAGS+= $(LDFLAGS_BE)
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.22 1997/04/02 00:34:23 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.23 1997/04/04 10:38:49 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -60,7 +60,7 @@ endif ...@@ -60,7 +60,7 @@ endif
all: postgres $(EXP) global1.bki.source local1_template1.bki.source all: postgres $(EXP) global1.bki.source local1_template1.bki.source
postgres: $(OBJS) ../utils/version.o postgres: $(OBJS) ../utils/version.o
$(CC) -o postgres $(LDFLAGS) $(OBJS) ../utils/version.o $(LD_ADD) $(CC) -o postgres $(OBJS) ../utils/version.o $(LDFLAGS)
$(OBJS): $(DIRS:%=%.dir) $(OBJS): $(DIRS:%=%.dir)
...@@ -79,7 +79,7 @@ catalog/global1.bki.source catalog/local1_template1.bki.source: ...@@ -79,7 +79,7 @@ catalog/global1.bki.source catalog/local1_template1.bki.source:
# The postgres.o target is needed by the rule in Makefile.global that # The postgres.o target is needed by the rule in Makefile.global that
# creates the exports file when MAKE_EXPORTS = true. # creates the exports file when MAKE_EXPORTS = true.
postgres.o: $(OBJS) postgres.o: $(OBJS)
$(CC) $(LDFLAGS) -r -o postgres.o $(OBJS) $(LD_ADD) $(CC) -r -o postgres.o $(OBJS) $(LDFLAGS)
############################################################################ ############################################################################
...@@ -150,7 +150,7 @@ $(BINDIR) $(LIBDIR) $(HEADERDIR): ...@@ -150,7 +150,7 @@ $(BINDIR) $(LIBDIR) $(HEADERDIR):
# are up to date. It saves the time of doing all the submakes. # are up to date. It saves the time of doing all the submakes.
.PHONY: quick .PHONY: quick
quick: $(OBJS) quick: $(OBJS)
$(CC) $(LDFLAGS) -o postgres $(OBJS) $(LD_ADD) $(CC) -o postgres $(OBJS) $(LDFLAGS)
# #
# Build the file, "./ID", used by the "gid" (grep-for-identifier) tool # Build the file, "./ID", used by the "gid" (grep-for-identifier) tool
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for the bootstrap module # Makefile for the bootstrap module
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.5 1997/04/02 18:10:46 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.6 1997/04/04 10:38:58 scrappy Exp $
# #
# #
# We must build bootparse.c and bootscanner.c with yacc and lex and sed, # We must build bootparse.c and bootscanner.c with yacc and lex and sed,
...@@ -25,7 +25,7 @@ INCLUDE_OPT= -I.. \ ...@@ -25,7 +25,7 @@ INCLUDE_OPT= -I.. \
-I../port/$(PORTNAME) \ -I../port/$(PORTNAME) \
-I../../include -I../../include
CFLAGS+= $(INCLUDE_OPT) CFLAGS+= $(INCLUDE_OPT) -Wno-error
BOOTYACCS= bootstrap_tokens.h bootparse.c BOOTYACCS= bootstrap_tokens.h bootparse.c
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for libpq subsystem (backend half of libpq interface) # Makefile for libpq subsystem (backend half of libpq interface)
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.6 1997/03/18 20:14:32 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.7 1997/04/04 10:39:19 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -20,7 +20,7 @@ CFLAGS+=$(INCLUDE_OPT) ...@@ -20,7 +20,7 @@ CFLAGS+=$(INCLUDE_OPT)
# kerberos flags # kerberos flags
ifdef KRBVERS ifdef KRBVERS
CFLAGS+= $(KRBFLAGS) CFLAGS+= $(KRBFLAGS)
LDADD+= $(KRBLIBS) LDFLAGS+= $(KRBLIBS)
endif endif
OBJS = be-dumpdata.o be-fsstubs.o be-pqexec.o pqcomprim.o\ OBJS = be-dumpdata.o be-fsstubs.o be-pqexec.o pqcomprim.o\
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# #
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# $Id: Makefile,v 1.4 1997/04/02 18:11:49 scrappy Exp $ # $Id: Makefile,v 1.5 1997/04/04 10:39:50 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -16,7 +16,7 @@ INCLUDE_OPT = -I../.. \ ...@@ -16,7 +16,7 @@ INCLUDE_OPT = -I../.. \
-I../../port/$(PORTNAME) \ -I../../port/$(PORTNAME) \
-I../../../include -I../../../include
CFLAGS+=$(INCLUDE_OPT) CFLAGS+=$(INCLUDE_OPT) -Wno-error
OBJS = geqo_copy.o geqo_eval.o geqo_main.o geqo_misc.o \ OBJS = geqo_copy.o geqo_eval.o geqo_main.o geqo_misc.o \
geqo_params.o geqo_paths.o geqo_pool.o geqo_recombination.o \ geqo_params.o geqo_paths.o geqo_pool.o geqo_recombination.o \
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for parser # Makefile for parser
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.5 1997/04/02 18:12:14 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.6 1997/04/04 10:40:11 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -15,7 +15,7 @@ INCLUDE_OPT= -I.. \ ...@@ -15,7 +15,7 @@ INCLUDE_OPT= -I.. \
-I../port/$(PORTNAME) \ -I../port/$(PORTNAME) \
-I../../include -I../../include
CFLAGS+= $(INCLUDE_OPT) CFLAGS+= $(INCLUDE_OPT) -Wno-error
OBJS= analyze.o catalog_utils.o dbcommands.o gram.o \ OBJS= analyze.o catalog_utils.o dbcommands.o gram.o \
keywords.o parser.o parse_query.o scan.o scansup.o sysfunc.o keywords.o parser.o parse_query.o scan.o scansup.o sysfunc.o
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for tcop # Makefile for tcop
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.10 1997/04/02 18:13:01 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.11 1997/04/04 10:40:34 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -15,7 +15,7 @@ INCLUDE_OPT= -I.. \ ...@@ -15,7 +15,7 @@ INCLUDE_OPT= -I.. \
-I../port/$(PORTNAME) \ -I../port/$(PORTNAME) \
-I../../include -I../../include
CFLAGS+= $(INCLUDE_OPT) CFLAGS+= $(INCLUDE_OPT) -Wno-error
OBJS= aclchk.o dest.o fastpath.o postgres.o pquery.o utility.o variable.o OBJS= aclchk.o dest.o fastpath.o postgres.o pquery.o utility.o variable.o
......
...@@ -7,20 +7,17 @@ ...@@ -7,20 +7,17 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/Attic/Makefile.global,v 1.13 1997/01/15 05:58:47 scrappy Exp $ # $Header: /cvsroot/pgsql/src/bin/Attic/Makefile.global,v 1.14 1997/04/04 10:40:56 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
LIBPQDIR:= $(SRCDIR)/libpq LIBPQDIR:= $(SRCDIR)/libpq
#LD_ADD+= -L$(SRCDIR)/libpq -lpq
#DPADD+= -L$(SRCDIR)/libpq -lpq
# #
# And where libpq goes, so goes the authentication stuff... # And where libpq goes, so goes the authentication stuff...
# #
ifdef KRBVERS ifdef KRBVERS
LD_ADD+= $(KRBLIBS) LDFLAGS+= $(KRBLIBS)
CFLAGS+= $(KRBFLAGS) CFLAGS+= $(KRBFLAGS)
endif endif
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/Makefile.in,v 1.1 1997/02/09 03:23:23 scrappy Exp $ # $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/Makefile.in,v 1.2 1997/04/04 10:41:17 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -20,7 +20,7 @@ OBJS= pg_dump.o common.o @STRDUP@ ...@@ -20,7 +20,7 @@ OBJS= pg_dump.o common.o @STRDUP@
all: submake pg_dump all: submake pg_dump
pg_dump: $(OBJS) $(LIBPQDIR)/libpq.a pg_dump: $(OBJS) $(LIBPQDIR)/libpq.a
$(CC) $(LDFLAGS) -o pg_dump -L$(LIBPQDIR) $(OBJS) -lpq $(LD_ADD) $(CC) -o pg_dump -L$(LIBPQDIR) $(OBJS) -lpq $(LDFLAGS)
../../utils/strdup.o: ../../utils/strdup.o:
$(MAKE) -C ../../utils strdup.o $(MAKE) -C ../../utils strdup.o
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/Makefile,v 1.4 1997/02/06 02:31:25 momjian Exp $ # $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/Makefile,v 1.5 1997/04/04 10:41:26 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -20,7 +20,7 @@ OBJS= pg_id.o ...@@ -20,7 +20,7 @@ OBJS= pg_id.o
all: pg_id all: pg_id
pg_id: $(OBJS) $(LIBPQDIR)/libpq.a pg_id: $(OBJS) $(LIBPQDIR)/libpq.a
$(CC) $(LDFLAGS) -o pg_id -L$(LIBPQDIR) $(OBJS) -lpq $(LD_ADD) $(CC) -o pg_id -L$(LIBPQDIR) $(OBJS) -lpq $(LDFLAGS)
$(LIBPQDIR)/libpq.a: $(LIBPQDIR)/libpq.a:
$(MAKE) -C $(LIBPQDIR) libpq.a $(MAKE) -C $(LIBPQDIR) libpq.a
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/Makefile,v 1.3 1997/02/06 02:31:52 momjian Exp $ # $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/Makefile,v 1.4 1997/04/04 10:41:37 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -20,7 +20,7 @@ OBJS= pg_version.o ../../utils/version.o ...@@ -20,7 +20,7 @@ OBJS= pg_version.o ../../utils/version.o
all: pg_version all: pg_version
pg_version: submake $(OBJS) pg_version: submake $(OBJS)
$(CC) $(LDFLAGS) -o pg_version $(OBJS) $(LD_ADD) $(CC) -o pg_version $(OBJS) $(LDFLAGS)
.PHONY: submake .PHONY: submake
submake: submake:
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.5 1997/01/21 05:16:38 bryanh Exp $ # $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.6 1997/04/04 10:42:11 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -25,12 +25,12 @@ all: pgtclsh pgtksh ...@@ -25,12 +25,12 @@ all: pgtclsh pgtksh
pgtclsh: pgtclAppInit.o pgtclsh: pgtclAppInit.o
$(CC) $(CFLAGS) -o $@ pgtclAppInit.o \ $(CC) $(CFLAGS) -o $@ pgtclAppInit.o \
$(LIBPGTCL) $(LIBPQ) -L$(TCL_LIBDIR) $(TCL_LIB) -lm $(LD_ADD) $(LIBPGTCL) $(LIBPQ) -L$(TCL_LIBDIR) $(TCL_LIB) -lm $(LDFLAGS)
pgtksh: pgtkAppInit.o pgtksh: pgtkAppInit.o
$(CC) $(CFLAGS) -o $@ pgtkAppInit.o \ $(CC) $(CFLAGS) -o $@ pgtkAppInit.o \
$(LIBPGTCL) $(LIBPQ) -L$(TCL_LIBDIR) -L$(TK_LIBDIR) -L$(X11_LIBDIR) \ $(LIBPGTCL) $(LIBPQ) -L$(TCL_LIBDIR) -L$(TK_LIBDIR) -L$(X11_LIBDIR) \
$(TK_LIB) $(TCL_LIB) -lX11 -lm $(LD_ADD) $(TK_LIB) $(TCL_LIB) -lX11 -lm $(LDFLAGS)
install: pgtclsh pgtksh install: pgtclsh pgtksh
$(INSTALL) $(INSTL_EXE_OPTS) pgtclsh $(DESTDIR)$(BINDIR)/pgtclsh $(INSTALL) $(INSTL_EXE_OPTS) pgtclsh $(DESTDIR)$(BINDIR)/pgtclsh
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.3 1997/02/09 03:23:52 scrappy Exp $ # $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.4 1997/04/04 10:42:23 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -24,7 +24,7 @@ OBJS= psql.o stringutils.o @STRDUP@ ...@@ -24,7 +24,7 @@ OBJS= psql.o stringutils.o @STRDUP@
all: submake psql all: submake psql
psql: $(OBJS) $(LIBPQDIR)/libpq.a psql: $(OBJS) $(LIBPQDIR)/libpq.a
$(CC) $(LDFLAGS) -o psql -L$(LIBPQDIR) $(OBJS) -lpq $(LD_ADD) $(CC) -o psql -L$(LIBPQDIR) $(OBJS) -lpq $(LDFLAGS)
../../utils/strdup.o: ../../utils/strdup.o:
$(MAKE) -C ../../utils strdup.o $(MAKE) -C ../../utils strdup.o
......
...@@ -28,12 +28,13 @@ else ...@@ -28,12 +28,13 @@ else
TEMPLATE=template/$a TEMPLATE=template/$a
fi fi
AROPT=`grep AROPT $TEMPLATE | awk -F: '{print $2}'` AROPT=`grep AROPT $TEMPLATE | awk -F: '{print $2}'`
SHARED_LIBS=`grep SHARED_LIBS $TEMPLATE | awk -F: '{print $2}'` SHARED_LIB=`grep SHARED_LIB $TEMPLATE | awk -F: '{print $2}'`
ALL=`grep ALL $TEMPLATE | awk -F: '{print $2}'` CFLAGS=`grep CFLAGS $TEMPLATE | awk -F: '{print $2}'`
BACKEND=`grep BACKEND $TEMPLATE | awk -F: '{print $2}'`
SRCH_INC=`grep SRCH_INC $TEMPLATE | awk -F: '{print $2}'` SRCH_INC=`grep SRCH_INC $TEMPLATE | awk -F: '{print $2}'`
SRCH_LIB=`grep SRCH_LIB $TEMPLATE | awk -F: '{print $2}'` SRCH_LIB=`grep SRCH_LIB $TEMPLATE | awk -F: '{print $2}'`
USE_LOCALE=`grep USE_LOCALE $TEMPLATE | awk -F: '{print $2}'` USE_LOCALE=`grep USE_LOCALE $TEMPLATE | awk -F: '{print $2}'`
DLSUFFIX=`grep DLSUFFIX $TEMPLATE | awk -F: '{print $2}'`
DL_LIB=`grep DL_LIB $TEMPLATE | awk -F: '{print $2}'`
fi fi
$ECHO_N "Additional directories to search for .h files [$SRCH_INC]: $ECHO_C" $ECHO_N "Additional directories to search for .h files [$SRCH_INC]: $ECHO_C"
...@@ -45,14 +46,13 @@ else ...@@ -45,14 +46,13 @@ else
if [ "$a." != "." ]; then if [ "$a." != "." ]; then
SRCH_INC = $a SRCH_INC = $a
fi fi
echo $a
CPPFLAGS=`echo "$SRCH_INC" | sed 's@ *@ @g; s@^\([^ ]\)@-I\1@; s@ \([^ ]\)@ -I\1@g'` CPPFLAGS=`echo "$SRCH_INC" | sed 's@ *@ @g; s@^\([^ ]\)@-I\1@; s@ \([^ ]\)@ -I\1@g'`
fi fi
echo ""
$ECHO_N "Additional directories to search for library files [$SRCH_LIB]: $ECHO_C" $ECHO_N "Additional directories to search for library files [$SRCH_LIB]: $ECHO_C"
read a read a
if [ "$a." != " ." ] if [ "$a." = " ." ]
then then
LDFLAGS= LDFLAGS=
else else
...@@ -105,8 +105,8 @@ then ...@@ -105,8 +105,8 @@ then
NOHBA=${a} NOHBA=${a}
fi fi
export BUILDRUN USE_LOCALE DEF_PGPORT NOHBA AROPT export BUILDRUN USE_LOCALE DEF_PGPORT NOHBA AROPT DLSUFFIX DL_LIB
export SHARED_LIBS CFLAGS CPPFLAGS LDFLAGS export SHARED_LIB CFLAGS CPPFLAGS LDFLAGS
./configure --prefix=${IDIR} ./configure --prefix=${IDIR}
This diff is collapsed.
...@@ -55,9 +55,10 @@ AC_SUBST(TR) ...@@ -55,9 +55,10 @@ AC_SUBST(TR)
AC_SUBST(LDFLAGS) AC_SUBST(LDFLAGS)
AC_SUBST(CPPFLAGS) AC_SUBST(CPPFLAGS)
AC_SUBST(AROPT) AC_SUBST(AROPT)
AC_SUBST(SHARED_LIBS) AC_SUBST(SHARED_LIB)
AC_SUBST(ALL) AC_SUBST(CFLAGS)
AC_SUBST(BACKEND) AC_SUBST(DLSUFFIX)
AC_SUBST(DL_LIB)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.7 1997/03/25 09:20:32 scrappy Exp $ # $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.8 1997/04/04 10:42:43 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -46,7 +46,7 @@ ifeq ($(PORTNAME), i386_solaris) ...@@ -46,7 +46,7 @@ ifeq ($(PORTNAME), i386_solaris)
INSTALL-SHLIB-DEP := install-shlib INSTALL-SHLIB-DEP := install-shlib
SHLIB := libpq++.so.1 SHLIB := libpq++.so.1
LDFLAGS_SL = -G -z text LDFLAGS_SL = -G -z text
CFLAGS += -fPIC CFLAGS += $(CFLAGS_SL)
endif endif
all: $(LIBNAME).a $(SHLIB) install examples all: $(LIBNAME).a $(SHLIB) install examples
......
...@@ -21,13 +21,13 @@ INCLUDE_OPT= \ ...@@ -21,13 +21,13 @@ INCLUDE_OPT= \
-I$(HEADERDIR) -I$(HEADERDIR)
CXXFLAGS+= $(INCLUDE_OPT) CXXFLAGS+= $(INCLUDE_OPT)
LD_ADD+= -L.. -lpq++ -L$(LIBPQDIR) -lpq LDFLAGS+= -L.. -lpq++ -L$(LIBPQDIR) -lpq
# #
# And where libpq goes, so goes the authentication stuff... # And where libpq goes, so goes the authentication stuff...
# #
ifdef KRBVERS ifdef KRBVERS
LD_ADD+= $(KRBLIBS) LDFLAGS+= $(KRBLIBS)
CXXFLAGS+= $(KRBFLAGS) CXXFLAGS+= $(KRBFLAGS)
endif endif
...@@ -37,7 +37,7 @@ PROGS= testlibpq0 testlibpq1 testlibpq2 testlibpq3 \ ...@@ -37,7 +37,7 @@ PROGS= testlibpq0 testlibpq1 testlibpq2 testlibpq3 \
all: submake $(PROGS) all: submake $(PROGS)
$(PROGS): % : %.cc ../$(LIBNAME).a $(PROGS): % : %.cc ../$(LIBNAME).a
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $@.cc $(LD_ADD) $(CXX) $(CXXFLAGS) -o $@ $@.cc $(LDFLAGS)
.PHONY: submake .PHONY: submake
submake: submake:
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.34 1997/04/04 02:53:14 scrappy Exp $ # $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.35 1997/04/04 10:42:34 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -40,13 +40,13 @@ ifeq ($(PORTNAME), BSD44_derived) ...@@ -40,13 +40,13 @@ ifeq ($(PORTNAME), BSD44_derived)
install-shlib-dep := install-shlib install-shlib-dep := install-shlib
shlib := libpq.so.1.0 shlib := libpq.so.1.0
LDFLAGS_SL = -x -Bshareable -Bforcearchive LDFLAGS_SL = -x -Bshareable -Bforcearchive
CFLAGS += -fpic -DPIC CFLAGS += $(CFLAGS_SL)
endif endif
ifeq ($(PORTNAME), i386_solaris) ifeq ($(PORTNAME), i386_solaris)
install-shlib-dep := install-shlib install-shlib-dep := install-shlib
shlib := libpq.so.1 shlib := libpq.so.1
LDFLAGS_SL = -G -z text LDFLAGS_SL = -G -z text
CFLAGS += -fPIC CFLAGS += $(CFLAGS_SL)
endif endif
all: libpq.a $(shlib) c.h all: libpq.a $(shlib) c.h
...@@ -76,7 +76,7 @@ pqcomprim.c: ../backend/libpq/pqcomprim.c ...@@ -76,7 +76,7 @@ pqcomprim.c: ../backend/libpq/pqcomprim.c
$(MAKE) -C ../backend fmgr.h $(MAKE) -C ../backend fmgr.h
$(shlib): $(OBJS) $(shlib): $(OBJS)
$(LD) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $(OBJS) $(LD) $(LDFLAGS_SL) -o $@ $(OBJS)
ln -sf $@ libpq.so ln -sf $@ libpq.so
......
AROPT:crs AROPT:cq
BACKEND:
SHARED_LIB:-fpic -DPIC SHARED_LIB:-fpic -DPIC
ALL:-O2 -m486 -pipe CFLAGS:-O2 -m486 -pipe
SRCH_INC:/usr/local/include SRCH_INC:/usr/local/include
SRCH_LIB:/usr/local/lib SRCH_LIB:/usr/local/lib
USE_LOCALE:no USE_LOCALE:no
......
...@@ -7,13 +7,13 @@ include ../../Makefile.global ...@@ -7,13 +7,13 @@ include ../../Makefile.global
CFLAGS+= -I$(LIBPQDIR) CFLAGS+= -I$(LIBPQDIR)
LD_ADD+= -L$(LIBPQDIR) -lpq LDFLAGS+= -L$(LIBPQDIR) -lpq
# #
# And where libpq goes, so goes the authentication stuff... # And where libpq goes, so goes the authentication stuff...
# #
ifdef KRBVERS ifdef KRBVERS
LD_ADD+= $(KRBLIBS) LDFLAGS+= $(KRBLIBS)
CFLAGS+= $(KRBFLAGS) CFLAGS+= $(KRBFLAGS)
endif endif
...@@ -22,7 +22,7 @@ PROGS= testlibpq0 testlibpq1 testlibpq2 testlibpq3 testlibpq4 testlo ...@@ -22,7 +22,7 @@ PROGS= testlibpq0 testlibpq1 testlibpq2 testlibpq3 testlibpq4 testlo
all: $(PROGS) all: $(PROGS)
$(PROGS): % : %.c $(PROGS): % : %.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.c $(LD_ADD) $(CC) $(CFLAGS) -o $@ $@.c $(LDFLAGS)
clean: clean:
rm -f $(PROGS) rm -f $(PROGS)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment