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