-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (46 loc) · 1.24 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
53
54
55
56
57
all: server tweakfs
clean:
# make -f Makefile.fuse_rpc clean
rm *.o
rm bbfs.log
rm -f fuse_rpc_client
rm -f fuse_rpc_server
rm -f tweakfs
rm -rf mountdir
rm -rf rootdir
create:
mkdir mountdir
mkdir rootdir
touch rootdir/secret.txt
touch rootdir/secret_file.txt
touch rootdir/bogus.txt
echo "hello world" > rootdir/bogus.txt
echo "secret" > rootdir/secret.txt
echo "secret_file" > rootdir/secret_file.txt
mkdir rootdir/testdir
header: fuse_rpc.x
# rpcgen -M -a -C fuse_rpc.x
rpcgen -M fuse_rpc.x
server: fuse_rpc.h fuse_rpc_svc.c fuse_rpc_server.c fuse_rpc_xdr.c fuse_rpc_clnt.c
gcc -g3 -pthread fuse_rpc_svc.c fuse_rpc_server.c fuse_rpc_xdr.c fuse_rpc_clnt.c -o fuse_rpc_server
tweakfs: tweakfs.c log.c fuse_rpc_clnt.o fuse_rpc_xdr.o
gcc -g3 -pthread $^ `pkg-config fuse --cflags --libs` -o $@
mount:
./tweakfs -d -s rootdir/ mountdir/ localhost
# ./tweakfs rootdir/ mountdir/ localhost
debug:
# valgrind ./tweakfs -d -s rootdir/ mountdir localhost
valgrind ./tweakfs -d -s rootdir/ mountdir 67.159.88.71 10.148.54.200
unmount:
fusermount -u mountdir
rpc:
# rpcgen -a -C fuse_rpc.x
make -f Makefile.fuse_rpc
run_server:
sudo ./fuse_rpc_server
# sudo ./fuse_rpc_server 2>/dev/null
new:
make unmount
make clean
make
make create