Add install/uninstall
This commit is contained in:
parent
0a2c76cc48
commit
58a995a8d8
12
Makefile
12
Makefile
@ -18,16 +18,24 @@ SRC = $(shell find . -name '*.cpp')
|
|||||||
OBJ = $(subst .cpp,.o,$(SRC))
|
OBJ = $(subst .cpp,.o,$(SRC))
|
||||||
BIN = ./bin
|
BIN = ./bin
|
||||||
|
|
||||||
TARGET = $(BIN)/rss-cli
|
PREFIX = /usr/local
|
||||||
|
MANPREFIX = $(PREFIX)/share/man
|
||||||
|
|
||||||
|
TARGET = rss-cli
|
||||||
|
|
||||||
all : $(OBJ)
|
all : $(OBJ)
|
||||||
$(CC) $(FLAGS) $(CFLAGS) -o $(TARGET) $(OBJ) $(LIBRARIES)
|
$(CC) $(FLAGS) $(CFLAGS) -o $(BIN)/$(TARGET) $(OBJ) $(LIBRARIES)
|
||||||
|
|
||||||
.cpp.o :
|
.cpp.o :
|
||||||
$(CC) $(FLAGS) $(CFLAGS) $(LIBRARIES) -c $< -o $@
|
$(CC) $(FLAGS) $(CFLAGS) $(LIBRARIES) -c $< -o $@
|
||||||
|
|
||||||
install : all
|
install : all
|
||||||
|
mkdir -p $(PREFIX)/bin
|
||||||
|
cp -f $(BIN)/$(TARGET) $(PREFIX)/bin
|
||||||
|
chmod 755 $(PREFIX)/bin/$(TARGET)
|
||||||
|
|
||||||
|
uninstall :
|
||||||
|
rm -rf $(PREFIX)/bin/$(TARGET)
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
find . -type f -name '*.o' -delete
|
find . -type f -name '*.o' -delete
|
||||||
|
Loading…
Reference in New Issue
Block a user