#	@(#)Makefile	4.1	(Berkeley)	10/19/82
#
DESTDIR=
BINDIR=		/usr/sipb/${MACHINE}bin
LIBDIR=		/usr/sipb/${MACHINE}lib
MANDIR=		/usr/sipb/man
MANSECT=	1
DEFSFILE=	/mit/sipb/lib/vgrindefs
TEXINPUTS=	/usr/sipb/lib/tex/macros

CFLAGS=		-O
SOURCES=	tfontedpr.c vgrindefs.c regexp.c retest.c
CMDS=		tfontedpr retest
OBJS=		retest.o regexp.o tfontedpr.o vgrindefs.o

all:	$(CMDS)

tfontedpr: tfontedpr.o vgrindefs.o regexp.o
	cc ${CFLAGS} -o tfontedpr tfontedpr.o vgrindefs.o regexp.o

tfontedpr.o: tfontedpr.c
	cc ${CFLAGS} -DDEFSFILE=\"${DEFSFILE}\" -c tfontedpr.c

retest: retest.o regexp.o
	cc ${CFLAGS} -o retest retest.o regexp.o

install: all
	install -s tfontedpr ${DESTDIR}${LIBDIR}
	install -c tgrind.sh ${DESTDIR}/${BINDIR}/tgrind
	install -c -m 644 tgrindmac.tex ${DESTDIR}${TEXINPUTS}/tgrindmac.tex
	install -c -m 644 vgrindefs.src ${DESTDIR}${DEFSFILE}
	install -c -m 664 tgrind.1 ${DESTDIR}${MANDIR}/man${MANSECT}/tgrind.${MANSECT}

clean:
	rm -f ${CMDS} ${OBJS}
