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