summaryrefslogtreecommitdiff
path: root/usr.sbin/amd/rpcx/Makefile
blob: 4bc267502ea2ed84c7c82445e530d9cf6c057c7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

RPCGEN = rpcgen -C

AMQ = amq.h amq_clnt.c amq_svc.c amq_xdr.c
NFS = nfs_prot.h nfs_prot_svc.c nfs_prot_xdr.c

NFSX = /usr/include/rpcsvc/nfs_prot.x

all: ${AMQ} ${NFS}

.SUFFIXES:
.SUFFIXES: .x .h _xdr.c _clnt.c .c

.x.h:
	${RPCGEN} -o $@ -h $<
.x_xdr.c:
	${RPCGEN} -o $@ -c -i 100 $<
.x_clnt.c:
	${RPCGEN} -o $@ -l $<

amq_svc.c: amq.x $*.ed
	${RPCGEN} -o $@.tmp -m amq.x
	ed -s $@.tmp <$*.ed
	mv $@.tmp $@

nfs_prot_svc.c: nfs_prot.x $*.ed
	${RPCGEN} -o $@.tmp -m nfs_prot.x
	ed -s $@.tmp <$*.ed
	mv $@.tmp $@

nfs_prot.x: ${NFSX} $*.ed
	cat ${NFSX} >$@.tmp
	ed -s $@.tmp <$*.ed
	mv $@.tmp $@