#	BSDI Makefile,v 2.1 1995/02/03 17:54:44 polk Exp

RPCGEN=	rpcgen

PROG=	rstatd
MAN8=	rstatd.0
SRCS=	rstat_svc.c rstat_proc.c rstat_xdr.c
CFLAGS+=-I. -I/sys
DPADD+=	${LIBRPC} ${LIBUTIL} ${LIBKVM}
LDADD+=	-lrpc -lutil -lkvm
CLEANFILES+=rstat_svc.c rstat_xdr.c rstat.h rstat.x

.depend: rstat.h rstat_svc.c rstat_xdr.c

rstat.x: ${.CURDIR}/../../usr.bin/rstat/rstat.rpc
	ln -s ${.CURDIR}/../../usr.bin/rstat/rstat.rpc rstat.x
rstat.h: rstat.x
	$(RPCGEN) -h -o ${.TARGET} rstat.x
rstat_svc.c: rstat.x
	$(RPCGEN) -s udp -o ${.TARGET} rstat.x
rstat_xdr.c: rstat.x
	$(RPCGEN) -c -o ${.TARGET} rstat.x

.include <bsd.prog.mk>
