-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (53 loc) · 1.21 KB
/
Makefile
File metadata and controls
75 lines (53 loc) · 1.21 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
LIB = `pkg-config fuse --libs`
CFLAGS = `pkg-config fuse --cflags` -Wall
TAR = dnfs-mount dnfs-server dnfs-node
all: $(TAR)
#build dnfs-mount
dnfs-mount: cs_clnt.o cs_xdr.o co_xdr.o co_clnt.o \
client.o fs.o cache.o common.o
cc -o $@ $^ $(LIB) -g
client.o: client.c client.h
cc -c $<
fs.o: fs.c
cc -c $< $(CFLAGS)
cache.o: cache.c cache.h
cc -c $<
#build dnfs-server
dnfs-server: cs_svc.o cs_xdr.o \
server.o wrapper.o manage.o common.o
cc -o $@ $^ -l pthread -g -lcrypt
server.o: server.c server.h
cc -c $<
manage.o: manage.c server.h
cc -c $<
#build dnfs-node
dnfs-node: co_xdr.o co_clnt.o co_svc.o cs_clnt.o cs_xdr.o \
storage.o wrapper.o heart.o common.o
cc -o $@ $^ -lpthread
heart.o: heart.c storage.h
cc -c $<
storage.o: storage.c storage.h
cc -c $<
#common targets
common.o: common.c common.h
cc -c $<
wrapper.o: wrapper.c wrapper.h
cc -c $<
cs_clnt.o: cs_clnt.c cs.h
cc -c $<
cs_xdr.o: cs_xdr.c cs.h
cc -c $<
cs_svc.o: cs_svc.c cs.h
cc -c $<
co_clnt.o: co_clnt.c co.h
cc -c $<
co_xdr.o: co_xdr.c co.h
cc -c $<
co_svc.o: co_svc.c co.h
cc -c $<
#make install
install:
cp TAR /usr/bin
clean:
rm *.o
rm $(TAR)