fix misc linker issues
[oweals/gnunet.git] / src / testbed / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 if MINGW
5   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
6 endif
7
8 if USE_COVERAGE
9   AM_CFLAGS = --coverage -O0
10   XLIB = -lgcov
11 endif
12
13 libexecdir= $(pkglibdir)/libexec/
14
15 pkgcfgdir= $(pkgdatadir)/config.d/
16
17 pkgcfg_DATA = \
18   testbed.conf
19
20 if HAVE_SQLITE
21   underlay_daemon = gnunet-daemon-testbed-underlay
22   latency_logger = gnunet-daemon-latency-logger
23   generate_underlay = generate-underlay-topology
24   underlay_testcases = test_testbed_underlay
25 endif
26
27 libexec_PROGRAMS = \
28   gnunet-service-testbed \
29   gnunet-helper-testbed \
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 \
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/ats/libgnunetats.la \
56  $(top_builddir)/src/testing/libgnunettesting.la \
57  libgnunettestbed.la \
58  $(top_builddir)/src/arm/libgnunetarm.la \
59  $(LTLIBINTL) $(Z_LIBS)
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  libgnunettestbed.la
66
67 gnunet_helper_testbed_SOURCES = \
68   gnunet-helper-testbed.c
69 gnunet_helper_testbed_LDADD = $(XLIB) \
70  $(top_builddir)/src/util/libgnunetutil.la \
71  $(top_builddir)/src/testing/libgnunettesting.la \
72  libgnunettestbed.la \
73  $(LTLIBINTL) $(Z_LIBS)
74
75 gnunet_daemon_testbed_blacklist_SOURCES = gnunet-daemon-testbed-blacklist.c
76 gnunet_daemon_testbed_blacklist_LDADD = $(XLIB) \
77  $(top_builddir)/src/transport/libgnunettransport.la \
78  $(top_builddir)/src/util/libgnunetutil.la \
79  $(LTLIBINTL)
80
81 gnunet_daemon_testbed_underlay_SOURCES = gnunet-daemon-testbed-underlay.c
82 gnunet_daemon_testbed_underlay_LDADD = $(XLIB) \
83  $(top_builddir)/src/transport/libgnunettransport.la \
84  $(top_builddir)/src/util/libgnunetutil.la \
85  $(LTLIBINTL) -lsqlite3
86
87 gnunet_daemon_latency_logger_SOURCES = gnunet-daemon-latency-logger.c
88 gnunet_daemon_latency_logger_LDADD = $(XLIB) \
89  $(top_builddir)/src/ats/libgnunetats.la \
90  $(top_builddir)/src/util/libgnunetutil.la \
91  $(LTLIBINTL) -lsqlite3
92
93 lib_LTLIBRARIES = \
94   libgnunettestbed.la
95
96 libgnunettestbed_la_SOURCES = \
97   testbed_api.c testbed_api.h testbed.h \
98   testbed_api_hosts.c testbed_api_hosts.h testbed_helper.h \
99   testbed_api_operations.c testbed_api_operations.h \
100   testbed_api_peers.c testbed_api_peers.h \
101   testbed_api_services.c \
102   testbed_api_statistics.c \
103   testbed_api_testbed.c \
104   testbed_api_test.c \
105   testbed_api_topology.c testbed_api_topology.h \
106   testbed_api_sd.c testbed_api_sd.h \
107   testbed_api_barriers.c
108 libgnunettestbed_la_LIBADD = $(XLIB) \
109  $(top_builddir)/src/statistics/libgnunetstatistics.la \
110  $(top_builddir)/src/transport/libgnunettransport.la \
111  $(top_builddir)/src/hello/libgnunethello.la \
112  -lm $(Z_LIBS) \
113  $(top_builddir)/src/util/libgnunetutil.la \
114  $(top_builddir)/src/testing/libgnunettesting.la \
115  $(LTLIBINTL)
116 libgnunettestbed_la_LDFLAGS = \
117  $(GN_LIB_LDFLAGS) \
118  -version-info 0:0:0
119
120 generate_underlay_topology_SOURCES = generate-underlay-topology.c
121 generate_underlay_topology_LDADD = $(XLIB) \
122  $(top_builddir)/src/util/libgnunetutil.la \
123  libgnunettestbed.la \
124  $(LTLIBINTL) -lsqlite3
125
126 check_PROGRAMS = \
127   test_testbed_api_hosts \
128   test_gnunet_helper_testbed \
129   test_testbed_api_controllerlink \
130   test_testbed_api_2peers_1controller \
131   test_testbed_api_3peers_3controllers \
132   test_testbed_api \
133   test_testbed_api_sd \
134   test_testbed_api_operations \
135   test_testbed_api_testbed_run \
136   test_testbed_api_test \
137   test_testbed_api_test_timeout \
138   test_testbed_api_peer_reconfiguration \
139   test_testbed_api_peers_manage_services \
140   test_testbed_api_topology \
141   test_testbed_api_topology_clique \
142   test_testbed_api_testbed_run_topologyrandom \
143   test_testbed_api_testbed_run_topologyline \
144   test_testbed_api_testbed_run_topologystar \
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   gnunet-service-test-barriers \
155   test_testbed_api_barriers \
156   $(underlay_testcases)
157
158 if ENABLE_TEST_RUN
159  AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
160  TESTS = \
161   test_testbed_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_topologystar \
180   test_testbed_api_testbed_run_topologyclique \
181   test_testbed_api_testbed_run_topologyring \
182   test_testbed_api_testbed_run_topology2dtorus \
183   test_testbed_api_testbed_run_topologysmallworld \
184   test_testbed_api_testbed_run_topologysmallworldring \
185   test_testbed_api_testbed_run_topologyfromfile \
186   test_testbed_api_testbed_run_topologyscalefree \
187   test_testbed_api_barriers \
188   $(underlay_testcases)
189 endif
190
191 test_testbed_api_hosts_SOURCES = \
192  test_testbed_api_hosts.c
193 test_testbed_api_hosts_LDADD = \
194  $(top_builddir)/src/util/libgnunetutil.la \
195  libgnunettestbed.la
196
197 test_testbed_api_SOURCES = \
198  test_testbed_api.c
199 test_testbed_api_LDADD = \
200  $(top_builddir)/src/util/libgnunetutil.la \
201  $(top_builddir)/src/testing/libgnunettesting.la \
202  $(top_builddir)/src/arm/libgnunetarm.la \
203  libgnunettestbed.la
204
205 test_testbed_api_sd_SOURCES = \
206  test_testbed_api_sd.c
207 test_testbed_api_sd_LDADD = \
208  $(top_builddir)/src/util/libgnunetutil.la \
209  libgnunettestbed.la
210
211 test_testbed_api_2peers_1controller_SOURCES = \
212  test_testbed_api_2peers_1controller.c
213 test_testbed_api_2peers_1controller_LDADD = \
214  $(top_builddir)/src/util/libgnunetutil.la \
215  $(top_builddir)/src/testing/libgnunettesting.la \
216  libgnunettestbed.la
217
218 test_testbed_api_3peers_3controllers_SOURCES = \
219  test_testbed_api_3peers_3controllers.c
220 test_testbed_api_3peers_3controllers_LDADD = \
221  $(top_builddir)/src/util/libgnunetutil.la \
222  $(top_builddir)/src/testing/libgnunettesting.la \
223  libgnunettestbed.la
224
225 test_testbed_api_operations_SOURCES = \
226  test_testbed_api_operations.c
227 test_testbed_api_operations_LDADD = \
228  $(top_builddir)/src/util/libgnunetutil.la \
229  libgnunettestbed.la
230
231 test_testbed_api_controllerlink_SOURCES = \
232  test_testbed_api_controllerlink.c
233 test_testbed_api_controllerlink_LDADD = \
234  $(top_builddir)/src/util/libgnunetutil.la \
235  libgnunettestbed.la
236
237 test_testbed_api_testbed_run_SOURCES = \
238  test_testbed_api_testbed_run.c
239 test_testbed_api_testbed_run_LDADD = \
240  $(top_builddir)/src/util/libgnunetutil.la \
241  libgnunettestbed.la
242
243 test_testbed_api_test_SOURCES = \
244  test_testbed_api_test.c
245 test_testbed_api_test_LDADD = \
246  $(top_builddir)/src/util/libgnunetutil.la \
247  libgnunettestbed.la
248
249 test_testbed_api_test_timeout_SOURCES = \
250  test_testbed_api_test_timeout.c
251 test_testbed_api_test_timeout_LDADD = \
252  $(top_builddir)/src/util/libgnunetutil.la \
253  libgnunettestbed.la
254
255 test_testbed_api_topology_SOURCES = \
256  test_testbed_api_topology.c
257 test_testbed_api_topology_LDADD = \
258  $(top_builddir)/src/util/libgnunetutil.la \
259  libgnunettestbed.la
260
261 test_testbed_api_topology_clique_SOURCES = \
262  test_testbed_api_topology_clique.c
263 test_testbed_api_topology_clique_LDADD = \
264  $(top_builddir)/src/util/libgnunetutil.la \
265  libgnunettestbed.la
266
267 test_gnunet_helper_testbed_SOURCES = \
268  test_gnunet_helper_testbed.c
269 test_gnunet_helper_testbed_LDADD = \
270  $(top_builddir)/src/util/libgnunetutil.la \
271  libgnunettestbed.la \
272  $(Z_LIBS)
273
274 test_testbed_api_testbed_run_topologyrandom_SOURCES = \
275  test_testbed_api_testbed_run.c
276 test_testbed_api_testbed_run_topologyrandom_LDADD = \
277  $(top_builddir)/src/util/libgnunetutil.la \
278  libgnunettestbed.la
279
280 test_testbed_api_testbed_run_topologyline_SOURCES = \
281  test_testbed_api_testbed_run.c
282 test_testbed_api_testbed_run_topologyline_LDADD = \
283  $(top_builddir)/src/util/libgnunetutil.la \
284  libgnunettestbed.la
285
286 test_testbed_api_testbed_run_topologystar_SOURCES = \
287  test_testbed_api_testbed_run.c
288 test_testbed_api_testbed_run_topologystar_LDADD = \
289  $(top_builddir)/src/util/libgnunetutil.la \
290  libgnunettestbed.la
291
292 test_testbed_api_testbed_run_topologyclique_SOURCES = \
293  test_testbed_api_testbed_run.c
294 test_testbed_api_testbed_run_topologyclique_LDADD = \
295  $(top_builddir)/src/util/libgnunetutil.la \
296  libgnunettestbed.la
297
298 test_testbed_api_testbed_run_topologyring_SOURCES = \
299  test_testbed_api_testbed_run.c
300 test_testbed_api_testbed_run_topologyring_LDADD = \
301  $(top_builddir)/src/util/libgnunetutil.la \
302  libgnunettestbed.la
303
304 test_testbed_api_testbed_run_topologysmallworldring_SOURCES = \
305  test_testbed_api_testbed_run.c
306 test_testbed_api_testbed_run_topologysmallworldring_LDADD = \
307  $(top_builddir)/src/util/libgnunetutil.la \
308  libgnunettestbed.la
309
310 test_testbed_api_testbed_run_topology2dtorus_SOURCES = \
311  test_testbed_api_testbed_run.c
312 test_testbed_api_testbed_run_topology2dtorus_LDADD = \
313  $(top_builddir)/src/util/libgnunetutil.la \
314  libgnunettestbed.la
315
316 test_testbed_api_testbed_run_topologysmallworld_SOURCES = \
317  test_testbed_api_testbed_run.c
318 test_testbed_api_testbed_run_topologysmallworld_LDADD = \
319  $(top_builddir)/src/util/libgnunetutil.la \
320  libgnunettestbed.la
321
322 test_testbed_api_testbed_run_topologyfromfile_SOURCES = \
323  test_testbed_api_testbed_run.c
324 test_testbed_api_testbed_run_topologyfromfile_LDADD = \
325  $(top_builddir)/src/util/libgnunetutil.la \
326  libgnunettestbed.la
327
328 test_testbed_api_testbed_run_topologyscalefree_SOURCES = \
329  test_testbed_api_testbed_run.c
330 test_testbed_api_testbed_run_topologyscalefree_LDADD = \
331  $(top_builddir)/src/util/libgnunetutil.la \
332  libgnunettestbed.la
333
334 test_testbed_api_testbed_run_waitforever_SOURCES = \
335  test_testbed_api_testbed_run.c
336 test_testbed_api_testbed_run_waitforever_LDADD = \
337  $(top_builddir)/src/util/libgnunetutil.la \
338  libgnunettestbed.la
339
340 test_testbed_api_statistics_SOURCES = \
341  test_testbed_api_statistics.c
342 test_testbed_api_statistics_LDADD = \
343  $(top_builddir)/src/util/libgnunetutil.la \
344  libgnunettestbed.la
345
346 test_testbed_api_peers_manage_services_SOURCES = \
347  test_testbed_api_peers_manage_services.c
348 test_testbed_api_peers_manage_services_LDADD = \
349  $(top_builddir)/src/util/libgnunetutil.la \
350  libgnunettestbed.la
351
352 test_testbed_api_peer_reconfiguration_SOURCES = \
353  test_testbed_api_peer_reconfiguration.c
354 test_testbed_api_peer_reconfiguration_LDADD = \
355  $(top_builddir)/src/util/libgnunetutil.la \
356  libgnunettestbed.la
357
358 test_testbed_api_barriers_SOURCES = \
359  test_testbed_api_barriers.c \
360  test_testbed_api_barriers.h
361 test_testbed_api_barriers_LDADD = \
362  $(top_builddir)/src/util/libgnunetutil.la \
363  libgnunettestbed.la
364
365 gnunet_service_test_barriers_SOURCES = \
366   gnunet-service-test-barriers.c \
367   test_testbed_api_barriers.h
368 gnunet_service_test_barriers_LDADD = \
369  $(top_builddir)/src/util/libgnunetutil.la \
370  libgnunettestbed.la
371
372 test_testbed_underlay_SOURCES = \
373  test_testbed_underlay.c
374 test_testbed_underlay_LDADD = \
375  $(top_builddir)/src/util/libgnunetutil.la \
376  libgnunettestbed.la
377
378 EXTRA_DIST = \
379   test_testbed_api.conf \
380   test_testbed_api_statistics.conf \
381   test_testbed_api_test_timeout.conf \
382   test_testbed_api_template.conf \
383   test_testbed_api_testbed_run_topologyring.conf \
384   test_testbed_api_testbed_run_topologystar.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   test_testbed_api_barriers.conf.in \
394   overlay_topology.txt \
395   sample_hosts.txt \
396   sample.job \
397   test_testbed_underlay.conf.in \
398   test-underlay.sqlite