From 67513cc72979e6e7fc20bd5a526bcd3ce4d42fe8 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 1 Apr 2024 00:03:38 +0400 Subject: [PATCH] Introduced un-/install targets. DESTDIR should be empty by default. --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c3dc6c4..a547121 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ TARGET = tetatet CC = cc DESTDIR := -DESTDIR = / PREFIX := /usr/local SRC_DIR := src @@ -25,6 +24,13 @@ $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c | $(OBJ_DIR) $(OBJ_DIR): mkdir -p $@ +install: | $(TARGET) + strip tetatet + install -m0755 tetatet $(DESTDIR)$(PREFIX)/bin/tetatet + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/tetatet + clean: rm -f ${TARGET} rm -f obj/*.o \ No newline at end of file