#	@(#)Makefile	8.1 (Berkeley) 5/31/93

HDRS=	klm_prot.h mount.h nfs_prot.h nlm_prot.h rex.h rquota.h rnusers.h\
	rquota.h sm_inter.h spray.h yppasswd.h yp.h bootparam_prot.h
XFILES=	${.CURDIR}/bootparam_prot.x ${.CURDIR}/klm_prot.x ${.CURDIR}/mount.x \
	${.CURDIR}/nfs_prot.x ${.CURDIR}/nlm_prot.x ${.CURDIR}/rex.x \
	${.CURDIR}/rnusers.x ${.CURDIR}/rquota.x ${.CURDIR}/sm_inter.x \
	${.CURDIR}/spray.x ${.CURDIR}/yp.x ${.CURDIR}/yppasswd.x
CFLAGS+=-I.

DPADD=  ${LIBRPC}
LDADD=  -lrpc
NOMAN=

SUBDIR=	rstat rstat_svc

RPCCOM = rpcgen

all:	${HDRS}

.SUFFIXES:	.x

.x.h:
	${RPCCOM} -h ${.IMPSRC}  -o ${.TARGET}

klm_prot.h:	klm_prot.x
mount.h:	mount.x
nfs_prot.h:	nfs_prot.x
nlm_prot.h:	nlm_prot.x
rex.h:		rex.x
rnusers.h:	rnusers.x
rquota.h:	rquota.x
sm_inter.h:	sm_inter.x
spray.h:	spray.x
yp.h:		yp.x
yppasswd.h:	yppasswd.x

afterinstall:
	install ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
	    ${HDRS} ${DESTDIR}/usr/include/rpcsvc
	install ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
	    ${XFILES} ${DESTDIR}/usr/include/rpcsvc

.include <bsd.prog.mk>
