# /usr/src/etc/htable/Makefile for MacMach

include /usr/src/COPYRIGHTS

CFLAGS=	-O
LIBC=	/lib/libc.a
SRCS=	htable.c parse.c scan.c
OBJS=	htable.o parse.o scan.o

all:	.depend htable

htable: ${OBJS} ${LIBC}
	${CC} -o $@ ${CFLAGS} ${OBJS}

y.tab.h:
	yacc -d parse.y
	rm -f y.tab.c

install: FRC
	rm -f ${DESTDIR}/etc/htable ${DESTDIR}/usr/etc/htable
	install -c -s -o bin -g bin -m 755 htable ${DESTDIR}/usr/etc/htable
	ln -s ../usr/etc/htable ${DESTDIR}/etc/htable

clean:	FRC
	rm -f .depend ${OBJS} core htable parse.c scan.c y.tab.h

compress: clean
	find . -type f ! -name Makefile ! -name '*.Z' -exec compress {} \;

uncompress: FRC
	find . -type f ! -name Makefile -name '*.Z' -exec uncompress {} \;

.depend: y.tab.h ${SRCS}
	@echo "#`date`" >.depend
	mkdep -f .depend ${CFLAGS} ${SRCS}

-include .depend

FRC:
