-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
79 lines (48 loc) · 1.01 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.DEFAULT_GOAL:=basic
basic: backup crd
SENV = echo "skipping setting LIB and INCLUDE" &&
RUNFILE =./Clear
DEND =-debug
REND =-release
DF = $(RUNFILE)$(DEND)
RF = $(RUNFILE)$(REND)
CDD =cd ./Debug &&
CDR =cd ./Release &&
CLND =rm -rf ./Debug
CLNR =rm -rf ./Release
CLNDF =rm -f $(DF)
CLNRF =rm -f $(RF)
all: backup crd crr
rd: rundebug
rr: runrelease
crd: debug rd
crr: release rr
debug: cleandebug
mkdir -p ./Debug
$(SENV) $(CDD) cmake ..
$(CDD) make
# $(CDD) mv $(RUNFILE) .$(DF)
# $(CLND)
release: cleanrelease
mkdir -p ./Release
$(SENV) $(CDR) cmake ..
$(CDR) make
# $(CDR) mv $(RUNFILE) .$(RF)
# $(CLNR)
rundebug:
# $(DF) &
$(CDD) $(RUNFILE) &
runrelease:
# $(RF) &
$(CDR) $(RUNFILE) &
clean: cleandebug cleanrelease
cleandebug:
$(CLND)
$(CLNDF)
cleanrelease:
$(CLNR)
$(CLNRF)
backup: compress
compress:
mkdir -p ./Backups
tar --exclude='./Backups' --exclude='./cmake' --exclude='./Debug' --exclude='./Release' --exclude='$(DF)' --exclude='$(RF)' -zcf ./Backups/Backup-`date +%s`.tgz .