-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
57 lines (45 loc) · 1.25 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
default: fast
# execname is the name of the current directory
execname=$(shell basename "$(shell pwd)")
compile:
[ -d build ] || mkdir build
(cd build; cmake -DCMAKE_BUILD_TYPE=Release -DGTEST=FALSE ..; make -j8)
release:
rm -rf build
mkdir build
(cd build; cmake -DCMAKE_BUILD_TYPE=Release -DGTEST=FALSE ..; make -j8)
.PHONY: build
debug:
rm -rf build
mkdir build
(cd build; cmake -DCMAKE_BUILD_TYPE=Debug -DGTEST=FALSE ..; scan-build -V make -j8)
run:
[ -d build ] || mkdir build
(cd build; cmake -DCMAKE_BUILD_TYPE=Debug -DGTEST=FALSE ..; make -j8)
bin/$(execname)
fast:
[ -d build ] || mkdir build
(cd build; cmake -DCMAKE_BUILD_TYPE=Release -DGTEST=FALSE ..; make -j8)
bin/$(execname)
.PHONY: test
test:
[ -d build ] || mkdir build
(cd build; cmake -DCMAKE_BUILD_TYPE=Debug -DGTEST=TRUE ..; make -j8)
bin/test
time:
[ -d build ] || mkdir build
(cd build; cmake -DCMAKE_BUILD_TYPE=Release -DGTEST=TRUE ..; make -j8)
bin/test
gdb: debug
gdb -q -ex run --args bin/$(execname)
clean:
rm -rf build
install: release
cp bin/kedit ~/bin/kedit
[ -d ~/bin/fonts ] || mkdir ~/bin/fonts
cp fonts/SourceCodePro-Regular.ttf ~/bin/fonts
.PHONY: profile
profile:
valgrind --tool=callgrind bin/$(execname)
kcachegrind callgrind.out.*
rm -f callgrind.out.*