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.15 1996/11/26 07:38:24 bryanh Exp $
12 #-------------------------------------------------------------------------
15 include ../../Makefile.global
21 CFLAGS+= $(INCLUDE_OPT)
23 #USE_READLINE is set in Makefile.global
26 ifeq ($(USE_READLINE), true)
27 CFLAGS+= $(READLINE_INC) $(HISTORY_INC)
30 LD_ADD+= $(READLINE_LIB) $(HISTORY_LIB) $(LIBCURSES)
32 ifeq ($(PORTNAME), ultrix4)
35 ifeq ($(PORTNAME), sparc)
38 ifeq ($(PORTNAME), linux)
41 ifeq ($(PORTNAME), next)
44 ifeq ($(PORTNAME), bsdi)
47 ifeq ($(PORTNAME), BSD44_derived)
59 OBJS= psql.o stringutils.o
61 ifneq ($(USE_READLINE), true)
65 ifeq ($(PORTNAME), ultrix4)
66 OBJS+= ../../utils/strdup.o
71 psql: $(OBJS) $(LIBPQDIR)/libpq.a
72 $(CC) $(LDFLAGS) -o psql -L$(LIBPQDIR) $(OBJS) -lpq $(LD_ADD)
75 $(MAKE) -C ../../utils strdup.o
79 $(MAKE) -C $(LIBPQDIR) libpq.a
82 $(INSTALL) $(INSTL_EXE_OPTS) psql $(DESTDIR)$(BINDIR)/psql
85 $(CC) -MM $(INCLUDE_OPT) *.c >depend
90 ifeq (depend,$(wildcard depend))