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

include /usr/src/COPYRIGHTS

VPATH=	../../ucb/tftp
CFLAGS=	-O
LIBC=	/lib/libc.a
SRCS=	tftpd.c tftpsubs.c
OBJS=	tftpd.o tftpsubs.o

all:	.depend tftpd

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

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

clean:	FRC
	rm -f .depend ${OBJS} core tftpd

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

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

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

-include .depend

FRC:
