mirror of https://github.com/PatrickLipka/tt.git
Uninstall target added
This commit is contained in:
parent
f7bbfa4873
commit
525534a5de
12
Makefile
12
Makefile
|
@ -1,3 +1,5 @@
|
||||||
|
-include config.out
|
||||||
|
|
||||||
CXX ?= g++
|
CXX ?= g++
|
||||||
CXXFLAGS := -g -Wall -pedantic
|
CXXFLAGS := -g -Wall -pedantic
|
||||||
OBJFLAGS := $(CXXFLAGS) -c
|
OBJFLAGS := $(CXXFLAGS) -c
|
||||||
|
@ -25,7 +27,9 @@ makedir:
|
||||||
@mkdir -p $(BIN_PATH)
|
@mkdir -p $(BIN_PATH)
|
||||||
|
|
||||||
all: $(BIN_PATH)/tt
|
all: $(BIN_PATH)/tt
|
||||||
|
@echo "PREFIX=$(PREFIX)" > config.out
|
||||||
|
@echo "USER_NAME=$(USER_NAME)" >> config.out
|
||||||
|
@echo "TRACKING_DIR=$(TRACKING_DIR)" >> config.out
|
||||||
install: all
|
install: all
|
||||||
@echo "Installing tt at $(PREFIX) for user $(USER_NAME). Tracking directory will be $(TRACKING_DIR)."
|
@echo "Installing tt at $(PREFIX) for user $(USER_NAME). Tracking directory will be $(TRACKING_DIR)."
|
||||||
@mkdir -p $(PREFIX)/bin
|
@mkdir -p $(PREFIX)/bin
|
||||||
|
@ -36,9 +40,13 @@ install: all
|
||||||
echo "tracking_directory=$(TRACKING_DIR)" >> $(PREFIX)/etc/tt.conf
|
echo "tracking_directory=$(TRACKING_DIR)" >> $(PREFIX)/etc/tt.conf
|
||||||
@echo "tt successfully installed. User name and tracking directory can be adjusted in $(PREFIX)/etc/tt.conf."
|
@echo "tt successfully installed. User name and tracking directory can be adjusted in $(PREFIX)/etc/tt.conf."
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm -rf $(PREFIX)/bin/tt
|
||||||
|
rm -rf $(PREFIX)/etc/tt.conf
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(SRC_PATH)/*.o
|
rm -rf $(SRC_PATH)/*.o
|
||||||
rm -rf $(BIN_PATH)/tt
|
rm -rf $(BIN_PATH)
|
||||||
|
rm -rf config.out
|
||||||
|
|
||||||
.PHONY: makedir clean
|
.PHONY: makedir clean
|
||||||
|
|
Loading…
Reference in New Issue