forked from DataPlaneBroker/DPB
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
174 lines (130 loc) · 5.38 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
all::
FIND=find
SED=sed
XARGS=xargs
PRINTF=printf
-include dataplanebroker-env.mk
PROJECT_JAVACFLAGS += -Xlint:unchecked
jars += $(COMMON_JARS)
jars += $(SERVER_JARS)
jars += $(TEST_JARS)
COMMON_JARS += initiate-dpb-core
trees_initiate-dpb-core += core
deps_core += util
roots_core=$(found_core)
SERVER_JARS += initiate-dpb-server
trees_initiate-dpb-server += server
deps_server += core
deps_server += util
roots_server=$(found_server)
SERVER_JARS += initiate-dpb-corsa
trees_initiate-dpb-corsa += corsa
deps_corsa += util
deps_corsa += core
roots_corsa=$(found_corsa)
SERVER_JARS += initiate-dpb-openflow
trees_initiate-dpb-openflow += openflow
deps_openflow += util
deps_openflow += core
roots_openflow=$(found_openflow)
COMMON_JARS += initiate-dpb-util
trees_initiate-dpb-util += util
roots_util=$(found_util)
TEST_JARS += tests
roots_tests += TestOddSpan
roots_tests += TestInitSpan
roots_tests += TestDummy
roots_tests += TestDV
roots_tests += TestDummyInitiateTopology
roots_tests += TestGeographicSpan
roots_tests += TestJsonServer
roots_tests += TestJsonClient
roots_tests += AlgoPerfTest
roots_tests += TopologyDemonstration
jdeps_tests += initiate-dpb-core
JARDEPS_OUTDIR=out
JARDEPS_SRCDIR=src/java-tree
JARDEPS_MERGEDIR=src/java-merge
-include jardeps.mk
-include jardeps-install.mk
SHAREDIR=$(PREFIX)/share/dataplane-broker
datafiles += portslicer.py
datafiles += tupleslicer.py
scripts += dpb-server
scripts += dpb-client
scripts += dpb-ssh-agent
-include binodeps.mk
DOC_PKGS += uk.ac.lancs.routing.metric
DOC_PKGS += uk.ac.lancs.routing.span
DOC_PKGS += uk.ac.lancs.networks
DOC_PKGS += uk.ac.lancs.networks.apps
DOC_PKGS += uk.ac.lancs.networks.apps.server
DOC_PKGS += uk.ac.lancs.networks.jsoncmd
DOC_PKGS += uk.ac.lancs.networks.mgmt
DOC_PKGS += uk.ac.lancs.networks.rest
DOC_PKGS += uk.ac.lancs.networks.transients
DOC_PKGS += uk.ac.lancs.networks.persist
DOC_PKGS += uk.ac.lancs.networks.fabric
DOC_PKGS += uk.ac.lancs.networks.openflow
DOC_PKGS += uk.ac.lancs.networks.corsa
DOC_PKGS += uk.ac.lancs.networks.corsa.rest
DOC_PKGS += uk.ac.lancs.config
DOC_PKGS += uk.ac.lancs.agent
DOC_OVERVIEW=src/java-overview.html
DOC_CLASSPATH += $(jars:%=$(JARDEPS_OUTDIR)/%.jar)
DOC_SRC=$(call jardeps_srcdirs4jars,$(jars))
DOC_CORE=dataplanebroker$(DOC_CORE_SFX)
common-jars:: $(COMMON_JARS:%=$(JARDEPS_OUTDIR)/%.jar)
common-jars:: $(COMMON_JARS:%=$(JARDEPS_OUTDIR)/%-src.zip)
server-jars:: common-jars
server-jars:: $(SERVER_JARS:%=$(JARDEPS_OUTDIR)/%.jar)
server-jars:: $(SERVER_JARS:%=$(JARDEPS_OUTDIR)/%-src.zip)
client-jars:: common-jars
testalgoperf: all $(TEST_JARS:%=$(JARDEPS_OUTDIR)/%.jar)
$(JAVA) -ea -cp "$(JARDEPS_OUTDIR)/initiate-dpb-core.jar:$(JARDEPS_OUTDIR)/tests.jar" AlgoPerfTest
topodemo: all $(TEST_JARS:%=$(JARDEPS_OUTDIR)/%.jar)
$(JAVA) -ea -cp "$(JARDEPS_OUTDIR)/initiate-dpb-core.jar:$(JARDEPS_OUTDIR)/tests.jar" TopologyDemonstration
testdv: all $(TEST_JARS:%=$(JARDEPS_OUTDIR)/%.jar)
$(JAVA) -ea -cp "$(JARDEPS_OUTDIR)/initiate-dpb-core.jar:$(JARDEPS_OUTDIR)/tests.jar" TestDV
testoddspan: all $(TEST_JARS:%=$(JARDEPS_OUTDIR)/%.jar)
$(JAVA) -ea -cp "$(JARDEPS_OUTDIR)/initiate-dpb-core.jar:$(JARDEPS_OUTDIR)/tests.jar" TestOddSpan
testinitspan: all $(TEST_JARS:%=$(JARDEPS_OUTDIR)/%.jar)
$(JAVA) -ea -cp "$(JARDEPS_OUTDIR)/initiate-dpb-core.jar:$(JARDEPS_OUTDIR)/tests.jar" TestInitSpan
testdummy: all $(TEST_JARS:%=$(JARDEPS_OUTDIR)/%.jar)
$(JAVA) -ea -cp "$(JARDEPS_OUTDIR)/initiate-dpb-core.jar:$(JARDEPS_OUTDIR)/tests.jar" TestDummy
testinitdummy: all $(TEST_JARS:%=$(JARDEPS_OUTDIR)/%.jar)
$(JAVA) -ea -cp "$(JARDEPS_OUTDIR)/initiate-dpb-core.jar:$(JARDEPS_OUTDIR)/tests.jar" TestDummyInitiateTopology
testgeospan: all $(TEST_JARS:%=$(JARDEPS_OUTDIR)/%.jar)
$(JAVA) -ea -cp "$(JARDEPS_OUTDIR)/initiate-dpb-core.jar:$(JARDEPS_OUTDIR)/tests.jar" TestGeographicSpan
commander: all
$(JAVA) -ea -cp "$(JARDEPS_OUTDIR)/initiate-dpb-core.jar:$(JARDEPS_OUTDIR)/initiate-dpb-util.jar:$(JARDEPS_OUTDIR)/initiate-dpb-corsa.jar:$(subst $(jardeps_space),:,$(CLASSPATH))" uk.ac.lancs.networks.apps.Commander $(CONFIG) $(ARGS)
testcorsa: all
$(JAVA) -ea -cp "$(JARDEPS_OUTDIR)/initiate-dpb-core.jar:$(JARDEPS_OUTDIR)/initiate-dpb-util.jar:$(JARDEPS_OUTDIR)/initiate-dpb-corsa.jar:$(subst $(jardeps_space),:,$(CLASSPATH))" uk.ac.lancs.networks.corsa.rest.CorsaREST $(RESTAPI) $(CERTFILE) $(AUTHZFILE)
testconfig: all
$(JAVA) -ea -cp "$(JARDEPS_OUTDIR)/initiate-dpb-util.jar" uk.ac.lancs.config.ConfigurationContext scratch/initiate-test-1corsa.properties slough-fabric-brperlink
blank:: clean
$(RM) -r out
all:: client server
client:: client-jars
server:: server-jars
install:: install-data
install:: install-scripts
install:: install-jars
install-ctrl:: install-data
install-ssh:: install-scripts
install-client:: install-scripts install-client-jars
install-server:: install-scripts install-server-jars
install-common-jars:: $(COMMON_JARS:%=install-jar-%)
install-server-jars install-client-jars:: install-common-jars
install-server-jars:: $(SERVER_JARS:%=install-jar-%)
install-jars:: install-client-jars install-server-jars
install-jar-%::
@$(call JARDEPS_INSTALL,$(PREFIX)/share/java,$*,$(version_$*))
clean:: tidy
tidy::
@$(PRINTF) 'Removing detritus\n'
@$(FIND) . -name "*~" -delete
YEARS=2018,2019
update-licence:
$(FIND) . -name '.svn' -prune -or -type f -print0 | $(XARGS) -0 \
$(SED) -i 's/Copyright\s\+[0-9,]\+\sRegents of the University of Lancaster/Copyright $(YEARS), Regents of the University of Lancaster/g'