2004-05-12 20:38:01 +04:00
|
|
|
# $NetBSD: bsd.rpc.mk,v 1.11 2004/05/12 16:38:01 christos Exp $
|
2003-07-14 04:52:12 +04:00
|
|
|
|
|
|
|
.include <bsd.init.mk>
|
2003-01-05 22:18:52 +03:00
|
|
|
|
|
|
|
RPC_XDIR?= ${.CURDIR}/
|
|
|
|
|
|
|
|
# We don't use implicit suffix rules here to avoid dependencies in the
|
|
|
|
# Installed files.
|
|
|
|
|
2003-07-29 05:12:46 +04:00
|
|
|
.if defined(RPC_INCS) # {
|
2003-01-05 22:18:52 +03:00
|
|
|
|
|
|
|
.for I in ${RPC_INCS}
|
2003-05-19 11:19:10 +04:00
|
|
|
${I}: ${I:.h=.x}
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_RPCGEN} -C -h ${RPC_XDIR}${I:.h=.x} -o ${.TARGET}
|
2003-01-05 22:18:52 +03:00
|
|
|
.endfor
|
|
|
|
|
2003-07-29 06:42:49 +04:00
|
|
|
DPSRCS+= ${RPC_INCS}
|
|
|
|
CLEANFILES+= ${RPC_INCS}
|
2003-01-05 22:18:52 +03:00
|
|
|
|
2003-07-29 05:12:46 +04:00
|
|
|
.endif # }
|
2003-01-05 22:18:52 +03:00
|
|
|
|
|
|
|
|
2003-07-29 05:12:46 +04:00
|
|
|
.if defined(RPC_XDRFILES) # {
|
2003-01-05 22:18:52 +03:00
|
|
|
|
|
|
|
.for I in ${RPC_XDRFILES}
|
2003-05-19 11:19:10 +04:00
|
|
|
${I}: ${RPC_XDIR}${I:_xdr.c=.x}
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_RPCGEN} -C -c ${RPC_XDIR}${I:_xdr.c=.x} -o ${.TARGET}
|
2003-01-05 22:18:52 +03:00
|
|
|
.endfor
|
|
|
|
|
2003-07-29 06:42:49 +04:00
|
|
|
DPSRCS+= ${RPC_XDRFILES}
|
|
|
|
CLEANFILES+= ${RPC_XDRFILES}
|
2003-01-05 22:18:52 +03:00
|
|
|
|
2003-07-29 05:12:46 +04:00
|
|
|
.endif # }
|
2003-01-05 22:18:52 +03:00
|
|
|
|
|
|
|
|
2003-07-29 05:12:46 +04:00
|
|
|
.if defined(RPC_SVCFILES) # {
|
2003-01-05 22:18:52 +03:00
|
|
|
|
|
|
|
.for I in ${RPC_SVCCLASS}
|
|
|
|
_RPCS += -s ${I}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for I in ${RPC_SVCFILES}
|
|
|
|
|
2003-05-19 11:19:10 +04:00
|
|
|
${I}: ${RPC_XDIR}${I:_svc.c=.x}
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_RPCGEN} -C ${_RPCS} ${RPC_SVCFLAGS} ${RPC_XDIR}${I:_svc.c=.x} \
|
2003-01-05 22:18:52 +03:00
|
|
|
-o ${.TARGET}
|
|
|
|
.endfor
|
|
|
|
|
2003-07-29 06:42:49 +04:00
|
|
|
DPSRCS+= ${RPC_SVCFILES}
|
|
|
|
CLEANFILES+= ${RPC_SVCFILES}
|
2003-01-05 22:18:52 +03:00
|
|
|
|
2003-07-29 05:12:46 +04:00
|
|
|
.endif # }
|
|
|
|
|
2004-05-12 20:38:01 +04:00
|
|
|
.if defined(RPC_CLNTFILES) # {
|
|
|
|
|
|
|
|
.for I in ${RPC_CLNTFILES}
|
|
|
|
|
|
|
|
${I}: ${RPC_XDIR}${I:_clnt.c=.x}
|
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
${TOOL_RPCGEN} -C -l ${_RPCS} ${RPC_CLNTFLAGS} \
|
|
|
|
${RPC_XDIR}${I:_clnt.c=.x} -o ${.TARGET}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
DPSRCS+= ${RPC_CLNTFILES}
|
|
|
|
CLEANFILES+= ${RPC_CLNTFILES}
|
|
|
|
|
|
|
|
.endif # }
|
2003-01-05 22:18:52 +03:00
|
|
|
|
2003-07-14 04:52:12 +04:00
|
|
|
##### Pull in related .mk logic
|
|
|
|
.include <bsd.obj.mk>
|
|
|
|
.include <bsd.sys.mk>
|