summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorwrmr2024-11-06 00:07:04 -0500
committerwrmr2024-11-06 00:07:04 -0500
commit9ce98ce7693101717d9fb9d7e34db9fb664535e1 (patch)
tree7d4f289b140a7982b64ec8f8159312570f32e069 /Makefile
parentc38691b0001b477e2915ea90971e2ebc76e854ad (diff)
add install target
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5da7d55..4c0053c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,20 @@
 EXE = wlb
 OBJ != find -type f -name '*.c' | sed 's/\.c$$/.o/'
 CFLAGS = -Wall -Wpedantic -std=c17 -Os
+PREFIX ?= ${HOME}
 LDFLAGS = -s
 
-.PHONY: run all clean
+.PHONY: run all clean install
 
 all: ${EXE}
 run: ${EXE}
 	./${EXE}
+
 clean:
 	rm ${EXE} ${OBJ}
 
 ${EXE}: ${OBJ}
 	${CC} ${OBJ} -o ${EXE} ${LDFLAGS}
+
+install: ${EXE}
+	mv ${EXE} ${PREFIX}/bin/${EXE}