From c49f02d8d78850020c52b3a5ae404d2c2bde71aa Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Wed, 27 Mar 2024 06:39:47 +0100 Subject: [PATCH] Formatting target using clang-format --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index a793e04..712bf45 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,9 @@ BUILD_DIR := build # Source files SRCS := $(wildcard $(SRC_DIR)/*.c) +# Header files (used for formatting) +HEADERS := $(wildcard $(SRC_DIR)/*.h) + # Object files OBJS := $(patsubst $(SRC_DIR)/%.c,$(BUILD_DIR)/%.o,$(SRCS)) @@ -33,6 +36,9 @@ $(BUILD_DIR)/%.o: $(SRC_DIR)/%.c run: $(TARGET) ./$(TARGET) +fmt: + clang-format -i $(SRCS) $(HEADERS) + # Clean rule clean: rm -rf $(BUILD_DIR) $(TARGET)