-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
83 lines (62 loc) · 2.97 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
82
83
default: help
help: # with thanks to Ben Rady
@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: build
build: debug ## build in debug mode
build/configured-debug:
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCPPTRACE_UNWIND_WITH_LIBUNWIND=On
rm -f build/configured-release
touch build/configured-debug
build/configured-debug-arm64:
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCPPTRACE_UNWIND_WITH_LIBUNWIND=On -DARCH=aarch64
rm -f build/configured-release-arm64
touch build/configured-debug-arm64
build/configured-debug-arm64-mac:
CXXFLAGS="-D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE" cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCPPTRACE_UNWIND_WITH_LIBUNWIND=On -DARCH=aarch64
rm -f build/configured-release-arm64-mac
touch build/configured-debug-arm64-debug
build/configured-release:
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCPPTRACE_UNWIND_WITH_LIBUNWIND=On
rm -f build/configured-debug
touch build/configured-release
build/configured-release-arm64:
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCPPTRACE_UNWIND_WITH_LIBUNWIND=On -DARCH=aarch64
rm -f build/configured-debug-arm64
touch build/configured-release-arm64
build/configured-release-arm64-mac:
CXXFLAGS="-D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE" cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCPPTRACE_UNWIND_WITH_LIBUNWIND=On -DARCH=aarch64
rm -f build/configured-debug-arm64-mac
touch build/configured-release-arm64-mac
.PHONY: configure-debug
configure-debug: build/configured-debug
.PHONY: configure-debug-arm64
configure-debug-arm64: build/configured-debug-arm64
.PHONY: configure-debug-arm64-mac
configure-debug-arm64-mac: build/configured-debug-arm64-mac
.PHONY: configure-release
configure-release: build/configured-release
.PHONY: configure-release-arm64
configure-release-arm64: build/configured-release-arm64
.PHONY: configure-release-arm64-mac
configure-release-arm64-mac: build/configured-release-arm64-mac
.PHONY: debug
debug: configure-debug ## build in debug mode
cmake --build build
.PHONY: debug-arm64
debug-arm64: configure-debug-arm64 ## build in debug mode
cmake --build build
.PHONY: debug-arm64-mac
debug-arm64-mac: configure-debug-arm64-mac ## build in release mode (with debug info)
cmake --build build
.PHONY: release
release: configure-release ## build in release mode (with debug info)
cmake --build build
.PHONY: release-arm64
release-arm64: configure-release-arm64 ## build in release mode (with debug info)
cmake --build build
.PHONY: release-arm64-mac
release-arm64-mac: configure-release-arm64-mac ## build in release mode (with debug info)
cmake --build build
.PHONY: clean
clean: ## clean
rm -rf build