#-------------------------------------------------------------------------
#
# Makefile.inc--
#    Makefile for bin/psql
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
#    $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.3 1997/02/09 03:23:52 scrappy Exp $
#
#-------------------------------------------------------------------------

SRCDIR= ../..
include ../../Makefile.global

INCLUDE_OPT:= -I$(LIBPQDIR) \
              -I../../include 

CFLAGS+= $(INCLUDE_OPT)

OBJS= psql.o stringutils.o @STRDUP@ 

all: submake psql

psql: $(OBJS) $(LIBPQDIR)/libpq.a
	$(CC) $(LDFLAGS) -o psql -L$(LIBPQDIR) $(OBJS) -lpq $(LD_ADD)

../../utils/strdup.o:
	$(MAKE) -C ../../utils strdup.o

.PHONY: submake
submake:
	$(MAKE) -C $(LIBPQDIR) libpq.a

install: psql
	$(INSTALL) $(INSTL_EXE_OPTS) psql $(DESTDIR)$(BINDIR)/psql

depend dep:
	$(CC) -MM $(INCLUDE_OPT) *.c >depend

clean: 
	rm -f psql $(OBJS) 

ifeq (depend,$(wildcard depend))
include depend
endif



