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