changeset 1:6428879e8e51 main tip

Added more targets and vars for (un)install
author luxanna <l.lux@magenta.de>
date Thu, 14 May 2026 23:18:28 +0200
parents 8376aa48453d
children
files Makefile
diffstat 1 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Wed May 13 22:02:23 2026 +0200
+++ b/Makefile	Thu May 14 23:18:28 2026 +0200
@@ -1,8 +1,25 @@
+.POSIX:
+.SUFFIXES:
+HARE=hare
+HAREFLAGS=
+
 TARGET=hg-wolp
+LIBS=termbox
+PREFIX=/usr/local
+DESTDIR=$(PREFIX)/bin
+LIBRARY_PATH=$(PREFIX)/lib/
 
 build:
 	mkdir -p bin
-	hare build -o bin/${TARGET} -ltermbox cmd/"${TARGET}.ha"
+	${HARE} build -o bin/${TARGET} -L${LIBRARY_PATH} -l${LIBS} cmd/"${TARGET}.ha"
 
 clean:
-	rm -rf bin
\ No newline at end of file
+	rm -rf bin
+
+install: build
+	install -m655 bin/${TARGET} ${DESTDIR}
+
+uninstall:
+	rm "$(DESTDIR)/$(TARGET)"
+
+.PHONY: build clean install uninstall