-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (35 loc) · 1.16 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
surveyor:
gcc -Ideps -Ideps/cwalk -pthread main.c -o surveyor
debug:
gcc -Ideps -Ideps/cwalk -pthread -g main.c -o surveyor_debug;
gdb surveyor_debug;
local:
clib install;
gcc -Ideps -Ideps/cwalk -pthread main.c -o surveyor;
sudo rm -rf /usr/local/bin/surveyor;
sudo mv ./surveyor /usr/local/bin;
leak:
make clean;
make;
valgrind --leak-check=yes ./surveyor
test:
make clean;
cd ./tests; gcc -I../deps -I../deps/cwalk -I../modules tests.c -o all_tests.o -pthread -lcheck -lsubunit -lrt -lm; ./all_tests.o
rm -rf ./tests/getfilestest
clean:
rm -rf ./surveyor
rm -rf ./getfilestest
rm -rf ./tests/*.o
rm -rf ./tests/getfilestest
rm -rf ./tests/*.gcov
rm -rf ./tests/*.gcda
rm -rf ./tests/*.gcno
rm -rf ./tests/debug_tests
coverage:
make clean;
gcc -fprofile-arcs -ftest-coverage -Ideps -Ideps/cwalk -Imodules tests/tests.c -o tests/coverage.o -pthread -lcheck -lsubunit -lrt -lm; ./tests/coverage.o
mv ./tests.gcda ./tests; mv ./tests.gcno ./tests; cd tests; gcov tests.c
debugt:
make clean;
cd ./tests; gcc -I../deps -I../deps/cwalk -I../modules -g tests.c -o debug_tests -pthread -lcheck -lsubunit -lrt -lm; gdb debug_tests;
rm -rf ./tests/getfilestest