diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-10-18 00:23:30 +1100 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-10-18 00:23:30 +1100 |
commit | 5234133f2d55dc7f24eaa63b86e3952decaaba91 (patch) | |
tree | 01b4732ff6b1686f62cedcab5afe48092094784d /Makefile | |
parent | df81a840a5276c35df5f35d55610f1bf31487153 (diff) |
chore: format
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -18,6 +18,9 @@ EXAMPLES_DIR := examples SRCS := $(wildcard $(SRC_DIR)/*.c $(SRC_DIR)/**/*.c) OBJS := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRCS)) +# Format-able files +FORMAT_FILES := include/celeritas.h $(SRC_DIR)/*.c $(EXAMPLES_DIR)/*.c + # Shader files METAL_SHADERS := $(wildcard $(SHADER_DIR)/*.metal) METAL_AIR_FILES := $(patsubst $(SHADER_DIR)/%.metal,$(SHADER_OUT_DIR)/%.air,$(METAL_SHADERS)) @@ -85,6 +88,14 @@ cube: $(EXAMPLES_DIR)/cube.c $(SHARED_LIB) $(SHADER_OUT_DIR)/cube.air $(METAL_LI $(CC) $(CFLAGS) $(EXAMPLES_DIR)/cube.c -L$(BUILD_DIR) -lceleritas $(LDFLAGS) -o $(BUILD_DIR)/cube.bin MTL_DEBUG_LAYER=1 build/cube.bin +.PHONY: format +format: + clang-format -i $(FORMAT_FILES) + +.PHONY: tidy +tidy: + clang-tidy $(SRCS) $(EXAMPLES_DIR)/*.c -- $(CFLAGS) + .PHONY: clean clean: rm -rf $(BUILD_DIR) |