NetBSD-5.0.2/usr.sbin/rpc.pcnfsd/Makefile.clnt

#	$NetBSD: Makefile.clnt,v 1.13 2003/08/01 17:04:07 lukem Exp $

#	This Makefile builds a client used for testing.

NOMAN=	# defined

.include <bsd.own.mk>

PROG=	clnt.pcnfsd
SRCS=	pcnfsd_test.c pcnfsd_clnt.c pcnfsd_xdr.c

CPPFLAGS+= -DUSER_CACHE -DWTMP -I.

.if (${USE_YP} != "no")
CPPFLAGS+=-DUSE_YP
.endif

DPADD=	${LIBRPCSVC}
LDADD=	-lrpcsvc

# Special rules for the generated C code...

.ifnmake getrpcgen
XRPCGEN != (cd ${.CURDIR} && ${MAKE} getrpcgen)
.endif

getrpcgen:
	@set -- X `type ${TOOL_RPCGEN}` && shift $$(($$# - 1)) && echo "$$1"

pcnfsd_clnt.c: pcnfsd.x ${XRPCGEN}
	${TOOL_RPCGEN} -l ${.CURDIR}/pcnfsd.x -o $@

pcnfsd_xdr.c: pcnfsd.x ${XRPCGEN}
	${TOOL_RPCGEN} -c ${.CURDIR}/pcnfsd.x -o $@

pcnfsd.h: pcnfsd.x ${XRPCGEN}
	${TOOL_RPCGEN} -h ${.CURDIR}/pcnfsd.x -o $@

DPSRCS+=	pcnfsd.h
CLEANFILES+=	pcnfsd_clnt.c pcnfsd_xdr.c pcnfsd.h

.include <bsd.prog.mk>