BINDIR=		/usr/sbin
ETCDIR=		/usr/libexec
MANDIR=		/usr/share/man
MANEXT=		8
INSTALL=	install

all:
	@ echo 'Use the "build" command (shell script) to make ftpd.'
	@ echo 'You can say "build help" for details on how it works.'

install: bin/ftpd bin/ftpcount bin/ftpshut
	-mv -f ${ETCDIR}/ftpd ${ETCDIR}/ftpd-old
	@echo installing binaries.
	${INSTALL} -c -o bin -g bin -m 755 bin/ftpd ${ETCDIR}/ftpd
	${INSTALL} -c -o bin -g bin -m 755 bin/ftpshut ${BINDIR}/ftpshut
	${INSTALL} -c -o bin -g bin -m 755 bin/ftpcount ${BINDIR}/ftpcount
	${INSTALL} -c -o bin -g bin -m 755 bin/ftpwho ${BINDIR}/ftpwho
	@echo installing manpages.
	nroff -man doc/ftpd.8  > ${MANDIR}/cat8/ftpd.0
	nroff -man doc/ftpcount.1  > ${MANDIR}/cat1/ftpcount.0
	nroff -man doc/ftpwho.1  > ${MANDIR}/cat1/ftpwho.0
	nroff -man doc/ftpshut.8  > ${MANDIR}/cat8/ftpshut.0
	nroff -man doc/ftpaccess.5  > ${MANDIR}/cat5/ftpaccess.0
	nroff -man doc/ftphosts.5  > ${MANDIR}/cat5/ftphosts.0
	nroff -man doc/ftpconversions.5  > ${MANDIR}/cat5/ftpconversions.0
	nroff -man doc/xferlog.5  > ${MANDIR}/cat5/xferlog.0





