Introduced un-/install targets. DESTDIR should be empty by default.
This commit is contained in:
parent
85feeebd8c
commit
67513cc729
8
Makefile
8
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
|
Loading…
Reference in New Issue
Block a user