#
# Dumphost 2.0 Installation instructions
#
# DUMPPROG should match what's in ../Makefile
# USER should be "root" in order to obtain a reserved port.
#
# you may want to change the "port" and "hostdbserver" variables
# in "dumphost.h".
#
DUMPPROG = dumphost
CFLAGS = -O
OBJS = ${DUMPPROG}.o sockstuff.o
DESTETC = /usr/local/etc
USER = root
GROUP = staff

.DEFAULT:
	co $@

${DUMPPROG}: ${OBJS}
	cc ${CFLAGS} -o ${DUMPPROG} ${OBJS}

${DUMPPROG}.o: ${DUMPPROG}.c ${DUMPPROG}.h
	cc ${CFLAGS} -c ${DUMPPROG}.c

sockstuff.o: sockstuff.c
	cc ${CFLAGS} -c sockstuff.c

clean:
	rm -f ${OBJS} *.out core ${DUMPPROG}

install: ${DUMPPROG}
	rm -f ${DESTETC}/${DUMPPROG}
	-test -d ${DESTETC} || mkdir -p ${DESTETC}
	install -c -m 4755  -o ${USER} -g ${GROUP} -s ${DUMPPROG} ${DESTETC}

