chore: switch to defualt clang-format formatting

This commit is contained in:
Jef Roosens 2023-01-18 11:38:34 +01:00
parent 4d72e60515
commit be97472dcc
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
4 changed files with 319 additions and 314 deletions

View file

@ -5,6 +5,7 @@ SRC_DIR ?= src
INC_DIRS ?= include
SRCS != find '$(SRC_DIR)' -iname '*.c'
SRCS_H != find $(INC_DIRS) -iname '*.h'
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
DEPS := $(SRCS:%=$(BUILD_DIR)/%.d)
@ -32,6 +33,15 @@ $(BUILD_DIR)/%.c.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
# =====MAINTENANCE=====
.PHONY: lint
lint:
clang-format -n --Werror $(SRCS) $(SRCS_H)
.PHONY: fmt
fmt:
clang-format -i $(SRCS) $(SRCS_H)
.PHONY: clean
clean:
rm -rf $(BUILD_DIR)