1 #-------------------------------------------------------------------------
4 # Makefile for bin/psql
6 # Copyright (c) 1994, Regents of the University of California
10 # $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.19 1999/11/27 19:43:20 tgl Exp $
12 #-------------------------------------------------------------------------
15 include ../../Makefile.global
17 CFLAGS:= -I$(LIBPQDIR) $(CFLAGS)
20 # And where libpq goes, so goes the authentication stuff...
31 OBJS=command.o common.o help.o input.o stringutils.o mainloop.o \
32 copy.o startup.o prompt.o variables.o large_obj.o print.o describe.o \
38 OBJS+=$(SRCDIR)/utils/strdup.o
40 $(SRCDIR)/utils/strdup.o:
41 $(MAKE) -C $(SRCDIR)/utils strdup.o
44 # Move these to the utils directory?
47 OBJS+=$(SRCDIR)/backend/port/strerror.o
49 $(SRCDIR)/backend/port/strerror.o:
50 $(MAKE) -C $(SRCDIR)/backend/port strerror.o
54 OBJS+=$(SRCDIR)/backend/port/snprintf.o
56 $(SRCDIR)/backend/port/snprintf.o:
57 $(MAKE) -C $(SRCDIR)/backend/port snprintf.o
60 # End of hacks for picking up backend 'port' modules
62 psql: $(OBJS) $(LIBPQDIR)/libpq.a
63 $(CC) -o psql -L$(LIBPQDIR) $(OBJS) -lpq $(LDFLAGS)
67 ifneq ($(strip $(PERL)),)
68 sql_help.h: $(wildcard $(SRCDIR)/../doc/src/sgml/ref/*.sgml) create_help.pl
69 $(PERL) create_help.pl sql_help.h
77 $(MAKE) -C $(LIBPQDIR) libpq.a
80 $(INSTALL) $(INSTL_EXE_OPTS) psql$(X) $(BINDIR)/psql$(X)
83 $(CC) -MM -MG $(CFLAGS) *.c >depend
86 rm -f psql$(X) $(OBJS)
88 # Some people might get in trouble if they do a make clean and the
89 # sql_help.h is gone, for it needs the docs in the right place to be
90 # regenerated. -- (pe)
92 maintainer-clean: clean
95 ifeq (depend,$(wildcard depend))