841a7f99245307662fb7b16dcd7bcc3c83bbcce0
[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 WITH_LL
13   CC = mpcc
14   ll_noinst_binaries = \
15     ll-master \
16     ll-monitor 
17   ll_binaries = \
18     gnunet-mpi-test
19 endif
20
21 libexecdir= $(pkglibdir)/libexec/
22
23 pkgcfgdir= $(pkgdatadir)/config.d/
24
25 pkgcfg_DATA = \
26   testbed.conf
27
28 libexec_PROGRAMS = \
29   gnunet-service-testbed \
30   gnunet-helper-testbed
31
32 bin_PROGRAMS = \
33   $(ll_binaries)
34
35 noinst_PROGRAMS = \
36   gnunet-testbed-profiler \
37   $(ll_noinst_binaries)
38
39 gnunet_service_testbed_SOURCES = \
40   gnunet-service-testbed.c \
41   gnunet-service-testbed.h \
42   gnunet-service-testbed_hc.c
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  $(LTLIBINTL) -lz
51 gnunet_service_testbed_DEPENDENCIES = \
52   libgnunettestbed.la
53
54 gnunet_testbed_profiler_SOURCES = \
55   gnunet-testbed-profiler.c
56 gnunet_testbed_profiler_LDADD = $(XLIB) \
57  $(top_builddir)/src/util/libgnunetutil.la \
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 ll_master_SOURCES = \
72   ll_master.c
73 ll_master_LDADD = $(XLIB) \
74  $(top_builddir)/src/util/libgnunetutil.la \
75  $(LTLIBINTL) -lz -lllapi
76
77 ll_monitor_SOURCES = \
78   ll_monitor.c
79 ll_monitor_LDADD = $(XLIB) \
80  $(LTLIBINTL) -lz -lllapi
81
82 gnunet_mpi_test_SOURCES = gnunet_mpi_test.c
83 gnunet_mpi_test_LDADD = \
84  $(top_builddir)/src/util/libgnunetutil.la
85
86 lib_LTLIBRARIES = \
87   libgnunettestbed.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 libgnunettestbed_la_LIBADD = $(XLIB) \
100  $(top_builddir)/src/core/libgnunetcore.la \
101  $(top_builddir)/src/statistics/libgnunetstatistics.la \
102  $(top_builddir)/src/transport/libgnunettransport.la \
103  $(top_builddir)/src/hello/libgnunethello.la \
104  -lm \
105  $(top_builddir)/src/util/libgnunetutil.la \
106  $(top_builddir)/src/testing/libgnunettesting.la \
107  $(LTLIBINTL)
108 libgnunettestbed_la_LDFLAGS = \
109  $(GN_LIB_LDFLAGS) \
110  -version-info 0:0:0
111
112 check_PROGRAMS = \
113   test_testbed_api_hosts \
114   test_testbed_api_controllerlink \
115   test_testbed_api_2peers_1controller \
116   test_testbed_api_3peers_3controllers \
117   test_testbed_api \
118   test_testbed_api_operations \
119   test_testbed_api_testbed_run \
120   test_testbed_api_test \
121   test_gnunet_helper_testbed \
122   test_testbed_api_topology \
123   test_testbed_api_topology_clique \
124   test_testbed_api_testbed_run_topologyrandom \
125   test_testbed_api_testbed_run_topologyline \
126   test_testbed_api_testbed_run_topologyclique \
127   test_testbed_api_testbed_run_topologyring \
128   test_testbed_api_testbed_run_topologysmallworldring \
129   test_testbed_api_testbed_run_topology2dtorus \
130   test_testbed_api_testbed_run_topologysmallworld \
131   test_testbed_api_testbed_run_topologyfromfile \
132   test_testbed_api_testbed_run_topologyscalefree
133
134 if ENABLE_TEST_RUN
135  TESTS = \
136   test_testbed_api \
137   test_testbed_api_hosts \
138   test_testbed_api_2peers_1controller \
139   test_testbed_api_3peers_3controllers \
140   test_testbed_api_operations \
141   test_gnunet_helper_testbed \
142   test_testbed_api_controllerlink \
143   test_testbed_api_testbed_run \
144   test_testbed_api_test \
145   test_testbed_api_topology \
146   test_testbed_api_topology_clique \
147   test_testbed_api_testbed_run_topologyrandom \
148   test_testbed_api_testbed_run_topologyline \
149   test_testbed_api_testbed_run_topologyclique \
150   test_testbed_api_testbed_run_topologyring \
151   test_testbed_api_testbed_run_topologysmallworldring \
152   test_testbed_api_testbed_run_topology2dtorus \
153   test_testbed_api_testbed_run_topologysmallworld \
154   test_testbed_api_testbed_run_topologyfromfile \
155   test_testbed_api_testbed_run_topologyscalefree
156 endif
157
158 test_testbed_api_hosts_SOURCES = \
159  test_testbed_api_hosts.c
160 test_testbed_api_hosts_LDADD = \
161  $(top_builddir)/src/util/libgnunetutil.la \
162  libgnunettestbed.la
163
164 test_testbed_api_SOURCES = \
165  test_testbed_api.c
166 test_testbed_api_LDADD = \
167  $(top_builddir)/src/util/libgnunetutil.la \
168  $(top_builddir)/src/testing/libgnunettesting.la \
169  $(top_builddir)/src/dht/libgnunetdht.la \
170  libgnunettestbed.la
171
172 test_testbed_api_2peers_1controller_SOURCES = \
173  test_testbed_api_2peers_1controller.c
174 test_testbed_api_2peers_1controller_LDADD = \
175  $(top_builddir)/src/util/libgnunetutil.la \
176  $(top_builddir)/src/testing/libgnunettesting.la \
177  libgnunettestbed.la
178
179 test_testbed_api_3peers_3controllers_SOURCES = \
180  test_testbed_api_3peers_3controllers.c
181 test_testbed_api_3peers_3controllers_LDADD = \
182  $(top_builddir)/src/util/libgnunetutil.la \
183  $(top_builddir)/src/testing/libgnunettesting.la \
184  libgnunettestbed.la
185
186 test_testbed_api_operations_SOURCES = \
187  test_testbed_api_operations.c
188 test_testbed_api_operations_LDADD = \
189  $(top_builddir)/src/util/libgnunetutil.la \
190  libgnunettestbed.la
191
192 test_testbed_api_controllerlink_SOURCES = \
193  test_testbed_api_controllerlink.c
194 test_testbed_api_controllerlink_LDADD = \
195  $(top_builddir)/src/util/libgnunetutil.la \
196  libgnunettestbed.la
197
198 test_testbed_api_testbed_run_SOURCES = \
199  test_testbed_api_testbed_run.c
200 test_testbed_api_testbed_run_LDADD = \
201  $(top_builddir)/src/util/libgnunetutil.la \
202  libgnunettestbed.la
203
204 test_testbed_api_test_SOURCES = \
205  test_testbed_api_test.c
206 test_testbed_api_test_LDADD = \
207  $(top_builddir)/src/util/libgnunetutil.la \
208  libgnunettestbed.la
209
210 test_testbed_api_topology_SOURCES = \
211  test_testbed_api_topology.c
212 test_testbed_api_topology_LDADD = \
213  $(top_builddir)/src/util/libgnunetutil.la \
214  libgnunettestbed.la
215
216 test_testbed_api_topology_clique_SOURCES = \
217  test_testbed_api_topology_clique.c
218 test_testbed_api_topology_clique_LDADD = \
219  $(top_builddir)/src/util/libgnunetutil.la \
220  libgnunettestbed.la
221
222 test_gnunet_helper_testbed_SOURCES = \
223  test_gnunet_helper_testbed.c
224 test_gnunet_helper_testbed_LDADD = \
225  $(top_builddir)/src/util/libgnunetutil.la \
226  libgnunettestbed.la \
227  -lz
228
229 test_testbed_api_testbed_run_topologyrandom_SOURCES = \
230  test_testbed_api_testbed_run.c
231 test_testbed_api_testbed_run_topologyrandom_LDADD = \
232  $(top_builddir)/src/util/libgnunetutil.la \
233  libgnunettestbed.la
234
235 test_testbed_api_testbed_run_topologyline_SOURCES = \
236  test_testbed_api_testbed_run.c
237 test_testbed_api_testbed_run_topologyline_LDADD = \
238  $(top_builddir)/src/util/libgnunetutil.la \
239  libgnunettestbed.la
240
241 test_testbed_api_testbed_run_topologyclique_SOURCES = \
242  test_testbed_api_testbed_run.c
243 test_testbed_api_testbed_run_topologyclique_LDADD = \
244  $(top_builddir)/src/util/libgnunetutil.la \
245  libgnunettestbed.la
246
247 test_testbed_api_testbed_run_topologyring_SOURCES = \
248  test_testbed_api_testbed_run.c
249 test_testbed_api_testbed_run_topologyring_LDADD = \
250  $(top_builddir)/src/util/libgnunetutil.la \
251  libgnunettestbed.la
252
253 test_testbed_api_testbed_run_topologysmallworldring_SOURCES = \
254  test_testbed_api_testbed_run.c
255 test_testbed_api_testbed_run_topologysmallworldring_LDADD = \
256  $(top_builddir)/src/util/libgnunetutil.la \
257  libgnunettestbed.la
258
259 test_testbed_api_testbed_run_topology2dtorus_SOURCES = \
260  test_testbed_api_testbed_run.c
261 test_testbed_api_testbed_run_topology2dtorus_LDADD = \
262  $(top_builddir)/src/util/libgnunetutil.la \
263  libgnunettestbed.la
264
265 test_testbed_api_testbed_run_topologysmallworld_SOURCES = \
266  test_testbed_api_testbed_run.c
267 test_testbed_api_testbed_run_topologysmallworld_LDADD = \
268  $(top_builddir)/src/util/libgnunetutil.la \
269  libgnunettestbed.la
270
271 test_testbed_api_testbed_run_topologyfromfile_SOURCES = \
272  test_testbed_api_testbed_run.c
273 test_testbed_api_testbed_run_topologyfromfile_LDADD = \
274  $(top_builddir)/src/util/libgnunetutil.la \
275  libgnunettestbed.la
276
277 test_testbed_api_testbed_run_topologyscalefree_SOURCES = \
278  test_testbed_api_testbed_run.c
279 test_testbed_api_testbed_run_topologyscalefree_LDADD = \
280  $(top_builddir)/src/util/libgnunetutil.la \
281  libgnunettestbed.la
282
283 EXTRA_DIST = \
284   test_testbed_api.conf \
285   test_testbed_api_testbed_run_topologyring.conf \
286   test_testbed_api_testbed_run_topologyclique.conf \
287   test_testbed_api_testbed_run_topologyline.conf \
288   test_testbed_api_testbed_run_topologyrandom.conf \
289   test_testbed_api_testbed_run_topologysmallworldring.conf \
290   test_testbed_api_testbed_run_topology2dtorus.conf \
291   test_testbed_api_testbed_run_topologysmallworld.conf \
292   test_testbed_api_testbed_run_topologyfromfile.conf \
293   test_testbed_api_testbed_run_topologyscalefree.conf \
294   overlay_topology.txt \
295   sample_hosts.txt \
296   sample.job