-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (20 loc) · 695 Bytes
/
Makefile
File metadata and controls
26 lines (20 loc) · 695 Bytes
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
# .PHONY is needed so that make reruns the command. Without .PHONY, make will assume the
# command name corresponds to a file name and if the file/dir exists will not rerun the command.
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
EXECUTABLE=build/src/pgdb
PROG_TO_DEBUG=build/src/samples/hello.tsk
.PHONY: build
build:
mkdir build || cd build && cmake .. && cmake --build .
.PHONY: debug
debug:
$(EXECUTABLE) $(PROG_TO_DEBUG)
.PHONY: gdb
gdb:
gdb --args $(EXECUTABLE) $(PROG_TO_DEBUG)
.PHONY: clean
clean:
rm -rf build
.PHONY: format
format:
clang-format -i -style="{IndentWidth: 4,TabWidth: 4, ColumnLimit: 0}" $$(find src -type f -regex ".*\.\(cpp\|h\)")