xref: /freebsd/share/examples/sunrpc/msg/Makefile (revision e0c4386e)
1PACKAGE=examples
2FILESDIR=${SHAREDIR}/examples/sunrpc/msg
3BIN = printmsg msg_svc rprintmsg
4GEN = msg_clnt.c msg_svc.c msg.h
5LIB = -lrpclib
6RPCCOM = rpcgen
7
8all: $(BIN)
9
10#
11# This is the non-networked version of the program
12#
13printmsg: printmsg.o
14	$(CC) -o $@ printmsg.o
15
16#
17# note: no xdr routines are generated here, due this service's
18#       use of basic data types.
19#
20$(GEN): msg.x
21	$(RPCCOM) msg.x
22
23msg_svc: msg_proc.o msg_svc.o
24	$(CC) -o $@ msg_proc.o msg_svc.o $(LIB)
25
26rprintmsg: rprintmsg.o msg_clnt.o
27	$(CC) -o $@ rprintmsg.o msg_clnt.o $(LIB)
28
29rprintmsg.o: rprintmsg.c msg.h
30
31msg_proc.o: msg_proc.c msg.h
32
33clean cleanup:
34	rm -f $(GEN) *.o $(BIN)
35
36