1 # This is a template Makefile generated by rpcgen 2 3 # Parameters 4 5 CLIENT = rdict_client 6 SERVER = rdict_server 7 8 SOURCES_CLNT.c = 9 SOURCES_CLNT.h = 10 SOURCES_SVC.c = 11 SOURCES_SVC.h = 12 SOURCES.x = rdict.x 13 14 TARGETS_SVC.c = rdict_svc.c rdict_xdr.c rdict_srv_func.c 15 TARGETS_CLNT.c = rdict_clnt.c rdict_xdr.c rdict_client.c 16 TARGETS = rdict.h rdict_xdr.c rdict_clnt.c rdict_svc.c 17 18 OBJECTS_CLNT = $(SOURCES_CLNT.c:%.c=%.o) $(TARGETS_CLNT.c:%.c=%.o) 19 OBJECTS_SVC = $(SOURCES_SVC.c:%.c=%.o) $(TARGETS_SVC.c:%.c=%.o) 20 # Compiler flags 21 22 CFLAGS += -g 23 LDLIBS += -lnsl 24 RPCGENFLAGS = 25 26 # Targets 27 28 all : $(CLIENT) $(SERVER) 29 30 $(TARGETS) : $(SOURCES.x) 31 rpcgen $(RPCGENFLAGS) $(SOURCES.x) 32 33 $(OBJECTS_CLNT) : $(SOURCES_CLNT.c) $(SOURCES_CLNT.h) $(TARGETS_CLNT.c) 34 35 $(OBJECTS_SVC) : $(SOURCES_SVC.c) $(SOURCES_SVC.h) $(TARGETS_SVC.c) 36 37 $(CLIENT) : $(OBJECTS_CLNT) 38 $(LINK.c) -o $(CLIENT) $(OBJECTS_CLNT) $(LDLIBS) 39 40 $(SERVER) : $(OBJECTS_SVC) 41 $(LINK.c) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS) 42 43 clean: 44 $(RM) core $(TARGETS) $(OBJECTS_CLNT) $(OBJECTS_SVC) $(CLIENT) $(SERVER) *~