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