summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 4417423..ba12408 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@ BUILD_DIR := build
CFLAGS := -Wall -Wextra -pedantic -std=c11 -ggdb
SRCS := $(wildcard $(SRC_DIR)/*.c)
+HEADERS := $(wildcard $(SRC_DIR)/*.h)
OBJS := $(patsubst $(SRC_DIR)/%.c, $(BUILD_DIR)/%.o, $(SRCS))
.PHONY: all
@@ -15,6 +16,11 @@ $(TARGET): $(BUILD_DIR) $(OBJS)
$(BUILD_DIR):
@mkdir -p $@
+.PHONY: linter
+linter: $(SRCS) $(HEADERS)
+ clang-format --dry-run --Werror $?
+ $(MAKE) -C test linter
+
.PHONY: test
test: $(TARGET)
$(MAKE) -C test