chore: clean up makefiles a bit

This commit is contained in:
Jef Roosens 2023-11-18 21:36:08 +01:00
parent d2afb98268
commit 9c387937ef
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
3 changed files with 25 additions and 7 deletions

View file

@ -97,6 +97,20 @@ lint:
fmt:
clang-format -i $(SRCS) $(SRCS_H) $(SRCS_H_INTERNAL) $(SRCS_EXAMPLE)
.PHONY: check
check:
mkdir -p $(BUILD_DIR)/cppcheck
cppcheck \
$(addprefix -I,$(INC_DIRS)) \
--cppcheck-build-dir=$(BUILD_DIR)/cppcheck \
--error-exitcode=1 \
--enable=warning,style \
--inline-suppr \
--check-level=exhaustive \
--quiet \
-j$(shell nproc) \
$(SRCS)
.PHONY: clean
clean:
rm -rf $(BUILD_DIR)