From 8fa90e10b140fe05c444d05837a7dc620818d62c Mon Sep 17 00:00:00 2001 From: Lorenzo Torres Date: Mon, 3 Nov 2025 23:36:06 +0100 Subject: [PATCH] added posix indent configuration and indent make target --- .indent.pro | 14 ++++++++++++++ makefile | 14 +++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 .indent.pro diff --git a/.indent.pro b/.indent.pro new file mode 100644 index 0000000..9e47970 --- /dev/null +++ b/.indent.pro @@ -0,0 +1,14 @@ +-i8 +-ts8 +-ut +-brf +-lp +-ce +-npcs +-ncs +-l80 +-cd33 +-nip +-npsl +-di1 +-ldi1 diff --git a/makefile b/makefile index faede51..7833f41 100644 --- a/makefile +++ b/makefile @@ -12,9 +12,9 @@ SRC:=\ core/vector.c\ ifeq (${GRAPHICS_BACKEND},gl) - SRC += gl/gl.c\ - gl/platform.c\ - gl/renderer.c + SRC += gl/gl.c\ + gl/platform.c\ + gl/renderer.c endif ifeq (${GRAPHICS_BACKEND},vk) SRC += vk/platform.c\ @@ -35,3 +35,11 @@ all: ${OBJ} .PHONY: clean clean: @rm -rfv ${OBJ} topaz + +INDENTABLE := $(shell find . -name "*.c" -o -name "*.h") +INDENTABLE := $(filter-out ./gl/gl.h,$(INDENTABLE)) +INDENTABLE := $(filter-out ./rgfw.h,$(INDENTABLE)) +indent: $(INDENTABLE:%=%.indent) + +%.indent: % + indent $<