aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorverdant <i@glowisle.me>2026-05-19 23:59:04 +0800
committerverdant <i@glowisle.me>2026-05-19 23:59:04 +0800
commita4697b6c2a4b3f40576238291abf8080da9f9754 (patch)
treee652f0387c12dc17a1fcf644515876afecfca0a1 /Makefile
parente5da5e407894242a7dca9d390a12edfbb5ade0a6 (diff)
downloadkl-a4697b6c2a4b3f40576238291abf8080da9f9754.tar.gz
kl-a4697b6c2a4b3f40576238291abf8080da9f9754.zip
Add `make format`, modify source files list
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 5 insertions, 8 deletions
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