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