Add install/uninstall

This commit is contained in:
Clortox 2021-07-25 22:54:20 -04:00
parent 0a2c76cc48
commit 58a995a8d8

View File

@ -18,16 +18,24 @@ SRC = $(shell find . -name '*.cpp')
OBJ = $(subst .cpp,.o,$(SRC))
BIN = ./bin
TARGET = $(BIN)/rss-cli
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
TARGET = rss-cli
all : $(OBJ)
$(CC) $(FLAGS) $(CFLAGS) -o $(TARGET) $(OBJ) $(LIBRARIES)
$(CC) $(FLAGS) $(CFLAGS) -o $(BIN)/$(TARGET) $(OBJ) $(LIBRARIES)
.cpp.o :
$(CC) $(FLAGS) $(CFLAGS) $(LIBRARIES) -c $< -o $@
install : all
mkdir -p $(PREFIX)/bin
cp -f $(BIN)/$(TARGET) $(PREFIX)/bin
chmod 755 $(PREFIX)/bin/$(TARGET)
uninstall :
rm -rf $(PREFIX)/bin/$(TARGET)
clean :
find . -type f -name '*.o' -delete