1
0
Fork 0

Introduced un-/install targets. DESTDIR should be empty by default.

This commit is contained in:
Alexander Andreev 2024-04-01 00:03:38 +04:00
parent 85feeebd8c
commit 67513cc729
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34
1 changed files with 7 additions and 1 deletions

View File

@ -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