1 #-------------------------------------------------------------------------
4 # Makefile for bin/psql
6 # Copyright (c) 1994, Regents of the University of California
10 # $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.12 1996/11/12 06:11:52 bryanh Exp $
12 #-------------------------------------------------------------------------
15 LIBPQDIR = $(SRCDIR)/libpq
16 include ../../Makefile.global
22 CFLAGS += $(INCLUDE_OPT)
24 #USE_READLINE is set in Makefile.global
27 ifeq ($(USE_READLINE), true)
28 CFLAGS += $(READLINE_INC) $(HISTORY_INC)
31 LD_ADD += $(READLINE_LIB) $(HISTORY_LIB) $(LIBCURSES)
33 ifeq ($(PORTNAME), ultrix4)
36 ifeq ($(PORTNAME), sparc)
39 ifeq ($(PORTNAME), linux)
42 ifeq ($(PORTNAME), next)
45 ifeq ($(PORTNAME), bsdi)
48 ifeq ($(PORTNAME), BSD44_derived)
57 CFLAGS += -DNOREADLINE
60 OBJS= psql.o stringutils.o
62 ifneq ($(USE_READLINE), true)
68 psql: $(OBJS) $(LIBPQDIR)/libpq.a
69 $(CC) $(LDFLAGS) -o psql -L$(LIBPQDIR) $(OBJS) -lpq $(LD_ADD)
73 $(MAKE) -C $(LIBPQDIR) libpq.a
76 $(INSTALL) $(INSTL_EXE_OPTS) psql $(DESTDIR)$(BINDIR)/psql
79 $(CC) -MM $(INCLUDE_OPT) *.c >depend
84 ifeq (depend,$(wildcard depend))