From a4697b6c2a4b3f40576238291abf8080da9f9754 Mon Sep 17 00:00:00 2001 From: verdant Date: Tue, 19 May 2026 23:59:04 +0800 Subject: Add `make format`, modify source files list --- Makefile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b7e7eac..0a0f1a5 100644 --- a/Makefile +++ b/Makefile @@ -4,14 +4,8 @@ $(TARGET): $(SRCS) TARGET = kl SRCS = main.c -kl: main.o config.o - gcc main.o config.o -o kl - -main.o: main.c config.h - gcc -c main.c - -config.o: config.c config.h - gcc -c config.c +kl: *.c + gcc *.c -o kl clean: rm -rf *.o kl @@ -22,3 +16,6 @@ install: install -d $(DESTDIR)$(PREFIX)/bin install -m 755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET) + +format: + clang-format -i *.c *.h -- cgit v1.2.3