-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (18 loc) · 834 Bytes
/
Makefile
File metadata and controls
24 lines (18 loc) · 834 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
# Convenience commands / scripts.
help:
@echo "\033[0;1mCommands\033[0m"
@grep -E '^[.a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[34;1m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: help
setup-clang-tools: ## Sets up compilation database for clang tools. Assumes a build has already been run.
ln -s build/compile_commands.json
.PHONY: setup-clang-tools
SOURCE_FILES = $(shell find ./src ./include -type f -regextype posix-extended -regex '.*\.(cpp|h)')
lint: ## Run clang-tidy on all source files.
clang-tidy $(SOURCE_FILES)
.PHONY: lint
format: ## Run clang-format on all source files and fix in-place.
clang-format -i $(SOURCE_FILES)
.PHONY: format
check-format: ## Run scripts/check-format.sh on source files.
@bash scripts/check-format.sh $(SOURCE_FILES)
.PHONY: check-format