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