-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
53 lines (35 loc) · 1.03 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
OBJS := main.o unit.o Hero.o JSON.o
CC := g++-10
CFLAGS := -Wall -std=c++17
run_cpps: $(OBJS)
$(CC) $(CFLAGS) -o a.out $(OBJS)
Hero.o: Hero.cpp Hero.h JSON.h
$(CC) $(CFLAGS) -c Hero.cpp
unit.o: unit.cpp unit.h JSON.h
$(CC) $(CFLAGS) -c unit.cpp
JSON.o: JSON.h
$(CC) $(CFLAGS) -c JSON.cpp
main.o: main.cpp Hero.h Monster.h JSON.h map.h Mmap.h
$(CC) $(CFLAGS) -c main.cpp
Install_Valgrind_and_Cppcheck:
sudo apt-get install -y valgrind cppcheck
Warnings:
cppcheck *.cpp --enable=warning --error-exitcode=1
Report_generation:
cppcheck *.cpp --enable=performance --enable=style --output-file=report.txt
Check_mem_leak:
cat steps.txt | valgrind --error-exitcode=1 --leak-check=full ./a.out prepared.json
Run_tests:
bash -c "./testing.sh"
Check_differences:
diff output.txt exp_output.txt
Build:
cmake unit_test/CMakeLists.txt && make -C unit_test/
Run_tests2:
cd unit_test/ && ./runTests
Install_doxygen:
sudo apt-get install doxygen
Install_graphviz:
sudo apt-get install graphviz
Creating_documentation:
doxygen doxconf