- give out run handle through which master controller's handle can be retrieved
[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 ENABLE_LL
13   ll_binaries = \
14     gnunet-testbed-mpi-spawn
15 endif
16
17 libexecdir= $(pkglibdir)/libexec/
18
19 pkgcfgdir= $(pkgdatadir)/config.d/
20
21 pkgcfg_DATA = \
22   testbed.conf
23
24 libexec_PROGRAMS = \
25   gnunet-service-testbed \
26   gnunet-helper-testbed \
27   gnunet-service-testbed-logger
28
29 bin_PROGRAMS = \
30   $(ll_binaries) \
31   gnunet-testbed-profiler
32
33 check_SCRIPTS = \
34   buildvars.py
35
36 CLEANFILES = $(check_SCRIPTS) \
37   buildvars.pyc
38
39 noinst_PROGRAMS = \
40   gnunet-service-test-barriers
41
42 gnunet_service_testbed_SOURCES = \
43   gnunet-service-testbed.h \
44   gnunet-service-testbed.c \
45   gnunet-service-testbed_links.c \
46   gnunet-service-testbed_peers.c \
47   gnunet-service-testbed_cache.c \
48   gnunet-service-testbed_oc.c \
49   gnunet-service-testbed_cpustatus.c \
50   gnunet-service-testbed_meminfo.c \
51   gnunet-service-testbed_meminfo.h \
52   gnunet-service-testbed_barriers.c
53 gnunet_service_testbed_LDADD = $(XLIB) \
54  $(top_builddir)/src/util/libgnunetutil.la \
55  $(top_builddir)/src/core/libgnunetcore.la \
56  $(top_builddir)/src/hello/libgnunethello.la \
57  $(top_builddir)/src/transport/libgnunettransport.la \
58  $(top_builddir)/src/testing/libgnunettesting.la \
59  $(top_builddir)/src/testbed/libgnunettestbed.la \
60  $(top_builddir)/src/arm/libgnunetarm.la \
61  $(LTLIBINTL) $(Z_LIBS)
62 gnunet_service_testbed_DEPENDENCIES = \
63  libgnunettestbed.la
64
65 gnunet_service_testbed_logger_SOURCES = \
66   gnunet-service-testbed-logger.c
67 gnunet_service_testbed_logger_LDADD = \
68  $(top_builddir)/src/util/libgnunetutil.la
69
70 gnunet_testbed_profiler_SOURCES = \
71   gnunet-testbed-profiler.c
72 gnunet_testbed_profiler_LDADD = $(XLIB) \
73  $(top_builddir)/src/util/libgnunetutil.la \
74  $(top_builddir)/src/testbed/libgnunettestbed.la
75 gnunet_testbed_profiler_DEPENDENCIES = \
76  libgnunettestbed.la
77
78 gnunet_helper_testbed_SOURCES = \
79   gnunet-helper-testbed.c
80 gnunet_helper_testbed_LDADD = $(XLIB) \
81  $(top_builddir)/src/util/libgnunetutil.la \
82  $(top_builddir)/src/testing/libgnunettesting.la \
83  libgnunettestbed.la \
84  $(LTLIBINTL) $(Z_LIBS)
85 gnunet_helper_testbed_DEPENDENCIES = \
86   gnunet-service-testbed.$(OBJEXT) \
87   libgnunettestbed.la
88
89 gnunet_testbed_mpi_spawn_SOURCES = gnunet_testbed_mpi_spawn.c
90 gnunet_testbed_mpi_spawn_LDADD = $(XLIB) \
91  $(top_builddir)/src/util/libgnunetutil.la \
92  $(top_builddir)/src/testbed/libgnunettestbed.la
93 gnunet_testbed_mpi_spawn_DEPENDENCIES = \
94  $(top_builddir)/src/util/libgnunetutil.la \
95  libgnunettestbed.la
96
97 lib_LTLIBRARIES = \
98   libgnunettestbed.la \
99   libgnunettestbedlogger.la
100
101 libgnunettestbed_la_SOURCES = \
102   testbed_api.c testbed_api.h testbed.h \
103   testbed_api_hosts.c testbed_api_hosts.h testbed_helper.h \
104   testbed_api_operations.c testbed_api_operations.h \
105   testbed_api_peers.c testbed_api_peers.h \
106   testbed_api_services.c \
107   testbed_api_statistics.c \
108   testbed_api_testbed.c \
109   testbed_api_test.c \
110   testbed_api_topology.c testbed_api_topology.h \
111   testbed_api_sd.c testbed_api_sd.h \
112   testbed_api_barriers.c 
113 libgnunettestbed_la_LIBADD = $(XLIB) \
114  $(top_builddir)/src/core/libgnunetcore.la \
115  $(top_builddir)/src/statistics/libgnunetstatistics.la \
116  $(top_builddir)/src/transport/libgnunettransport.la \
117  $(top_builddir)/src/hello/libgnunethello.la \
118  -lm \
119  $(top_builddir)/src/util/libgnunetutil.la \
120  $(top_builddir)/src/testing/libgnunettesting.la \
121  $(LTLIBINTL)
122 libgnunettestbed_la_LDFLAGS = \
123  $(GN_LIB_LDFLAGS) \
124  -version-info 0:0:0
125
126 libgnunettestbedlogger_la_SOURCES = \
127   testbed_logger_api.c
128 libgnunettestbedlogger_la_LIBADD = $(XLIB) \
129  $(top_builddir)/src/util/libgnunetutil.la \
130  $(LTLIBINTL)
131 libgnunettestbedlogger_la_LDFLAGS = \
132  $(GN_LIB_LDFLAGS) \
133  -version-info 0:0:0
134
135 check_PROGRAMS = \
136   test_testbed_api_hosts \
137   test_testbed_logger_api \
138   test_gnunet_helper_testbed \
139   test_testbed_api_controllerlink \
140   test_testbed_api_2peers_1controller \
141   test_testbed_api_3peers_3controllers \
142   test_testbed_api \
143   test_testbed_api_sd \
144   test_testbed_api_operations \
145   test_testbed_api_testbed_run \
146   test_testbed_api_test \
147   test_testbed_api_test_timeout \
148   test_testbed_api_peer_reconfiguration \
149   test_testbed_api_peers_manage_services \
150   test_testbed_api_topology \
151   test_testbed_api_topology_clique \
152   test_testbed_api_testbed_run_topologyrandom \
153   test_testbed_api_testbed_run_topologyline \
154   test_testbed_api_testbed_run_topologyclique \
155   test_testbed_api_testbed_run_topologyring \
156   test_testbed_api_testbed_run_topologysmallworldring \
157   test_testbed_api_testbed_run_topology2dtorus \
158   test_testbed_api_testbed_run_topologysmallworld \
159   test_testbed_api_testbed_run_topologyfromfile \
160   test_testbed_api_testbed_run_topologyscalefree \
161   test_testbed_api_testbed_run_waitforever \
162   test_testbed_api_statistics \
163   test_testbed_api_barriers
164
165 if ENABLE_TEST_RUN
166  TESTS = \
167   test_testbed_api \
168   test_testbed_logger_api \
169   test_testbed_api_sd \
170   test_testbed_api_operations \
171   test_testbed_api_hosts \
172   test_gnunet_helper_testbed \
173   test_testbed_api_2peers_1controller \
174   test_testbed_api_controllerlink \
175   test_testbed_api_3peers_3controllers \
176   test_testbed_api_testbed_run \
177   test_testbed_api_test \
178   test_testbed_api_test_timeout \
179   test_testbed_api_statistics \
180   test_testbed_api_peer_reconfiguration \
181   test_testbed_api_peers_manage_services \
182   test_testbed_api_topology \
183   test_testbed_api_topology_clique \
184   test_testbed_api_testbed_run_topologyrandom \
185   test_testbed_api_testbed_run_topologyline \
186   test_testbed_api_testbed_run_topologyclique \
187   test_testbed_api_testbed_run_topologyring \
188   test_testbed_api_testbed_run_topology2dtorus \
189   test_testbed_api_testbed_run_topologysmallworld \
190   test_testbed_api_testbed_run_topologysmallworldring \
191   test_testbed_api_testbed_run_topologyfromfile \
192   test_testbed_api_testbed_run_topologyscalefree \
193   test_testbed_api_barriers.py
194 endif
195
196 test_testbed_api_hosts_SOURCES = \
197  test_testbed_api_hosts.c
198 test_testbed_api_hosts_LDADD = \
199  $(top_builddir)/src/util/libgnunetutil.la \
200  libgnunettestbed.la
201
202 test_testbed_api_SOURCES = \
203  test_testbed_api.c
204 test_testbed_api_LDADD = \
205  $(top_builddir)/src/util/libgnunetutil.la \
206  $(top_builddir)/src/testing/libgnunettesting.la \
207  $(top_builddir)/src/arm/libgnunetarm.la \
208  libgnunettestbed.la
209
210 test_testbed_logger_api_SOURCES = \
211  test_testbed_logger_api.c
212 test_testbed_logger_api_LDADD = \
213  $(top_builddir)/src/util/libgnunetutil.la \
214  $(top_builddir)/src/testing/libgnunettesting.la \
215  libgnunettestbedlogger.la
216
217 test_testbed_api_sd_SOURCES = \
218  test_testbed_api_sd.c
219 test_testbed_api_sd_LDADD = \
220  $(top_builddir)/src/util/libgnunetutil.la \
221  libgnunettestbed.la
222
223 test_testbed_api_2peers_1controller_SOURCES = \
224  test_testbed_api_2peers_1controller.c
225 test_testbed_api_2peers_1controller_LDADD = \
226  $(top_builddir)/src/util/libgnunetutil.la \
227  $(top_builddir)/src/testing/libgnunettesting.la \
228  libgnunettestbed.la
229
230 test_testbed_api_3peers_3controllers_SOURCES = \
231  test_testbed_api_3peers_3controllers.c
232 test_testbed_api_3peers_3controllers_LDADD = \
233  $(top_builddir)/src/util/libgnunetutil.la \
234  $(top_builddir)/src/testing/libgnunettesting.la \
235  libgnunettestbed.la
236
237 test_testbed_api_operations_SOURCES = \
238  test_testbed_api_operations.c
239 test_testbed_api_operations_LDADD = \
240  $(top_builddir)/src/util/libgnunetutil.la \
241  libgnunettestbed.la
242
243 test_testbed_api_controllerlink_SOURCES = \
244  test_testbed_api_controllerlink.c
245 test_testbed_api_controllerlink_LDADD = \
246  $(top_builddir)/src/util/libgnunetutil.la \
247  libgnunettestbed.la
248
249 test_testbed_api_testbed_run_SOURCES = \
250  test_testbed_api_testbed_run.c
251 test_testbed_api_testbed_run_LDADD = \
252  $(top_builddir)/src/util/libgnunetutil.la \
253  libgnunettestbed.la
254
255 test_testbed_api_test_SOURCES = \
256  test_testbed_api_test.c
257 test_testbed_api_test_LDADD = \
258  $(top_builddir)/src/util/libgnunetutil.la \
259  libgnunettestbed.la
260
261 test_testbed_api_test_timeout_SOURCES = \
262  test_testbed_api_test_timeout.c
263 test_testbed_api_test_timeout_LDADD = \
264  $(top_builddir)/src/util/libgnunetutil.la \
265  libgnunettestbed.la
266
267 test_testbed_api_topology_SOURCES = \
268  test_testbed_api_topology.c
269 test_testbed_api_topology_LDADD = \
270  $(top_builddir)/src/util/libgnunetutil.la \
271  libgnunettestbed.la
272
273 test_testbed_api_topology_clique_SOURCES = \
274  test_testbed_api_topology_clique.c
275 test_testbed_api_topology_clique_LDADD = \
276  $(top_builddir)/src/util/libgnunetutil.la \
277  libgnunettestbed.la
278
279 test_gnunet_helper_testbed_SOURCES = \
280  test_gnunet_helper_testbed.c
281 test_gnunet_helper_testbed_LDADD = \
282  $(top_builddir)/src/util/libgnunetutil.la \
283  libgnunettestbed.la \
284  $(Z_LIBZ)
285
286 test_testbed_api_testbed_run_topologyrandom_SOURCES = \
287  test_testbed_api_testbed_run.c
288 test_testbed_api_testbed_run_topologyrandom_LDADD = \
289  $(top_builddir)/src/util/libgnunetutil.la \
290  libgnunettestbed.la
291
292 test_testbed_api_testbed_run_topologyline_SOURCES = \
293  test_testbed_api_testbed_run.c
294 test_testbed_api_testbed_run_topologyline_LDADD = \
295  $(top_builddir)/src/util/libgnunetutil.la \
296  libgnunettestbed.la
297
298 test_testbed_api_testbed_run_topologyclique_SOURCES = \
299  test_testbed_api_testbed_run.c
300 test_testbed_api_testbed_run_topologyclique_LDADD = \
301  $(top_builddir)/src/util/libgnunetutil.la \
302  libgnunettestbed.la
303
304 test_testbed_api_testbed_run_topologyring_SOURCES = \
305  test_testbed_api_testbed_run.c
306 test_testbed_api_testbed_run_topologyring_LDADD = \
307  $(top_builddir)/src/util/libgnunetutil.la \
308  libgnunettestbed.la
309
310 test_testbed_api_testbed_run_topologysmallworldring_SOURCES = \
311  test_testbed_api_testbed_run.c
312 test_testbed_api_testbed_run_topologysmallworldring_LDADD = \
313  $(top_builddir)/src/util/libgnunetutil.la \
314  libgnunettestbed.la
315
316 test_testbed_api_testbed_run_topology2dtorus_SOURCES = \
317  test_testbed_api_testbed_run.c
318 test_testbed_api_testbed_run_topology2dtorus_LDADD = \
319  $(top_builddir)/src/util/libgnunetutil.la \
320  libgnunettestbed.la
321
322 test_testbed_api_testbed_run_topologysmallworld_SOURCES = \
323  test_testbed_api_testbed_run.c
324 test_testbed_api_testbed_run_topologysmallworld_LDADD = \
325  $(top_builddir)/src/util/libgnunetutil.la \
326  libgnunettestbed.la
327
328 test_testbed_api_testbed_run_topologyfromfile_SOURCES = \
329  test_testbed_api_testbed_run.c
330 test_testbed_api_testbed_run_topologyfromfile_LDADD = \
331  $(top_builddir)/src/util/libgnunetutil.la \
332  libgnunettestbed.la
333
334 test_testbed_api_testbed_run_topologyscalefree_SOURCES = \
335  test_testbed_api_testbed_run.c
336 test_testbed_api_testbed_run_topologyscalefree_LDADD = \
337  $(top_builddir)/src/util/libgnunetutil.la \
338  libgnunettestbed.la
339
340 test_testbed_api_testbed_run_waitforever_SOURCES = \
341  test_testbed_api_testbed_run.c
342 test_testbed_api_testbed_run_waitforever_LDADD = \
343  $(top_builddir)/src/util/libgnunetutil.la \
344  libgnunettestbed.la
345
346 test_testbed_api_statistics_SOURCES = \
347  test_testbed_api_statistics.c
348 test_testbed_api_statistics_LDADD = \
349  $(top_builddir)/src/util/libgnunetutil.la \
350  libgnunettestbed.la
351
352 test_testbed_api_peers_manage_services_SOURCES = \
353  test_testbed_api_peers_manage_services.c
354 test_testbed_api_peers_manage_services_LDADD = \
355  $(top_builddir)/src/util/libgnunetutil.la \
356  libgnunettestbed.la
357
358 test_testbed_api_peer_reconfiguration_SOURCES = \
359  test_testbed_api_peer_reconfiguration.c
360 test_testbed_api_peer_reconfiguration_LDADD = \
361  $(top_builddir)/src/util/libgnunetutil.la \
362  libgnunettestbed.la
363
364 test_testbed_api_barriers_SOURCES = \
365  test_testbed_api_barriers.c
366 test_testbed_api_barriers_LDADD = \
367  $(top_builddir)/src/util/libgnunetutil.la \
368  libgnunettestbed.la
369
370 do_subst = sed -e 's,[@]libexecdir[@],$(libexecdir),g'
371
372 buildvars.py: buildvars.py.in Makefile
373         $(do_subst) < $(srcdir)/buildvars.py.in > $@
374
375 gnunet_service_test_barriers_SOURCES = \
376   gnunet-service-test-barriers.c
377 gnunet_service_test_barriers_LDADD = \
378  $(top_builddir)/src/util/libgnunetutil.la \
379  libgnunettestbed.la
380
381 EXTRA_DIST = \
382   test_testbed_api.conf \
383   test_testbed_api_test_timeout.conf \
384   test_testbed_api_testbed_run_topologyring.conf \
385   test_testbed_api_testbed_run_topologyclique.conf \
386   test_testbed_api_testbed_run_topologyline.conf \
387   test_testbed_api_testbed_run_topologyrandom.conf \
388   test_testbed_api_testbed_run_topologysmallworldring.conf \
389   test_testbed_api_testbed_run_topology2dtorus.conf \
390   test_testbed_api_testbed_run_topologysmallworld.conf \
391   test_testbed_api_testbed_run_topologyfromfile.conf \
392   test_testbed_api_testbed_run_topologyscalefree.conf \
393   overlay_topology.txt \
394   sample_hosts.txt \
395   sample.job \
396   buildvars.py.in \
397   test_testbed_api_barriers.py