From 8aa17b12f29536ea9c8b6ca22c7f153e8d90fa3b Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 10 Apr 2022 15:39:41 +0300 Subject: add clang format and run it --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 182e97d..0ef7a60 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ CROSS_COMPILE ?= $(ARCH)-unknown-elf OBJCOPY != [ $(LLVM) ] \ && echo llvm-objcopy \ - || echo $(CROSS_COMPILE)-objcopy + || echo $(CROSS_COMPILE)-objcopy COMPILER != [ $(LLVM) ] \ && echo clang --target="$(CROSS_COMPILE)" \ @@ -82,6 +82,10 @@ kernel.bin: kernel.elf apos.bin: init.bin kernel.bin cat init.bin kernel.bin > apos.bin +format: + find arch lib common include -iname '*.[ch]' \ + -exec clang-format -i -style=file {} \; + clean: $(RM) -r $(CLEANUP) -- cgit v1.3