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