bsd.rpc.mk revision 1.8 1 # $NetBSD: bsd.rpc.mk,v 1.8 2003/07/29 02:42:49 lukem Exp $
2
3 .include <bsd.init.mk>
4
5 RPC_XDIR?= ${.CURDIR}/
6
7 # We don't use implicit suffix rules here to avoid dependencies in the
8 # Installed files.
9
10 .if defined(RPC_INCS) # {
11
12 .for I in ${RPC_INCS}
13 ${I}: ${I:.h=.x}
14 ${TOOL_RPCGEN} -C -h ${RPC_XDIR}${I:.h=.x} -o ${.TARGET}
15 .endfor
16
17 DPSRCS+= ${RPC_INCS}
18 CLEANFILES+= ${RPC_INCS}
19
20 .endif # }
21
22
23 .if defined(RPC_XDRFILES) # {
24
25 .for I in ${RPC_XDRFILES}
26 ${I}: ${RPC_XDIR}${I:_xdr.c=.x}
27 ${TOOL_RPCGEN} -C -c ${RPC_XDIR}${I:_xdr.c=.x} -o ${.TARGET}
28 .endfor
29
30 DPSRCS+= ${RPC_XDRFILES}
31 CLEANFILES+= ${RPC_XDRFILES}
32
33 .endif # }
34
35
36 .if defined(RPC_SVCFILES) # {
37
38 .for I in ${RPC_SVCCLASS}
39 _RPCS += -s ${I}
40 .endfor
41
42 .for I in ${RPC_SVCFILES}
43
44 ${I}: ${RPC_XDIR}${I:_svc.c=.x}
45 ${TOOL_RPCGEN} -C ${_RPCS} ${RPC_SVCFLAGS} ${RPC_XDIR}${I:_svc.c=.x} \
46 -o ${.TARGET}
47 .endfor
48
49 DPSRCS+= ${RPC_SVCFILES}
50 CLEANFILES+= ${RPC_SVCFILES}
51
52 .endif # }
53
54
55 ##### Pull in related .mk logic
56 .include <bsd.obj.mk>
57 .include <bsd.sys.mk>
58