This repository has been archived by the owner on Feb 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
81 lines (66 loc) · 2.18 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
# Simple Makefile to compile, clean and format all the C++ code contained in the
# repository.
default: all
all: compile
bear: clean compile
compile:
+$(MAKE) $@ -C src -f Makefile
+$(MAKE) $@ -C include -f Makefile
+$(MAKE) $@ -C benchmarks -f Makefile
clean:
+$(MAKE) $@ -C src -f Makefile clean
+$(MAKE) $@ -C include -f Makefile clean
+$(MAKE) $@ -C benchmarks -f Makefile clean
@find . -type f \( -name '*~' -o -name 'a.out' -name '*.x' \) -exec rm '{}' \;
format:
+make clangify
+$(MAKE) $@ -C src
+$(MAKE) $@ -C include
+$(MAKE) $@ -C benchmarks
+make clangify-revert
clangify:
+find . -type d -exec cp -f "./.clang-format" {} \;
docs: ./doc/doxy.in
doxygen $^
clangify-revert:
+cp -f ./.clang-format ./.clang-format-backup
+find . -type d -exec rm -R -f {}/./.clang-format \;
+mv -f ./.clang-format-backup ./.clang-format
# May not work if you don't have the right files/tools/executables in-place...
pvsrun:
+rm -f ./compile_commands.json
+bear make bear
+make clean
+rm -f ./project.log
+rm -f ./project.tasks
+rm -f ./strace_out
+pvsdeploy add ./
+pvs-studio-analyzer trace -- make bear
+pvs-studio-analyzer analyze -o ./project.log -j4
+plog-converter -a GA:1,2 -t tasklist -o ./project.tasks ./project.log
+pvsdeploy rem ./
# Just like the one above, but working only if you have a "real" license. Avoids some "jumping through hoops of fire", OTOH.
# May not work if you don't have the right files/tools/executables in-place...
pvsrun-compliant:
+rm -f ./compile_commands.json
+bear make bear
+make clean
+rm -f ./project.log
+rm -f ./project.tasks
+rm -f ./strace_out
+pvs-studio-analyzer trace -- make bear
+pvs-studio-analyzer analyze -o ./project.log -j4
+plog-converter -a GA:1,2 -t tasklist -o ./project.tasks ./project.log
# May not work if you don't have the right files/tools/executables in-place...
bear-aio:
+make clean
+bear make bear
+make clean
# May not work if you don't have the right files/tools/executables in-place...
clean-all:
+make clean
+rm -f ./project.log
+rm -f ./project.tasks
+rm -f ./strace_out
+pvsdeploy rem ./
.PHONY: all bear compile clean format default clangify clangify-revert pvsrun bear-aio clean-all pvsrun-compliant docs