-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
80 lines (53 loc) · 1.6 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
79
80
## Directories
CENTRALITY_DIR := Centrality
EFFICIENCY_DIR := Efficiency
NOVELTY_DIR := Novelty
RESILIENCE_DIR := Resilience
STATION_DIR := StationData
## Compiler
COM := g++
CFLAG := -Wall -Wextra
CPP11 := -std=c++11
##-------------------------------------------------
## Efficiency calculation ##
runEfficiency: efficiency
cd $(EFFICIENCY_DIR) &&\
./efficiencySmallWorld.exe
efficiency: $(EFFICIENCY_DIR)/efficiencySmallWorld.exe
## Centrality calculation ##
runCentrality: centrality
cd $(CENTRALITY_DIR) &&\
./rankBetweennessCentrality.exe &&\
./rankClosenessCentrality.exe &&\
./rankEigenvectorCentrality.exe
centrality: $(CENTRALITY_DIR)/rankClosenessCentrality.exe $(CENTRALITY_DIR)/rankEigenvectorCentrality.exe $(CENTRALITY_DIR)/rankBetweennessCentrality.exe
runTableData: tableData
cd $(CENTRALITY_DIR) &&\
./prepareTableData.exe
tableData: $(CENTRALITY_DIR)/prepareTableData.exe
## Compare centralities
runResilience: resilience
cd $(RESILIENCE_DIR) &&\
./compareCentralities.exe
resilience: $(RESILIENCE_DIR)/compareCentralities.exe
## Create new connection in the network
runNovelty: novelty
cd $(NOVELTY_DIR) &&\
./newConnections.exe
novelty: $(NOVELTY_DIR)/newConnections.exe
noveltyGraph: novelty
cd $(NOVELTY_DIR) &&\
python graphPlot.py
resilienceGraph: resilience
cd $(RESILIENCE_DIR) &&\
python graphPlot.py
## --------------------------------------------------
clean:
rm $(CENTRALITY_DIR)/*.exe
rm $(EFFICIENCY_DIR)/*.exe
rm $(NOVELTY_DIR)/*.exe
rm $(RESILIENCE_DIR)/*.exe
clearNovelty:
rm $(NOVELTY_DIR)/*.txt
%.exe: %.cpp
$(COM) $< -o $@ $(CFLAG) $(CPP11)