#-------------------------------------------------------------------------
#
# Makefile.inc--
#    Makefile for bin/psql
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
#    /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.14 1995/07/11 20:39:55 jolly Exp
#
#-------------------------------------------------------------------------

PROG= psql

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

# 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

ifeq ($(USE_READLINE), true)
   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
else
   CFLAGS += -DNOREADLINE
endif

SRCS= psql.c stringutils.c 

ifneq ($(USE_READLINE), true)
SRCS+= rlstubs.c
endif

include $(MKDIR)/postgres.prog.mk




