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