1
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

View File

@ -3,7 +3,6 @@ TARGET = tetatet
CC = cc CC = cc
DESTDIR := DESTDIR :=
DESTDIR = /
PREFIX := /usr/local PREFIX := /usr/local
SRC_DIR := src SRC_DIR := src
@ -25,6 +24,13 @@ $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c | $(OBJ_DIR)
$(OBJ_DIR): $(OBJ_DIR):
mkdir -p $@ mkdir -p $@
install: | $(TARGET)
strip tetatet
install -m0755 tetatet $(DESTDIR)$(PREFIX)/bin/tetatet
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/tetatet
clean: clean:
rm -f ${TARGET} rm -f ${TARGET}
rm -f obj/*.o rm -f obj/*.o