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