head	1.8;
access;
symbols
	REL_0_4:1.1.1.1
	ANDREW_JOLLY:1.1.1;
locks; strict;
comment	@# @;


1.8
date	95.05.01.03.05.18;	author andrew;	state Exp;
branches;
next	1.7;

1.7
date	95.04.30.07.03.14;	author andrew;	state Exp;
branches;
next	1.6;

1.6
date	95.03.22.20.05.53;	author andrew;	state Exp;
branches;
next	1.5;

1.5
date	95.03.21.09.42.49;	author andrew;	state Exp;
branches;
next	1.4;

1.4
date	95.02.03.00.55.36;	author jolly;	state Exp;
branches;
next	1.3;

1.3
date	94.12.26.23.43.03;	author andrew;	state Exp;
branches;
next	1.2;

1.2
date	94.11.11.21.24.56;	author andrew;	state Exp;
branches;
next	1.1;

1.1
date	94.11.07.05.20.10;	author andrew;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	94.11.07.05.20.11;	author andrew;	state Exp;
branches;
next	;


desc
@@


1.8
log
@psql can now be compiled without the readline libraries
@
text
@#-------------------------------------------------------------------------
#
# Makefile.inc--
#    Makefile for bin/psql
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.7 1995/04/30 07:03:14 andrew Exp $
#
#-------------------------------------------------------------------------

MKDIR=	../../mk
include $(MKDIR)/postgres.mk

# About the use of readline:
#    psql does not require the GNU readline and history libraries. Hence, we
#    do not compile with them by default. However, there are hooks in the
#    program which supports the use of GNU readline and history. Should you
#    decide to use them, change USE_READLINE to true and change READLINE_INCDIR
#    and READLINE_LIBDIR to reflect the location of the readline and histroy
#    headers and libraries.
USE_READLINE= true

# directories for the readline and history libraries.
READLINE_INCDIR=  /usr/sww/include
READLINE_LIBDIR=  /usr/sww/lib


CFLAGS += -I$(CURDIR) \
	-I$(srcdir)/backend/$(objdir) \
	-I$(srcdir)/backend/include \
	-I$(srcdir)/backend

ifeq ($(USE_READLINE), false)
   CFLAGS += -DNOREADLINE
else
   CFLAGS += -I$(READLINE_INCDIR)
   LIBCURSES=	-lcurses
   LD_ADD += -L$(READLINE_LIBDIR) -lreadline -lhistory $(LIBCURSES)

   ifeq ($(PORTNAME), ultrix4)
   LD_ADD += -ltermcap
   else
   ifeq ($(PORTNAME), sparc)
   LD_ADD += -ltermcap
   endif
   endif
endif

LIB=	tdb
LIBSRCS= tdb.c tgPrint.c pqutils.c stringutils.c

PROG= psql
SRCS= psql.c

ifeq ($(USE_READLINE), false)
SRCS+= rlstubs.c
endif


LD_ADD+= $(objdir)/libtdb.a \
	-L$(srcdir)/libpq/$(objdir) -L$(LIBDIR) -lpq

all:: libtdb.a $(PROG) 


include $(MKDIR)/postgres.lib.mk
include $(MKDIR)/postgres.prog.mk


@


1.7
log
@READLINE_{INCDIR,LIBDIR} moved to src/Makefile.global
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.6 1995/03/22 20:05:53 andrew Exp $
d17 12
d30 2
a31 1
CFLAGS += -I$(CURDIR) -I$(READLINE_INCDIR) \
d36 2
a37 5
LIBCURSES=	-lcurses
LD_ADD += -L$(READLINE_LIBDIR) -lreadline -lhistory $(LIBCURSES)

ifeq ($(PORTNAME), ultrix4)
LD_ADD += -ltermcap
d39 11
a49 2
ifeq ($(PORTNAME), sparc)
LD_ADD += -ltermcap
a50 2
endif

d58 5
@


1.6
log
@put postgres.lib.mk before postgres.prog.mk so that the library gets
installed first
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.5 1995/03/21 09:42:49 andrew Exp $
a16 3
# directories for the readline and history libraries
READLINE_INCDIR =  /usr/sww/include
READLINE_LIBDIR =  /usr/sww/lib
@


1.5
log
@makefile for psql now fixed
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.4 1995/02/03 00:55:36 jolly Exp $
d50 1
a51 1
include $(MKDIR)/postgres.lib.mk
@


1.4
log
@*** empty log message ***
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.3 1994/12/26 23:43:03 andrew Exp $
d14 2
a15 1
.include <postgres.global.mk>
d21 15
a35 7
CFLAGS += -I${.CURDIR} -I${READLINE_INCDIR} 
LDFLAGS += -L${READLINE_LIBDIR}
LDADD += -lreadline -lhistory ${LIBCURSES}

.if (${PORTNAME} == "ultrix4" || ${PORTNAME} == "sparc")
LDADD += -ltermcap
.endif
d37 4
d42 1
d44 2
a45 1
SRCS= tdb.c tgPrint.c pqutils.c stringutils.c psql.c
d47 1
a47 1
LIB = tdb
a48 2
${PROG}: psql.o libtdb.a
	${CC} -o ${.TARGET} psql.o libtdb.a ${LDFLAGS} ${LDADD} 
d50 2
a51 1
.include <postgres.prog.mk>
a52 1
.include <postgres.lib.mk>
@


1.3
log
@sparc needs termcap too
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.2 1994/11/11 21:24:56 andrew Exp $
d30 1
a30 1
SRCS= tdb.c tgPrint.c pqutils.c stringutils.c
@


1.2
log
@ultrix need -ltermcap
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.1.1.1 1994/11/07 05:20:11 andrew Exp $
d24 1
a24 1
.if (${PORTNAME} == "ultrix4")
@


1.1
log
@Initial revision
@
text
@d10 1
a10 1
#    $Header: $
d23 4
@


1.1.1.1
log
@Copyright (c) 1994, POSTGRES Lite   Andrew Yu and Jolly Chen
@
text
@@
