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