aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorVerdant <im@verdant.ee>2026-05-17 22:13:45 +0800
committerVerdant <im@verdant.ee>2026-05-17 22:13:45 +0800
commit7b997e7ccfc3b33098868baf6d1835cc69f49fb4 (patch)
treee32f33ae5446fdbd64a537d679148265ed935ff7 /Makefile
parent30058a64fdf4c79c646b8f01a827bd5428dbff13 (diff)
downloadkl-7b997e7ccfc3b33098868baf6d1835cc69f49fb4.tar.gz
kl-7b997e7ccfc3b33098868baf6d1835cc69f49fb4.zip
Add install to Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index aee8c95..b7e7eac 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,9 @@
+$(TARGET): $(SRCS)
+ $(CC) $(CFLAGS) -o $(TARGET) $(SRCS)
+
+TARGET = kl
+SRCS = main.c
+
kl: main.o config.o
gcc main.o config.o -o kl
@@ -10,3 +16,9 @@ config.o: config.c config.h
clean:
rm -rf *.o kl
+all: $(TARGET)
+
+install:
+ install -d $(DESTDIR)$(PREFIX)/bin
+
+ install -m 755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)