-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (36 loc) · 1.37 KB
/
Makefile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# This is a template Makefile generated by rpcgen
# Parameters
CLIENT = fchan_client
SERVER = fchan_server
SOURCES_CLNT.c = fchan_client.c bchan_server.c
SOURCES_CLNT.h =
SOURCES_SVC.c = fchan_server.c
SOURCES_SVC.h =
SOURCES.x = fchan.x
SOURCES2.x = bchan.x
TARGETS_SVC.c = fchan_svc.c fchan_xdr.c bchan_xdr.c bchan_clnt.c
TARGETS_CLNT.c = fchan_clnt.c fchan_xdr.c bchan_svc.c bchan_xdr.c
TARGETS = fchan.h fchan_xdr.c fchan_clnt.c fchan_svc.c
OBJECTS_CLNT = $(SOURCES_CLNT.c:%.c=%.o) $(TARGETS_CLNT.c:%.c=%.o)
OBJECTS_SVC = $(SOURCES_SVC.c:%.c=%.o) $(TARGETS_SVC.c:%.c=%.o)
# Compiler flags
TIRPC = /home/matt/dev/nfs/new-tirpc/libtirpc-lbx
CPPFLAGS += -D_REENTRANT
CFLAGS += -g3 -O0 -I$(TIRPC)/tirpc/ -D_REENTRANT -DSWITCH_DIRECTION
LDLIBS += $(TIRPC)/src/.libs/libtirpc.a -lnsl -lpthread
RPCGENFLAGS = -C -M
# Targets
all : $(CLIENT) $(SERVER)
$(TARGETS) : $(SOURCES.x) $(SOURCES2.x)
# messy
#rpcgen $(RPCGENFLAGS) $(SOURCES.x)
#rpcgen $(RPCGENFLAGS) $(SOURCES2.x)
$(OBJECTS_CLNT) : $(SOURCES_CLNT.c) $(SOURCES_CLNT.h) $(TARGETS_CLNT.c)
$(OBJECTS_SVC) : $(SOURCES_SVC.c) $(SOURCES_SVC.h) $(TARGETS_SVC.c)
$(CLIENT) : $(OBJECTS_CLNT)
$(LINK.c) -o $(CLIENT) $(OBJECTS_CLNT) $(LDLIBS)
$(SERVER) : $(OBJECTS_SVC)
$(LINK.c) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS)
clean:
$(RM) core Makefile.fchan Makefile.bchan \
$(OBJECTS_CLNT) $(OBJECTS_SVC) $(CLIENT) $(SERVER)