xref: /netbsd/lib/librpcsvc/Makefile (revision bf9ec67e)
1#	$NetBSD: Makefile,v 1.35 2002/01/29 11:22:25 tv Exp $
2
3RPCSRCS=	bootparam_prot.x klm_prot.x mount.x nfs_prot.x\
4		nlm_prot.x rex.x rnusers.x rusers.x rquota.x rstat.x rwall.x\
5		sm_inter.x spray.x yp.x yppasswd.x
6SRCS=		${RPCSRCS:.x=.c} ${HDRS}
7HDRS=           ${RPCSRCS:.x=.h}
8CLEANFILES+=	${SRCS} ${HDRS}
9
10INCS=		${HDRS} ${RPCSRCS}
11INCSDIR=	/usr/include/rpcsvc
12
13LIB=		rpcsvc
14NOMAN=		# defined
15NOPIC=		# defined
16
17.include <bsd.lib.mk>
18
19# Resolve rpcgen's path, to allow it to be a dependency.
20_RPCGEN:=	${RPCGEN:M*rpcgen}
21.if ${_RPCGEN:M/*} == ""
22_RPCGEN!=	type ${RPCGEN} | awk '{print $$NF}'
23.endif
24
25# We don't use explicit suffix rules here to avoid dependencies in the
26# Installed files.
27
28.for I in ${RPCSRCS}
29${I:.x=.c}: $I ${_RPCGEN}
30	${RPCGEN} -C -c ${.CURDIR}/$I -o ${.TARGET}
31
32${I:.x=.h}: $I ${_RPCGEN}
33	${RPCGEN} -C -h ${.CURDIR}/$I -o ${.TARGET}
34.endfor
35