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