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