]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/examples/sunrpc/sort/Makefile
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / share / examples / sunrpc / sort / Makefile
1 #
2 # @(#)Makefile  2.1 88/08/11 4.0 RPCSRC
3 #
4
5 BIN =  rsort sort_svc
6 GEN = sort_clnt.c sort_svc.c sort_xdr.c sort.h
7 LIB = -lrpclib
8 RPCCOM = rpcgen
9
10 all: $(BIN)
11
12 rsort: rsort.o sort_clnt.o sort_xdr.o
13         $(CC) $(LDFLAGS) -o $@ rsort.o sort_clnt.o sort_xdr.o $(LIB)
14
15 rsort.o: rsort.c sort.h
16
17 sort_clnt.c:
18         $(RPCCOM) -l sort.x >$@
19
20 sort_svc: sort_proc.o sort_svc.o sort_xdr.o
21         $(CC) $(LDFLAGS) -o $@ sort_proc.o sort_svc.o sort_xdr.o $(LIB)
22
23 sort_proc.o: sort_proc.c sort.h
24
25 sort_svc.c:
26         $(RPCCOM) -s udp sort.x >$@
27
28 sort_xdr.c:
29         $(RPCCOM) -c sort.x >$@
30
31 sort.h:
32         $(RPCCOM) -h sort.x >$@
33
34 clean cleanup:
35         rm -f $(GEN) *.o $(BIN)
36