-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
44 lines (36 loc) · 1.09 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
TARGET = dtpriority
DEL = rm -rf
.PHONY: all new clean install uninstall purge help
all:
+$(MAKE) -C src $(TARGET)
clean:
$(DEL) $(TARGET)
+$(MAKE) -C src $@
install: all
mkdir -p $(HOME)/.$(TARGET)
chmod 755 $(HOME)/.$(TARGET)
+$(MAKE) finalize
finalize:
sudo install -m 755 $(TARGET) /usr/local/bin/
uninstall:
sudo $(DEL) /usr/local/bin/$(TARGET)
purge:
$(DEL) $(HOME)/.$(TARGET)
sudo $(DEL) /usr/local/bin/$(TARGET)
full-purge:
+$(MAKE) clean
+$(MAKE) purge
help:
@echo "valid 'make' options:"
@echo "'make'"
@echo " -builds any needed files"
@echo "'make clean'"
@echo " -removes all previously built files"
@echo "'make install'"
@echo " -installs the program and it's required directory for saving, will ask for root access"
@echo "'make uninstall'"
@echo " -removes the install, will ask for root access"
@echo "'make purge'"
@echo " -removes the install and any saved data, will ask for root access"
@echo "'make full-purge'"
@echo " -removes all built files, removes the install and saved data, will ask for root access"