-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (41 loc) · 1.25 KB
/
Copy pathMakefile
File metadata and controls
54 lines (41 loc) · 1.25 KB
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
DEBUG_DIR=build/Debug
RELEASE_DIR=build/Release
.PHONY: build
build: all
.PHONY: run
run: run_demo_random
.PHONY: all
all: debug release
.PHONY: run_demo_random
run_demo_random: all
$(DEBUG_DIR)/demo/libdog_random_demo
.PHONY: run_demo_usage
run_demo_usage: all
$(DEBUG_DIR)/demo/libdog_usage_demo
.PHONY: runvalgrind
runvalgrind: all
valgrind --track-fds=yes --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt $(DEBUG_DIR)/demo/libdog_demo
.PHONY: release
release:
cmake -B$(RELEASE_DIR) -H. -DCMAKE_BUILD_TYPE=Release
cmake --build $(RELEASE_DIR)
.PHONY: debug
debug:
cmake -B$(DEBUG_DIR) -H. -DCMAKE_BUILD_TYPE=Debug
cmake --build $(DEBUG_DIR)
.PHONY: clean
clean:
rm -rf $(DEBUG_DIR)
rm -rf $(RELEASE_DIR)
.PHONY: test
test: debug
$(DEBUG_DIR)/libdog_test --gtest_break_on_failure --gtest_filter=-Performance.*
.PHONY: test_notation
test_notation: debug
$(DEBUG_DIR)/libdog_test --gtest_break_on_failure --gtest_filter=NotationParsing.*
.PHONY: test_perf
test_perf: release
$(RELEASE_DIR)/libdog_test --gtest_break_on_failure --gtest_filter=Performance.*
.PHONY: callgrind
callgrind: release
valgrind --tool=callgrind $(RELEASE_DIR)/libdog_test --gtest_break_on_failure --gtest_filter=Performance.FullGame