xref: /dragonfly/share/examples/sunrpc/sort/Makefile (revision e970d7d8)
1#
2# @(#)Makefile	2.1 88/08/11 4.0 RPCSRC
3#
4
5BIN =  rsort sort_svc
6GEN = sort_clnt.c sort_svc.c sort_xdr.c sort.h
7LIB = -lrpclib
8RPCCOM = rpcgen -Y "${OBJFORMAT_PATH}/usr/bin"
9
10all: $(BIN)
11
12rsort: rsort.o sort_clnt.o sort_xdr.o
13	$(CC) $(LDFLAGS) -o $@ rsort.o sort_clnt.o sort_xdr.o $(LIB)
14
15rsort.o: rsort.c sort.h
16
17sort_clnt.c:
18	$(RPCCOM) -l sort.x >$@
19
20sort_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
23sort_proc.o: sort_proc.c sort.h
24
25sort_svc.c:
26	$(RPCCOM) -s udp sort.x >$@
27
28sort_xdr.c:
29	$(RPCCOM) -c sort.x >$@
30
31sort.h:
32	$(RPCCOM) -h sort.x >$@
33
34clean cleanup:
35	rm -f $(GEN) *.o $(BIN)
36
37