-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·98 lines (59 loc) · 3.51 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#PATH=/http/fs.lightdesktop.com/root/buildroot-2009.05/build_i686/staging_dir/usr/bin/:/usr/bin/:/bin/:/sbin:/usr/sbin
PATH=/root/buildroot-2009.05/build_i686/staging_dir/usr/bin/:/usr/bin/:/bin/:/sbin:/usr/sbin
gcc=i686-linux-uclibc-gcc
CFLAGS=-D_FILE_OFFSET_BITS=64 -g -O2
#only want this for the Static builds, not the regular Dynamic ones.
#SILENCE=-DSHUTUP
# Silly. I just changed the Make rules so this shouldn't have to be messed with anymore. I'm leaving it here anyways.
SILENCE=
.PHONY: ALL testdriven clean
ALL: crestfs
crestfs: crestfs.static crestfs.dynamic
cp crestfs.static crestfs
crestfs.memtest: Makefile crestfs.memtest.o
gcc $(CFLAGS) -Wall -Werror -o crestfs.memtest crestfs.memtest.o -lfuse -ldl -lpthread -lrt
crestfs.memtest.o: Makefile crestfs.c
gcc -Wall -W -Werror -c $(CFLAGS) -DMEMTEST -o crestfs.memtest.o crestfs.c
memtest: crestfs.memtest
export MALLOC_TRACE=/tmp/memlog
./crestfs.memtest /tmp/doodle /tmp/cachetest 60 -s -d -f
crestfs.static: Makefile crestfs.static.o resource.static.o common.static.o http.static.o
$(gcc) -g $(CFLAGS) -DSHUTUP -static -Wall -Werror -o crestfs.static crestfs.static.o resource.static.o common.static.o http.static.o libfuse.a -lpthread -ldl -lcrypt
crestfs.static.o: crestfs.c Makefile common.h http.h
$(gcc) -DSHUTUP -g -Wall -W -Werror -idirafter /usr/include/fuse -c $(CFLAGS) -o crestfs.static.o crestfs.c
resource.static.o: resource.c resource.h Makefile common.h
$(gcc) -DSHUTUP -g -Wall -W -Werror -idirafter /usr/include/fuse -c $(CFLAGS) -o resource.static.o resource.c
common.static.o: common.c common.h Makefile http.h
$(gcc) -DSHUTUP -g -Wall -W -Werror -idirafter /usr/include/fuse -c $(CFLASG) -o common.static.o common.c
http.static.o: http.c http.h Makefile
$(gcc) -DSHUTUP -g -Wall -W -Werror -idirafter /usr/include/fuse -c $(CFLASG) -o http.static.o http.c
crestfs.dynamic: crestfs.o resource.o common.o Makefile http.o
#diet ld -static -o crestfs crestfs.o libfuse.a -lc -lpthread -ldl
gcc -g -pg -Wall -Werror -o crestfs.dynamic crestfs.o resource.o common.o http.o -lfuse -lcrypt -lpthread
#gcc -static -g -Wall -Werror -o crestfs.static crestfs.o -lfuse
crestfs.o: crestfs.c Makefile http.h common.h
#diet gcc -g -Wall -Werror -c -o crestfs.o crestfs.c
gcc $(CFLAGS) $(SILENCE) -pg -Wall -W -Werror -c -o crestfs.o crestfs.c
resource.o: resource.h resource.c Makefile
gcc $(CFLAGS) $(SILENCE) -pg -Wall -W -Werror -c -o resource.o resource.c
common.o: common.c common.h resource.h Makefile http.h
gcc $(CFLAGS) $(SILENCE) -pg -Wall -W -Werror -c -o common.o common.c
http.o: http.c http.h Makefile
gcc $(CFLAGS) $(SILENCE) -pg -Wall -W -Werror -c -o http.o http.c
test: crestfs.static
#umount /tmp/doodle
mkdir -p /tmp/doodle
mkdir -p /tmp/cachetest
strace -o /tmp/straceo ./crestfs.static /tmp/doodle /tmp/cachetest 60 -s -d -f 1> /tmp/1.out 2> /tmp/2.out
#ulimit ?
debug: crestfs.static
gdb --args ./crestfs.static /tmp/doodle /tmp/cachetest 60 -s -d -f
testdriven: crestfs.testframework
cd /tmp/crestotesto && ~/universix/CREST-fs/crestfs.testframework /desk.nu/testdir HEAD
cd /tmp/crestotesto && gdb --args ~/universix/CREST-fs/crestfs.testframework /desk.nu/testdir/stupid/dumb/weird GET
cd ~/universix/CREST-fs
crestfs.testframework: crestfs.c Makefile
$(gcc) -g -Wall -Werror -idirafter /usr/include/fuse -c -DTESTFRAMEWORK -o crestfs.testframework.o crestfs.c
$(gcc) -static -g -Wall -Werror -o crestfs.testframework crestfs.testframework.o libfuse.a -lpthread -ldl
clean:
rm *.o crestfs.static crestfs.dynamic crestfs