From 921125c7b27db59cd0a1c637637924c3dc3c05b2 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Sun, 8 Nov 2026 02:30:58 +0800 Subject: [mubios] Add Clang Format based on GNU style Signed-off-by: Richard Qin --- mubios/.clang-format | 1 + mubios/Makefile | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 mubios/.clang-format (limited to 'mubios') diff --git a/mubios/.clang-format b/mubios/.clang-format new file mode 100644 index 0000000..a6cc54a --- /dev/null +++ b/mubios/.clang-format @@ -0,0 +1 @@ +BasedOnStyle: GNU diff --git a/mubios/Makefile b/mubios/Makefile index df74430..bd5a934 100644 --- a/mubios/Makefile +++ b/mubios/Makefile @@ -38,7 +38,7 @@ S_SRCS := $(wildcard arch/*.S) OBJS := $(patsubst %.c,$(BUILD_DIR)/%.o,$(C_SRCS)) \ $(patsubst %.S,$(BUILD_DIR)/%.o,$(S_SRCS)) -.PHONY: all elf rom +.PHONY: all elf rom format all: $(ROM) @@ -46,6 +46,9 @@ elf: $(ELF) rom: $(ROM) +format: + clang-format -i $(C_SRCS) $(wildcard include/*.h) + $(ELF): $(OBJS) linker.ld @mkdir -p $(dir $@) $(LD) $(LDFLAGS) -o $@ $(OBJS) -- cgit v1.2.3