-fixing
[oweals/gnunet.git] / src / mesh / 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 pkgcfgdir= $(pkgdatadir)/config.d/
13
14 libexecdir= $(pkglibdir)/libexec/
15
16 pkgcfg_DATA = \
17   mesh.conf
18
19 plugindir = $(libdir)/gnunet
20
21 AM_CLFAGS = -g
22
23 libexec_PROGRAMS = \
24  gnunet-service-mesh gnunet-service-mesh-new
25
26 lib_LTLIBRARIES = \
27   libgnunetmesh.la \
28   libgnunetmeshblock.la
29
30 plugin_LTLIBRARIES = \
31  libgnunet_plugin_block_mesh.la
32
33 libgnunet_plugin_block_mesh_la_SOURCES = \
34  plugin_block_mesh.c
35 libgnunet_plugin_block_mesh_la_LIBADD = \
36  $(top_builddir)/src/mesh/libgnunetmeshblock.la \
37  $(top_builddir)/src/block/libgnunetblock.la \
38  $(top_builddir)/src/util/libgnunetutil.la
39 libgnunet_plugin_block_mesh_la_LDFLAGS = \
40  $(GN_PLUGIN_LDFLAGS)
41 libgnunet_plugin_block_mesh_la_DEPENDENCIES = \
42  libgnunetmeshblock.la \
43  $(top_builddir)/src/block/libgnunetblock.la \
44  $(top_builddir)/src/util/libgnunetutil.la
45
46 libgnunetmesh_la_SOURCES = \
47   mesh_api.c mesh_common.c
48 libgnunetmesh_la_LIBADD = \
49   $(top_builddir)/src/util/libgnunetutil.la \
50   $(XLIB) \
51   $(LTLIBINTL)
52 libgnunetmesh_la_LDFLAGS = \
53   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
54   -version-info 1:0:0
55
56 libgnunetmeshblock_la_SOURCES = \
57   mesh_block_lib.c
58 libgnunetmeshblock_la_LIBADD = \
59   $(top_builddir)/src/util/libgnunetutil.la \
60   $(XLIB) \
61   $(LTLIBINTL)
62 libgnunetmeshblock_la_LDFLAGS = \
63   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
64   -version-info 2:0:0
65
66 gnunet_service_mesh_SOURCES = \
67  gnunet-service-mesh.c \
68  mesh_tunnel_tree.c \
69  mesh_common.c
70 gnunet_service_mesh_CFLAGS = $(AM_CFLAGS)
71 gnunet_service_mesh_LDADD = \
72   $(top_builddir)/src/util/libgnunetutil.la \
73   $(top_builddir)/src/core/libgnunetcore.la \
74   $(top_builddir)/src/dht/libgnunetdht.la \
75   $(top_builddir)/src/statistics/libgnunetstatistics.la \
76   $(top_builddir)/src/block/libgnunetblock.la \
77   $(top_builddir)/src/mesh/libgnunetmeshblock.la \
78   $(top_builddir)/src/regex/libgnunetregex.la
79 gnunet_service_mesh_DEPENDENCIES = \
80   $(top_builddir)/src/util/libgnunetutil.la \
81   $(top_builddir)/src/core/libgnunetcore.la \
82   $(top_builddir)/src/dht/libgnunetdht.la \
83   $(top_builddir)/src/statistics/libgnunetstatistics.la \
84   $(top_builddir)/src/block/libgnunetblock.la \
85   libgnunetmeshblock.la \
86   $(top_builddir)/src/regex/libgnunetregex.la
87 if LINUX
88 gnunet_service_mesh_LDFLAGS = -lrt
89 endif
90
91 gnunet_service_mesh_new_SOURCES = \
92  gnunet-service-mesh-new.c \
93  mesh_tunnel_tree.c \
94  mesh_common.c
95 gnunet_service_mesh_new_CFLAGS = $(AM_CFLAGS)
96 gnunet_service_mesh_new_LDADD = \
97   $(top_builddir)/src/util/libgnunetutil.la \
98   $(top_builddir)/src/core/libgnunetcore.la \
99   $(top_builddir)/src/dht/libgnunetdht.la \
100   $(top_builddir)/src/statistics/libgnunetstatistics.la \
101   $(top_builddir)/src/block/libgnunetblock.la \
102   $(top_builddir)/src/mesh/libgnunetmeshblock.la \
103   $(top_builddir)/src/regex/libgnunetregex.la
104 gnunet_service_mesh_new_DEPENDENCIES = \
105   $(top_builddir)/src/util/libgnunetutil.la \
106   $(top_builddir)/src/core/libgnunetcore.la \
107   $(top_builddir)/src/dht/libgnunetdht.la \
108   $(top_builddir)/src/statistics/libgnunetstatistics.la \
109   $(top_builddir)/src/block/libgnunetblock.la \
110   libgnunetmeshblock.la \
111   $(top_builddir)/src/regex/libgnunetregex.la
112 if LINUX
113 gnunet_service_mesh_new_LDFLAGS = -lrt
114 endif
115
116
117 noinst_PROGRAMS = \
118   gnunet-regex-profiler \
119   gnunet-service-regexprofiler
120
121 gnunet_regex_profiler_SOURCES = \
122   gnunet-regex-profiler.c
123 gnunet_regex_profiler_LDADD = \
124   $(top_builddir)/src/util/libgnunetutil.la \
125   $(top_builddir)/src/testbed/libgnunettestbed.la \
126   $(top_builddir)/src/mesh/libgnunetmesh.la \
127   $(top_builddir)/src/regex/libgnunetregex.la \
128   $(top_builddir)/src/statistics/libgnunetstatistics.la
129 gnunet_regex_profiler_DEPENDENCIES = \
130   libgnunetmesh.la
131
132 gnunet_service_regexprofiler_SOURCES = \
133   gnunet-service-regexprofiler.c
134 gnunet_service_regexprofiler_LDADD = \
135   $(top_builddir)/src/util/libgnunetutil.la \
136   $(top_builddir)/src/mesh/libgnunetmesh.la \
137   $(top_builddir)/src/statistics/libgnunetstatistics.la
138 gnunet_service_regexprofiler_DEPENDENCIES = \
139   libgnunetmesh.la
140
141 check_PROGRAMS = \
142  test_mesh_api \
143  test_mesh_tree_api \
144  test_mesh_local_1 \
145  test_mesh_local_2 \
146  test_mesh_local_traffic_fwd \
147  test_mesh_local_traffic_bck \
148  test_mesh_local_traffic_both \
149  test_mesh_2dtorus \
150  test_mesh_regex \
151  test_mesh_small_unicast \
152  test_mesh_small_multicast \
153  test_mesh_small_speed \
154  test_mesh_small_speed_nobuf \
155  test_mesh_small_speed_min \
156  test_mesh_small_speed_backwards \
157  test_mesh_small_speed_nobuf_backwards \
158  test_mesh_small_speed_min_backwards \
159  test_mesh_small_speed_ack
160
161 test_mesh_api_SOURCES = \
162  test_mesh_api.c
163 test_mesh_api_LDADD = \
164  $(top_builddir)/src/util/libgnunetutil.la \
165  $(top_builddir)/src/testing/libgnunettesting.la \
166  $(top_builddir)/src/mesh/libgnunetmesh.la
167 test_mesh_api_DEPENDENCIES = \
168   libgnunetmesh.la \
169    $(top_builddir)/src/util/libgnunetutil.la
170
171 test_mesh_tree_api_SOURCES = \
172  test_mesh_tree_api.c
173 test_mesh_tree_api_LDADD = \
174  $(top_builddir)/src/util/libgnunetutil.la \
175  $(top_builddir)/src/dht/libgnunetdht.la
176 test_mesh_tree_api_DEPENDENCIES = \
177   libgnunetmesh.la \
178   $(top_builddir)/src/dht/libgnunetdht.la
179
180 test_mesh_local_1_SOURCES = \
181  test_mesh_local_1.c
182 test_mesh_local_1_LDADD = \
183  $(top_builddir)/src/util/libgnunetutil.la \
184  $(top_builddir)/src/testing/libgnunettesting.la \
185  $(top_builddir)/src/mesh/libgnunetmesh.la
186 test_mesh_local_1_DEPENDENCIES = \
187   libgnunetmesh.la
188
189 test_mesh_local_2_SOURCES = \
190  test_mesh_local_2.c
191 test_mesh_local_2_LDADD = \
192  $(top_builddir)/src/util/libgnunetutil.la \
193  $(top_builddir)/src/testing/libgnunettesting.la \
194  $(top_builddir)/src/mesh/libgnunetmesh.la
195 test_mesh_local_2_DEPENDENCIES = \
196   libgnunetmesh.la
197
198 test_mesh_local_traffic_fwd_SOURCES = \
199  test_mesh_local_traffic.c
200 test_mesh_local_traffic_fwd_LDADD = \
201  $(top_builddir)/src/util/libgnunetutil.la \
202  $(top_builddir)/src/testing/libgnunettesting.la \
203  $(top_builddir)/src/mesh/libgnunetmesh.la
204 test_mesh_local_traffic_fwd_DEPENDENCIES = \
205   libgnunetmesh.la
206
207 test_mesh_local_traffic_bck_SOURCES = \
208  test_mesh_local_traffic.c
209 test_mesh_local_traffic_bck_LDADD = \
210  $(top_builddir)/src/util/libgnunetutil.la \
211  $(top_builddir)/src/testing/libgnunettesting.la \
212  $(top_builddir)/src/mesh/libgnunetmesh.la
213 test_mesh_local_traffic_bck_DEPENDENCIES = \
214   libgnunetmesh.la
215
216 test_mesh_local_traffic_both_SOURCES = \
217  test_mesh_local_traffic.c
218 test_mesh_local_traffic_both_LDADD = \
219  $(top_builddir)/src/util/libgnunetutil.la \
220  $(top_builddir)/src/testing/libgnunettesting.la \
221  $(top_builddir)/src/mesh/libgnunetmesh.la
222 test_mesh_local_traffic_both_DEPENDENCIES = \
223   libgnunetmesh.la
224
225
226 test_mesh_2dtorus_SOURCES = \
227  test_mesh_2dtorus.c
228 test_mesh_2dtorus_LDADD = \
229   $(top_builddir)/src/util/libgnunetutil.la \
230   $(top_builddir)/src/testing_old/libgnunettesting_old.la
231
232 test_mesh_regex_SOURCES = \
233  test_mesh_regex.c
234 test_mesh_regex_LDADD = \
235   $(top_builddir)/src/mesh/libgnunetmesh.la \
236   $(top_builddir)/src/util/libgnunetutil.la \
237   $(top_builddir)/src/testing_old/libgnunettesting_old.la
238 test_mesh_regex_DEPENDENCIES = \
239   libgnunetmesh.la
240
241
242 test_mesh_small_unicast_SOURCES = \
243  test_mesh_small.c
244 test_mesh_small_unicast_LDADD = \
245   $(top_builddir)/src/mesh/libgnunetmesh.la \
246   $(top_builddir)/src/util/libgnunetutil.la \
247   $(top_builddir)/src/testing_old/libgnunettesting_old.la
248 test_mesh_small_unicast_DEPENDENCIES = \
249   libgnunetmesh.la
250
251 test_mesh_small_multicast_SOURCES = \
252  test_mesh_small.c
253 test_mesh_small_multicast_LDADD = \
254   $(top_builddir)/src/mesh/libgnunetmesh.la \
255   $(top_builddir)/src/util/libgnunetutil.la \
256   $(top_builddir)/src/testing_old/libgnunettesting_old.la
257 test_mesh_small_multicast_DEPENDENCIES = \
258   libgnunetmesh.la
259
260 test_mesh_small_speed_ack_SOURCES = \
261  test_mesh_small.c
262 test_mesh_small_speed_ack_LDADD = \
263   $(top_builddir)/src/mesh/libgnunetmesh.la \
264   $(top_builddir)/src/util/libgnunetutil.la \
265   $(top_builddir)/src/testing_old/libgnunettesting_old.la
266 test_mesh_small_speed_ack_DEPENDENCIES = \
267   libgnunetmesh.la
268
269 test_mesh_small_speed_SOURCES = \
270  test_mesh_small.c
271 test_mesh_small_speed_LDADD = \
272   $(top_builddir)/src/mesh/libgnunetmesh.la \
273   $(top_builddir)/src/util/libgnunetutil.la \
274   $(top_builddir)/src/testing_old/libgnunettesting_old.la
275 test_mesh_small_speed_DEPENDENCIES = \
276   libgnunetmesh.la
277
278 test_mesh_small_speed_min_SOURCES = \
279  test_mesh_small.c
280 test_mesh_small_speed_min_LDADD = \
281   $(top_builddir)/src/mesh/libgnunetmesh.la \
282   $(top_builddir)/src/util/libgnunetutil.la \
283   $(top_builddir)/src/testing_old/libgnunettesting_old.la
284 test_mesh_small_speed_min_DEPENDENCIES = \
285   libgnunetmesh.la
286
287 test_mesh_small_speed_nobuf_SOURCES = \
288  test_mesh_small.c
289 test_mesh_small_speed_nobuf_LDADD = \
290   $(top_builddir)/src/mesh/libgnunetmesh.la \
291   $(top_builddir)/src/util/libgnunetutil.la \
292   $(top_builddir)/src/testing_old/libgnunettesting_old.la
293 test_mesh_small_speed_nobuf_DEPENDENCIES = \
294   libgnunetmesh.la
295
296 test_mesh_small_speed_backwards_SOURCES = \
297  test_mesh_small.c
298 test_mesh_small_speed_backwards_LDADD = \
299   $(top_builddir)/src/mesh/libgnunetmesh.la \
300   $(top_builddir)/src/util/libgnunetutil.la \
301   $(top_builddir)/src/testing_old/libgnunettesting_old.la
302 test_mesh_small_speed_backwards_DEPENDENCIES = \
303   libgnunetmesh.la
304
305 test_mesh_small_speed_min_backwards_SOURCES = \
306  test_mesh_small.c
307 test_mesh_small_speed_min_backwards_LDADD = \
308   $(top_builddir)/src/mesh/libgnunetmesh.la \
309   $(top_builddir)/src/util/libgnunetutil.la \
310   $(top_builddir)/src/testing_old/libgnunettesting_old.la
311 test_mesh_small_speed_min_backwards_DEPENDENCIES = \
312   libgnunetmesh.la
313
314 test_mesh_small_speed_nobuf_backwards_SOURCES = \
315  test_mesh_small.c
316 test_mesh_small_speed_nobuf_backwards_LDADD = \
317   $(top_builddir)/src/mesh/libgnunetmesh.la \
318   $(top_builddir)/src/util/libgnunetutil.la \
319   $(top_builddir)/src/testing_old/libgnunettesting_old.la
320 test_mesh_small_speed_nobuf_backwards_DEPENDENCIES = \
321   libgnunetmesh.la
322
323
324 if ENABLE_TEST_RUN
325 TESTS = test_mesh_api \
326  test_mesh_tree_api \
327  test_mesh_local_1 test_mesh_local_2 \
328  test_mesh_local_traffic_fwd \
329  test_mesh_local_traffic_bck \
330  test_mesh_local_traffic_both \
331  test_mesh_2dtorus test_mesh_regex \
332  test_mesh_small_unicast test_mesh_small_multicast \
333  test_mesh_small_speed \
334  test_mesh_small_speed_min \
335  test_mesh_small_speed_nobuf \
336  test_mesh_small_speed_backwards \
337  test_mesh_small_speed_min_backwards
338 endif
339
340 EXTRA_DIST = \
341   test_mesh.conf \
342   test_mesh_2dtorus.conf \
343   test_mesh_small.conf