# $Id: Makefile.in,v 1.3 1999-09-18 20:59:54 danw Exp $

SHELL=/bin/sh
VPATH=@srcdir@
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
srcdir=@srcdir@
top_srcdir=@top_srcdir@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libexecdir=@libexecdir@
mandir=@mandir@

CC=@CC@
DEFS=@DEFS@
CPPFLAGS=@CPPFLAGS@
CFLAGS=@CFLAGS@ ${WARN_CFLAGS}
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
ALL_CFLAGS=${CPPFLAGS} ${CFLAGS} ${DEFS} -DLIBEXECDIR=\"${libexecdir}\"

all: docxref fmtxref cxrfilt cxref

docxref: docxref.o cscan.o
	${CC} ${LDFLAGS} -o docxref docxref.o cscan.o ${LIBS}

fmtxref: fmtxref.o
	${CC} ${LDFLAGS} -o fmtxref fmtxref.o ${LIBS}

cxrfilt: cxrfilt.o
	${CC} ${LDFLAGS} -o cxrfilt cxrfilt.o ${LIBS}

cxref: cxref.o
	${CC} ${LDFLAGS} -o cxref cxref.o ${LIBS}

.c.o:
	${CC} -c ${ALL_CFLAGS} $<

cxrfilt.o: constdefs.h

check:

install:
	${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir}
	${top_srcdir}/mkinstalldirs ${DESTDIR}${libexecdir}/cxref
	${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
	${INSTALL_PROGRAM} cxref ${DESTDIR}${bindir}
	${INSTALL_PROGRAM} docxref ${DESTDIR}${libexecdir}/cxref
	${INSTALL_PROGRAM} fmtxref ${DESTDIR}${libexecdir}/cxref
	${INSTALL_PROGRAM} cxrfilt ${DESTDIR}${libexecdir}/cxref
	${INSTALL} -m 444 ${srcdir}/cxref.1 ${DESTDIR}${mandir}/man1

clean:
	rm -f docxref.o fmtxref.o cxrfilt.o cxref.o cscan.o
	rm -f docxref fmtxref cxrfilt cxref

distclean: clean
	rm -f config.cache config.log config.status Makefile
