separate SD calculations
[oweals/gnunet.git] / src / testbed / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 if MINGW
4   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
5 endif
6
7 if USE_COVERAGE
8   AM_CFLAGS = --coverage -O0
9   XLIB = -lgcov
10 endif
11
12 if WITH_LL
13   CC = mpcc
14   ll_noinst_binaries = \
15     ll-master \
16     ll-monitor 
17   ll_binaries = \
18     gnunet-mpi-test
19 endif
20
21 libexecdir= $(pkglibdir)/libexec/
22
23 pkgcfgdir= $(pkgdatadir)/config.d/
24
25 pkgcfg_DATA = \
26   testbed.conf
27
28 libexec_PROGRAMS = \
29   gnunet-service-testbed \
30   gnunet-helper-testbed
31
32 bin_PROGRAMS = \
33   $(ll_binaries)
34
35 noinst_PROGRAMS = \
36   gnunet-testbed-profiler \
37   $(ll_noinst_binaries)
38
39 gnunet_service_testbed_SOURCES = \
40   gnunet-service-testbed.c \
41   gnunet-service-testbed.h \
42   gnunet-service-testbed_cache.c \
43   gnunet-service-testbed_oc.c
44 gnunet_service_testbed_LDADD = $(XLIB) \
45  $(top_builddir)/src/util/libgnunetutil.la \
46  $(top_builddir)/src/core/libgnunetcore.la \
47  $(top_builddir)/src/hello/libgnunethello.la \
48  $(top_builddir)/src/transport/libgnunettransport.la \
49  $(top_builddir)/src/testing/libgnunettesting.la \
50  $(top_builddir)/src/testbed/libgnunettestbed.la \
51  $(LTLIBINTL) -lz
52 gnunet_service_testbed_DEPENDENCIES = \
53   libgnunettestbed.la
54
55 gnunet_testbed_profiler_SOURCES = \
56   gnunet-testbed-profiler.c
57 gnunet_testbed_profiler_LDADD = $(XLIB) \
58  $(top_builddir)/src/util/libgnunetutil.la \
59  libgnunettestbed.la
60
61 gnunet_helper_testbed_SOURCES = \
62   gnunet-helper-testbed.c
63 gnunet_helper_testbed_LDADD = $(XLIB) \
64  $(top_builddir)/src/util/libgnunetutil.la \
65  $(top_builddir)/src/testing/libgnunettesting.la \
66  libgnunettestbed.la \
67  $(LTLIBINTL) -lz
68 gnunet_helper_testbed_DEPENDENCIES = \
69   gnunet-service-testbed.$(OBJEXT) \
70   libgnunettestbed.la
71
72 ll_master_SOURCES = \
73   ll_master.c
74 ll_master_LDADD = $(XLIB) \
75  $(top_builddir)/src/util/libgnunetutil.la \
76  $(LTLIBINTL) -lz -lllapi
77
78 ll_monitor_SOURCES = \
79   ll_monitor.c
80 ll_monitor_LDADD = $(XLIB) \
81  $(LTLIBINTL) -lz -lllapi
82
83 gnunet_mpi_test_SOURCES = gnunet_mpi_test.c
84 gnunet_mpi_test_LDADD = \
85  $(top_builddir)/src/util/libgnunetutil.la
86
87 lib_LTLIBRARIES = \
88   libgnunettestbed.la
89
90 libgnunettestbed_la_SOURCES = \
91   testbed_api.c testbed_api.h testbed.h \
92   testbed_api_hosts.c testbed_api_hosts.h testbed_helper.h \
93   testbed_api_operations.c testbed_api_operations.h \
94   testbed_api_peers.c testbed_api_peers.h \
95   testbed_api_services.c \
96   testbed_api_statistics.c \
97   testbed_api_testbed.c \
98   testbed_api_test.c \
99   testbed_api_topology.c testbed_api_topology.h \
100   testbed_api_sd.c testbed_api_sd.h
101 libgnunettestbed_la_LIBADD = $(XLIB) \
102  $(top_builddir)/src/core/libgnunetcore.la \
103  $(top_builddir)/src/statistics/libgnunetstatistics.la \
104  $(top_builddir)/src/transport/libgnunettransport.la \
105  $(top_builddir)/src/hello/libgnunethello.la \
106  -lm \
107  $(top_builddir)/src/util/libgnunetutil.la \
108  $(top_builddir)/src/testing/libgnunettesting.la \
109  $(LTLIBINTL)
110 libgnunettestbed_la_LDFLAGS = \
111  $(GN_LIB_LDFLAGS) \
112  -version-info 0:0:0
113
114 check_PROGRAMS = \
115   test_testbed_api_hosts \
116   test_testbed_api_controllerlink \
117   test_testbed_api_2peers_1controller \
118   test_testbed_api_3peers_3controllers \
119   test_testbed_api \
120   test_testbed_api_sd \
121   test_testbed_api_operations \
122   test_testbed_api_testbed_run \
123   test_testbed_api_test \
124   test_gnunet_helper_testbed \
125   test_testbed_api_topology \
126   test_testbed_api_topology_clique \
127   test_testbed_api_testbed_run_topologyrandom \
128   test_testbed_api_testbed_run_topologyline \
129   test_testbed_api_testbed_run_topologyclique \
130   test_testbed_api_testbed_run_topologyring \
131   test_testbed_api_testbed_run_topologysmallworldring \
132   test_testbed_api_testbed_run_topology2dtorus \
133   test_testbed_api_testbed_run_topologysmallworld \
134   test_testbed_api_testbed_run_topologyfromfile \
135   test_testbed_api_testbed_run_topologyscalefree
136
137 if ENABLE_TEST_RUN
138  TESTS = \
139   test_testbed_api \
140   test_testbed_api_sd \
141   test_testbed_api_hosts \
142   test_testbed_api_2peers_1controller \
143   test_testbed_api_3peers_3controllers \
144   test_testbed_api_operations \
145   test_gnunet_helper_testbed \
146   test_testbed_api_controllerlink \
147   test_testbed_api_testbed_run \
148   test_testbed_api_test \
149   test_testbed_api_topology \
150   test_testbed_api_topology_clique \
151   test_testbed_api_testbed_run_topologyrandom \
152   test_testbed_api_testbed_run_topologyline \
153   test_testbed_api_testbed_run_topologyclique \
154   test_testbed_api_testbed_run_topologyring \
155   test_testbed_api_testbed_run_topologysmallworldring \
156   test_testbed_api_testbed_run_topology2dtorus \
157   test_testbed_api_testbed_run_topologysmallworld \
158   test_testbed_api_testbed_run_topologyfromfile \
159   test_testbed_api_testbed_run_topologyscalefree
160 endif
161
162 test_testbed_api_hosts_SOURCES = \
163  test_testbed_api_hosts.c
164 test_testbed_api_hosts_LDADD = \
165  $(top_builddir)/src/util/libgnunetutil.la \
166  libgnunettestbed.la
167
168 test_testbed_api_SOURCES = \
169  test_testbed_api.c
170 test_testbed_api_LDADD = \
171  $(top_builddir)/src/util/libgnunetutil.la \
172  $(top_builddir)/src/testing/libgnunettesting.la \
173  $(top_builddir)/src/dht/libgnunetdht.la \
174  libgnunettestbed.la
175
176 test_testbed_api_sd_SOURCES = \
177  test_testbed_api_sd.c
178 test_testbed_api_sd_LDADD = \
179  $(top_builddir)/src/util/libgnunetutil.la \
180  libgnunettestbed.la
181
182 test_testbed_api_2peers_1controller_SOURCES = \
183  test_testbed_api_2peers_1controller.c
184 test_testbed_api_2peers_1controller_LDADD = \
185  $(top_builddir)/src/util/libgnunetutil.la \
186  $(top_builddir)/src/testing/libgnunettesting.la \
187  libgnunettestbed.la
188
189 test_testbed_api_3peers_3controllers_SOURCES = \
190  test_testbed_api_3peers_3controllers.c
191 test_testbed_api_3peers_3controllers_LDADD = \
192  $(top_builddir)/src/util/libgnunetutil.la \
193  $(top_builddir)/src/testing/libgnunettesting.la \
194  libgnunettestbed.la
195
196 test_testbed_api_operations_SOURCES = \
197  test_testbed_api_operations.c
198 test_testbed_api_operations_LDADD = \
199  $(top_builddir)/src/util/libgnunetutil.la \
200  libgnunettestbed.la
201
202 test_testbed_api_controllerlink_SOURCES = \
203  test_testbed_api_controllerlink.c
204 test_testbed_api_controllerlink_LDADD = \
205  $(top_builddir)/src/util/libgnunetutil.la \
206  libgnunettestbed.la
207
208 test_testbed_api_testbed_run_SOURCES = \
209  test_testbed_api_testbed_run.c
210 test_testbed_api_testbed_run_LDADD = \
211  $(top_builddir)/src/util/libgnunetutil.la \
212  libgnunettestbed.la
213
214 test_testbed_api_test_SOURCES = \
215  test_testbed_api_test.c
216 test_testbed_api_test_LDADD = \
217  $(top_builddir)/src/util/libgnunetutil.la \
218  libgnunettestbed.la
219
220 test_testbed_api_topology_SOURCES = \
221  test_testbed_api_topology.c
222 test_testbed_api_topology_LDADD = \
223  $(top_builddir)/src/util/libgnunetutil.la \
224  libgnunettestbed.la
225
226 test_testbed_api_topology_clique_SOURCES = \
227  test_testbed_api_topology_clique.c
228 test_testbed_api_topology_clique_LDADD = \
229  $(top_builddir)/src/util/libgnunetutil.la \
230  libgnunettestbed.la
231
232 test_gnunet_helper_testbed_SOURCES = \
233  test_gnunet_helper_testbed.c
234 test_gnunet_helper_testbed_LDADD = \
235  $(top_builddir)/src/util/libgnunetutil.la \
236  libgnunettestbed.la \
237  -lz
238
239 test_testbed_api_testbed_run_topologyrandom_SOURCES = \
240  test_testbed_api_testbed_run.c
241 test_testbed_api_testbed_run_topologyrandom_LDADD = \
242  $(top_builddir)/src/util/libgnunetutil.la \
243  libgnunettestbed.la
244
245 test_testbed_api_testbed_run_topologyline_SOURCES = \
246  test_testbed_api_testbed_run.c
247 test_testbed_api_testbed_run_topologyline_LDADD = \
248  $(top_builddir)/src/util/libgnunetutil.la \
249  libgnunettestbed.la
250
251 test_testbed_api_testbed_run_topologyclique_SOURCES = \
252  test_testbed_api_testbed_run.c
253 test_testbed_api_testbed_run_topologyclique_LDADD = \
254  $(top_builddir)/src/util/libgnunetutil.la \
255  libgnunettestbed.la
256
257 test_testbed_api_testbed_run_topologyring_SOURCES = \
258  test_testbed_api_testbed_run.c
259 test_testbed_api_testbed_run_topologyring_LDADD = \
260  $(top_builddir)/src/util/libgnunetutil.la \
261  libgnunettestbed.la
262
263 test_testbed_api_testbed_run_topologysmallworldring_SOURCES = \
264  test_testbed_api_testbed_run.c
265 test_testbed_api_testbed_run_topologysmallworldring_LDADD = \
266  $(top_builddir)/src/util/libgnunetutil.la \
267  libgnunettestbed.la
268
269 test_testbed_api_testbed_run_topology2dtorus_SOURCES = \
270  test_testbed_api_testbed_run.c
271 test_testbed_api_testbed_run_topology2dtorus_LDADD = \
272  $(top_builddir)/src/util/libgnunetutil.la \
273  libgnunettestbed.la
274
275 test_testbed_api_testbed_run_topologysmallworld_SOURCES = \
276  test_testbed_api_testbed_run.c
277 test_testbed_api_testbed_run_topologysmallworld_LDADD = \
278  $(top_builddir)/src/util/libgnunetutil.la \
279  libgnunettestbed.la
280
281 test_testbed_api_testbed_run_topologyfromfile_SOURCES = \
282  test_testbed_api_testbed_run.c
283 test_testbed_api_testbed_run_topologyfromfile_LDADD = \
284  $(top_builddir)/src/util/libgnunetutil.la \
285  libgnunettestbed.la
286
287 test_testbed_api_testbed_run_topologyscalefree_SOURCES = \
288  test_testbed_api_testbed_run.c
289 test_testbed_api_testbed_run_topologyscalefree_LDADD = \
290  $(top_builddir)/src/util/libgnunetutil.la \
291  libgnunettestbed.la
292
293 EXTRA_DIST = \
294   test_testbed_api.conf \
295   test_testbed_api_testbed_run_topologyring.conf \
296   test_testbed_api_testbed_run_topologyclique.conf \
297   test_testbed_api_testbed_run_topologyline.conf \
298   test_testbed_api_testbed_run_topologyrandom.conf \
299   test_testbed_api_testbed_run_topologysmallworldring.conf \
300   test_testbed_api_testbed_run_topology2dtorus.conf \
301   test_testbed_api_testbed_run_topologysmallworld.conf \
302   test_testbed_api_testbed_run_topologyfromfile.conf \
303   test_testbed_api_testbed_run_topologyscalefree.conf \
304   overlay_topology.txt \
305   sample_hosts.txt \
306   sample.job