Makefile.in 1.1 KB
Newer Older
1 2 3 4 5 6 7 8 9
#-------------------------------------------------------------------------
#
# Makefile.inc--
#    Makefile for bin/psql
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
10
#    $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.15 1999/01/17 06:19:19 momjian Exp $
11 12 13 14 15 16
#
#-------------------------------------------------------------------------

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

B
Bruce Momjian 已提交
17
CFLAGS:= -I$(LIBPQDIR) $(CFLAGS)
18

19 20 21 22 23 24 25 26
#
# And where libpq goes, so goes the authentication stuff...
#
ifdef KRBVERS
LDFLAGS+= $(KRBLIBS)
CFLAGS+= $(KRBFLAGS)
endif

M
 
Marc G. Fournier 已提交
27 28
ifdef MULTIBYTE
CFLAGS+= $(MBFLAGS)
29 30
endif

31
OBJS= psql.o stringutils.o @STRDUP@ @STRERROR2@
32 33 34 35

all: submake psql

psql: $(OBJS) $(LIBPQDIR)/libpq.a
36
	$(CC) -o psql -L$(LIBPQDIR) $(OBJS) -lpq $(LDFLAGS)
37 38 39 40 41 42 43 44 45

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

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

install: psql
46
	$(INSTALL) $(INSTL_EXE_OPTS) psql$(X) $(BINDIR)/psql$(X)
47 48

depend dep:
B
Hi,  
Bruce Momjian 已提交
49
	$(CC) -MM $(CFLAGS) *.c >depend
50 51

clean: 
52
	rm -f psql$(X) $(OBJS) 
53 54 55 56 57 58 59

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