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