fix #3275 with solution from https://gnunet.org/bugs/view.php?id=3275#c8029
[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 libexecdir= $(pkglibdir)/libexec/
13
14 pkgcfgdir= $(pkgdatadir)/config.d/
15
16 pkgcfg_DATA = \
17   testbed.conf
18
19 if HAVE_SQLITE
20   underlay_daemon = gnunet-daemon-testbed-underlay
21   latency_logger = gnunet-daemon-latency-logger
22   generate_underlay = generate-underlay-topology
23   underlay_testcases = test_testbed_underlay
24 endif
25
26 libexec_PROGRAMS = \
27   gnunet-service-testbed \
28   gnunet-helper-testbed \
29   gnunet-service-testbed-logger \
30   gnunet-daemon-testbed-blacklist \
31   $(underlay_daemon) \
32   $(latency_logger)
33
34 bin_PROGRAMS = \
35   gnunet-testbed-profiler
36
37 noinst_PROGRAMS = \
38   $(generate_underlay)
39
40 gnunet_service_testbed_SOURCES = \
41   gnunet-service-testbed.c gnunet-service-testbed.h \
42   gnunet-service-testbed_links.c gnunet-service-testbed_links.h \
43   gnunet-service-testbed_peers.c \
44   gnunet-service-testbed_cache.c \
45   gnunet-service-testbed_oc.c \
46   gnunet-service-testbed_cpustatus.c \
47   gnunet-service-testbed_meminfo.c gnunet-service-testbed_meminfo.h \
48   gnunet-service-testbed_barriers.c gnunet-service-testbed_barriers.h \
49   gnunet-service-testbed_connectionpool.c gnunet-service-testbed_connectionpool.h
50 gnunet_service_testbed_LDADD = $(XLIB) \
51  $(top_builddir)/src/util/libgnunetutil.la \
52  $(top_builddir)/src/core/libgnunetcore.la \
53  $(top_builddir)/src/hello/libgnunethello.la \
54  $(top_builddir)/src/transport/libgnunettransport.la \
55  $(top_builddir)/src/testing/libgnunettesting.la \
56  $(top_builddir)/src/testbed/libgnunettestbed.la \
57  $(top_builddir)/src/arm/libgnunetarm.la \
58  $(LTLIBINTL) $(Z_LIBS)
59 gnunet_service_testbed_DEPENDENCIES = \
60  libgnunettestbed.la
61
62 gnunet_service_testbed_logger_SOURCES = \
63   gnunet-service-testbed-logger.c
64 gnunet_service_testbed_logger_LDADD = \
65  $(top_builddir)/src/util/libgnunetutil.la
66 gnunet_service_testbed_logger_DEPENDENCIES = \
67  $(top_builddir)/src/util/libgnunetutil.la
68
69 gnunet_testbed_profiler_SOURCES = \
70   gnunet-testbed-profiler.c
71 gnunet_testbed_profiler_LDADD = $(XLIB) \
72  $(top_builddir)/src/util/libgnunetutil.la \
73  $(top_builddir)/src/testbed/libgnunettestbed.la
74 gnunet_testbed_profiler_DEPENDENCIES = \
75  $(top_builddir)/src/util/libgnunetutil.la \
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_daemon_testbed_blacklist_SOURCES = gnunet-daemon-testbed-blacklist.c
90 gnunet_daemon_testbed_blacklist_LDADD = $(XLIB) \
91  $(top_builddir)/src/transport/libgnunettransport.la \
92  $(top_builddir)/src/util/libgnunetutil.la \
93  $(LTLIBINTL)
94 gnunet_daemon_testbed_blacklist_DEPENDENCIES = \
95  $(top_builddir)/src/transport/libgnunettransport.la \
96  $(top_builddir)/src/util/libgnunetutil.la
97
98 gnunet_daemon_testbed_underlay_SOURCES = gnunet-daemon-testbed-underlay.c
99 gnunet_daemon_testbed_underlay_LDADD = $(XLIB) \
100  $(top_builddir)/src/transport/libgnunettransport.la \
101  $(top_builddir)/src/util/libgnunetutil.la \
102  $(LTLIBINTL) -lsqlite3
103 gnunet_daemon_testbed_underlay_DEPENDENCIES = \
104  $(top_builddir)/src/transport/libgnunettransport.la \
105  $(top_builddir)/src/util/libgnunetutil.la
106
107 gnunet_daemon_latency_logger_SOURCES = gnunet-daemon-latency-logger.c
108 gnunet_daemon_latency_logger_LDADD = $(XLIB) \
109  $(top_builddir)/src/ats/libgnunetats.la \
110  $(top_builddir)/src/util/libgnunetutil.la \
111  $(LTLIBINTL) -lsqlite3
112 gnunet_daemon_latency_logger_DEPENDENCIES = \
113  $(top_builddir)/src/ats/libgnunetats.la \
114  $(top_builddir)/src/util/libgnunetutil.la
115
116 lib_LTLIBRARIES = \
117   libgnunettestbed.la \
118   libgnunettestbedlogger.la
119
120 libgnunettestbed_la_SOURCES = \
121   testbed_api.c testbed_api.h testbed.h \
122   testbed_api_hosts.c testbed_api_hosts.h testbed_helper.h \
123   testbed_api_operations.c testbed_api_operations.h \
124   testbed_api_peers.c testbed_api_peers.h \
125   testbed_api_services.c \
126   testbed_api_statistics.c \
127   testbed_api_testbed.c \
128   testbed_api_test.c \
129   testbed_api_topology.c testbed_api_topology.h \
130   testbed_api_sd.c testbed_api_sd.h \
131   testbed_api_barriers.c testbed_api_barriers.h
132 libgnunettestbed_la_LIBADD = $(XLIB) \
133  $(top_builddir)/src/core/libgnunetcore.la \
134  $(top_builddir)/src/statistics/libgnunetstatistics.la \
135  $(top_builddir)/src/transport/libgnunettransport.la \
136  $(top_builddir)/src/hello/libgnunethello.la \
137  -lm \
138  $(top_builddir)/src/util/libgnunetutil.la \
139  $(top_builddir)/src/testing/libgnunettesting.la \
140  $(LTLIBINTL)
141 libgnunettestbed_la_LDFLAGS = \
142  $(GN_LIB_LDFLAGS) \
143  -version-info 0:0:0
144
145 libgnunettestbedlogger_la_SOURCES = \
146   testbed_logger_api.c
147 libgnunettestbedlogger_la_LIBADD = $(XLIB) \
148  $(top_builddir)/src/util/libgnunetutil.la \
149  $(LTLIBINTL)
150 libgnunettestbedlogger_la_LDFLAGS = \
151  $(GN_LIB_LDFLAGS) \
152  -version-info 0:0:0
153
154 generate_underlay_topology_SOURCES = generate-underlay-topology.c
155 generate_underlay_topology_LDADD = $(XLIB) \
156  $(top_builddir)/src/util/libgnunetutil.la \
157  $(top_builddir)/src/testbed/libgnunettestbed.la \
158  $(LTLIBINTL) -lsqlite3
159 generate_underlay_topology_DEPENDENCIES = \
160  $(top_builddir)/src/util/libgnunetutil.la \
161  libgnunettestbed.la
162
163 check_PROGRAMS = \
164   test_testbed_api_hosts \
165   test_testbed_logger_api \
166   test_gnunet_helper_testbed \
167   test_testbed_api_controllerlink \
168   test_testbed_api_2peers_1controller \
169   test_testbed_api_3peers_3controllers \
170   test_testbed_api \
171   test_testbed_api_sd \
172   test_testbed_api_operations \
173   test_testbed_api_testbed_run \
174   test_testbed_api_test \
175   test_testbed_api_test_timeout \
176   test_testbed_api_peer_reconfiguration \
177   test_testbed_api_peers_manage_services \
178   test_testbed_api_topology \
179   test_testbed_api_topology_clique \
180   test_testbed_api_testbed_run_topologyrandom \
181   test_testbed_api_testbed_run_topologyline \
182   test_testbed_api_testbed_run_topologyclique \
183   test_testbed_api_testbed_run_topologyring \
184   test_testbed_api_testbed_run_topologysmallworldring \
185   test_testbed_api_testbed_run_topology2dtorus \
186   test_testbed_api_testbed_run_topologysmallworld \
187   test_testbed_api_testbed_run_topologyfromfile \
188   test_testbed_api_testbed_run_topologyscalefree \
189   test_testbed_api_testbed_run_waitforever \
190   test_testbed_api_statistics \
191   gnunet-service-test-barriers \
192   test_testbed_api_barriers \
193   $(underlay_testcases)
194
195 if ENABLE_TEST_RUN
196  TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
197  TESTS = \
198   test_testbed_api \
199   test_testbed_logger_api \
200   test_testbed_api_sd \
201   test_testbed_api_operations \
202   test_testbed_api_hosts \
203   test_gnunet_helper_testbed \
204   test_testbed_api_2peers_1controller \
205   test_testbed_api_controllerlink \
206   test_testbed_api_3peers_3controllers \
207   test_testbed_api_testbed_run \
208   test_testbed_api_test \
209   test_testbed_api_test_timeout \
210   test_testbed_api_statistics \
211   test_testbed_api_peer_reconfiguration \
212   test_testbed_api_peers_manage_services \
213   test_testbed_api_topology \
214   test_testbed_api_topology_clique \
215   test_testbed_api_testbed_run_topologyrandom \
216   test_testbed_api_testbed_run_topologyline \
217   test_testbed_api_testbed_run_topologyclique \
218   test_testbed_api_testbed_run_topologyring \
219   test_testbed_api_testbed_run_topology2dtorus \
220   test_testbed_api_testbed_run_topologysmallworld \
221   test_testbed_api_testbed_run_topologysmallworldring \
222   test_testbed_api_testbed_run_topologyfromfile \
223   test_testbed_api_testbed_run_topologyscalefree \
224   test_testbed_api_barriers \
225   $(underlay_testcases)
226 endif
227
228 test_testbed_api_hosts_SOURCES = \
229  test_testbed_api_hosts.c
230 test_testbed_api_hosts_LDADD = \
231  $(top_builddir)/src/util/libgnunetutil.la \
232  libgnunettestbed.la
233
234 test_testbed_api_SOURCES = \
235  test_testbed_api.c
236 test_testbed_api_LDADD = \
237  $(top_builddir)/src/util/libgnunetutil.la \
238  $(top_builddir)/src/testing/libgnunettesting.la \
239  $(top_builddir)/src/arm/libgnunetarm.la \
240  libgnunettestbed.la
241
242 test_testbed_logger_api_SOURCES = \
243  test_testbed_logger_api.c
244 test_testbed_logger_api_LDADD = \
245  $(top_builddir)/src/util/libgnunetutil.la \
246  $(top_builddir)/src/testing/libgnunettesting.la \
247  libgnunettestbedlogger.la
248
249 test_testbed_api_sd_SOURCES = \
250  test_testbed_api_sd.c
251 test_testbed_api_sd_LDADD = \
252  $(top_builddir)/src/util/libgnunetutil.la \
253  libgnunettestbed.la
254
255 test_testbed_api_2peers_1controller_SOURCES = \
256  test_testbed_api_2peers_1controller.c
257 test_testbed_api_2peers_1controller_LDADD = \
258  $(top_builddir)/src/util/libgnunetutil.la \
259  $(top_builddir)/src/testing/libgnunettesting.la \
260  libgnunettestbed.la
261
262 test_testbed_api_3peers_3controllers_SOURCES = \
263  test_testbed_api_3peers_3controllers.c
264 test_testbed_api_3peers_3controllers_LDADD = \
265  $(top_builddir)/src/util/libgnunetutil.la \
266  $(top_builddir)/src/testing/libgnunettesting.la \
267  libgnunettestbed.la
268
269 test_testbed_api_operations_SOURCES = \
270  test_testbed_api_operations.c
271 test_testbed_api_operations_LDADD = \
272  $(top_builddir)/src/util/libgnunetutil.la \
273  libgnunettestbed.la
274
275 test_testbed_api_controllerlink_SOURCES = \
276  test_testbed_api_controllerlink.c
277 test_testbed_api_controllerlink_LDADD = \
278  $(top_builddir)/src/util/libgnunetutil.la \
279  libgnunettestbed.la
280
281 test_testbed_api_testbed_run_SOURCES = \
282  test_testbed_api_testbed_run.c
283 test_testbed_api_testbed_run_LDADD = \
284  $(top_builddir)/src/util/libgnunetutil.la \
285  libgnunettestbed.la
286
287 test_testbed_api_test_SOURCES = \
288  test_testbed_api_test.c
289 test_testbed_api_test_LDADD = \
290  $(top_builddir)/src/util/libgnunetutil.la \
291  libgnunettestbed.la
292
293 test_testbed_api_test_timeout_SOURCES = \
294  test_testbed_api_test_timeout.c
295 test_testbed_api_test_timeout_LDADD = \
296  $(top_builddir)/src/util/libgnunetutil.la \
297  libgnunettestbed.la
298
299 test_testbed_api_topology_SOURCES = \
300  test_testbed_api_topology.c
301 test_testbed_api_topology_LDADD = \
302  $(top_builddir)/src/util/libgnunetutil.la \
303  libgnunettestbed.la
304
305 test_testbed_api_topology_clique_SOURCES = \
306  test_testbed_api_topology_clique.c
307 test_testbed_api_topology_clique_LDADD = \
308  $(top_builddir)/src/util/libgnunetutil.la \
309  libgnunettestbed.la
310
311 test_gnunet_helper_testbed_SOURCES = \
312  test_gnunet_helper_testbed.c
313 test_gnunet_helper_testbed_LDADD = \
314  $(top_builddir)/src/util/libgnunetutil.la \
315  libgnunettestbed.la \
316  $(Z_LIBS)
317
318 test_testbed_api_testbed_run_topologyrandom_SOURCES = \
319  test_testbed_api_testbed_run.c
320 test_testbed_api_testbed_run_topologyrandom_LDADD = \
321  $(top_builddir)/src/util/libgnunetutil.la \
322  libgnunettestbed.la
323
324 test_testbed_api_testbed_run_topologyline_SOURCES = \
325  test_testbed_api_testbed_run.c
326 test_testbed_api_testbed_run_topologyline_LDADD = \
327  $(top_builddir)/src/util/libgnunetutil.la \
328  libgnunettestbed.la
329
330 test_testbed_api_testbed_run_topologyclique_SOURCES = \
331  test_testbed_api_testbed_run.c
332 test_testbed_api_testbed_run_topologyclique_LDADD = \
333  $(top_builddir)/src/util/libgnunetutil.la \
334  libgnunettestbed.la
335
336 test_testbed_api_testbed_run_topologyring_SOURCES = \
337  test_testbed_api_testbed_run.c
338 test_testbed_api_testbed_run_topologyring_LDADD = \
339  $(top_builddir)/src/util/libgnunetutil.la \
340  libgnunettestbed.la
341
342 test_testbed_api_testbed_run_topologysmallworldring_SOURCES = \
343  test_testbed_api_testbed_run.c
344 test_testbed_api_testbed_run_topologysmallworldring_LDADD = \
345  $(top_builddir)/src/util/libgnunetutil.la \
346  libgnunettestbed.la
347
348 test_testbed_api_testbed_run_topology2dtorus_SOURCES = \
349  test_testbed_api_testbed_run.c
350 test_testbed_api_testbed_run_topology2dtorus_LDADD = \
351  $(top_builddir)/src/util/libgnunetutil.la \
352  libgnunettestbed.la
353
354 test_testbed_api_testbed_run_topologysmallworld_SOURCES = \
355  test_testbed_api_testbed_run.c
356 test_testbed_api_testbed_run_topologysmallworld_LDADD = \
357  $(top_builddir)/src/util/libgnunetutil.la \
358  libgnunettestbed.la
359
360 test_testbed_api_testbed_run_topologyfromfile_SOURCES = \
361  test_testbed_api_testbed_run.c
362 test_testbed_api_testbed_run_topologyfromfile_LDADD = \
363  $(top_builddir)/src/util/libgnunetutil.la \
364  libgnunettestbed.la
365
366 test_testbed_api_testbed_run_topologyscalefree_SOURCES = \
367  test_testbed_api_testbed_run.c
368 test_testbed_api_testbed_run_topologyscalefree_LDADD = \
369  $(top_builddir)/src/util/libgnunetutil.la \
370  libgnunettestbed.la
371
372 test_testbed_api_testbed_run_waitforever_SOURCES = \
373  test_testbed_api_testbed_run.c
374 test_testbed_api_testbed_run_waitforever_LDADD = \
375  $(top_builddir)/src/util/libgnunetutil.la \
376  libgnunettestbed.la
377
378 test_testbed_api_statistics_SOURCES = \
379  test_testbed_api_statistics.c
380 test_testbed_api_statistics_LDADD = \
381  $(top_builddir)/src/util/libgnunetutil.la \
382  libgnunettestbed.la
383
384 test_testbed_api_peers_manage_services_SOURCES = \
385  test_testbed_api_peers_manage_services.c
386 test_testbed_api_peers_manage_services_LDADD = \
387  $(top_builddir)/src/util/libgnunetutil.la \
388  libgnunettestbed.la
389
390 test_testbed_api_peer_reconfiguration_SOURCES = \
391  test_testbed_api_peer_reconfiguration.c
392 test_testbed_api_peer_reconfiguration_LDADD = \
393  $(top_builddir)/src/util/libgnunetutil.la \
394  libgnunettestbed.la
395
396 test_testbed_api_barriers_SOURCES = \
397  test_testbed_api_barriers.c \
398  test_testbed_api_barriers.h
399 test_testbed_api_barriers_LDADD = \
400  $(top_builddir)/src/util/libgnunetutil.la \
401  libgnunettestbed.la
402 test_testbed_api_barriers_DEPENDENCIES = \
403  gnunet-service-test-barriers
404
405 gnunet_service_test_barriers_SOURCES = \
406   gnunet-service-test-barriers.c \
407   test_testbed_api_barriers.h
408 gnunet_service_test_barriers_LDADD = \
409  $(top_builddir)/src/util/libgnunetutil.la \
410  libgnunettestbed.la
411
412 test_testbed_underlay_SOURCES = \
413  test_testbed_underlay.c
414 test_testbed_underlay_LDADD = \
415  $(top_builddir)/src/util/libgnunetutil.la \
416  libgnunettestbed.la
417
418 EXTRA_DIST = \
419   test_testbed_api.conf \
420   test_testbed_api_test_timeout.conf \
421   test_testbed_api_template.conf \
422   test_testbed_logger_api.conf \
423   test_testbed_api_testbed_run_topologyring.conf \
424   test_testbed_api_testbed_run_topologyclique.conf \
425   test_testbed_api_testbed_run_topologyline.conf \
426   test_testbed_api_testbed_run_topologyrandom.conf \
427   test_testbed_api_testbed_run_topologysmallworldring.conf \
428   test_testbed_api_testbed_run_topology2dtorus.conf \
429   test_testbed_api_testbed_run_topologysmallworld.conf \
430   test_testbed_api_testbed_run_topologyfromfile.conf \
431   test_testbed_api_testbed_run_topologyscalefree.conf \
432   test_testbed_api_barriers.conf.in \
433   overlay_topology.txt \
434   sample_hosts.txt \
435   sample.job \
436   test_testbed_underlay.conf.in \
437   test-underlay.sqlite