renaming libgnunetregexnew to libgnunetregex
[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 if HAVE_EXPERIMENTAL
24   noinst_LIB_EXP = libgnunetmesh2test.a
25   EXP_LIB = libgnunetmesh2.la
26   EXP_LIBEXEC = gnunet-service-mesh-new
27   EXP_TESTS = \
28     test_mesh2_local \
29     test_mesh2_small_forward
30 endif
31
32 libexec_PROGRAMS = \
33  gnunet-service-mesh $(EXP_LIBEXEC)
34
35 bin_PROGRAMS = \
36  gnunet-mesh
37
38 lib_LTLIBRARIES = \
39   libgnunetmesh.la $(EXP_LIB)
40
41 plugin_LTLIBRARIES = \
42  libgnunet_plugin_block_mesh.la
43
44 libgnunet_plugin_block_mesh_la_SOURCES = \
45  plugin_block_mesh.c
46 libgnunet_plugin_block_mesh_la_LIBADD = \
47  $(top_builddir)/src/block/libgnunetblock.la \
48  $(top_builddir)/src/util/libgnunetutil.la
49 libgnunet_plugin_block_mesh_la_LDFLAGS = \
50  $(GN_PLUGIN_LDFLAGS)
51 libgnunet_plugin_block_mesh_la_DEPENDENCIES = \
52  $(top_builddir)/src/block/libgnunetblock.la \
53  $(top_builddir)/src/util/libgnunetutil.la
54
55 libgnunetmesh_la_SOURCES = \
56   mesh_api.c mesh_common.c
57 libgnunetmesh_la_LIBADD = \
58   $(top_builddir)/src/util/libgnunetutil.la \
59   $(XLIB) \
60   $(LTLIBINTL)
61 libgnunetmesh_la_LDFLAGS = \
62   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
63   -version-info 2:1:1
64
65 libgnunetmesh2_la_SOURCES = \
66   mesh2_api.c mesh_common.c
67 libgnunetmesh2_la_LIBADD = \
68   $(top_builddir)/src/util/libgnunetutil.la \
69   $(XLIB) \
70   $(LTLIBINTL)
71 libgnunetmesh2_la_LDFLAGS = \
72   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
73   -version-info 2:2:1
74
75
76 gnunet_service_mesh_SOURCES = \
77  gnunet-service-mesh.c \
78  mesh_tunnel_tree.c mesh_tunnel_tree.h \
79  mesh_common.c
80 gnunet_service_mesh_CFLAGS = $(AM_CFLAGS)
81 gnunet_service_mesh_LDADD = \
82   $(top_builddir)/src/statistics/libgnunetstatistics.la \
83   $(top_builddir)/src/regex/libgnunetregex.la \
84   $(top_builddir)/src/util/libgnunetutil.la \
85   $(top_builddir)/src/core/libgnunetcore.la \
86   $(top_builddir)/src/dht/libgnunetdht.la \
87   $(top_builddir)/src/block/libgnunetblock.la 
88 gnunet_service_mesh_DEPENDENCIES = \
89   $(top_builddir)/src/util/libgnunetutil.la \
90   $(top_builddir)/src/core/libgnunetcore.la \
91   $(top_builddir)/src/dht/libgnunetdht.la \
92   $(top_builddir)/src/statistics/libgnunetstatistics.la \
93   $(top_builddir)/src/block/libgnunetblock.la \
94   $(top_builddir)/src/regex/libgnunetregex.la
95 if LINUX
96 gnunet_service_mesh_LDFLAGS = -lrt
97 endif
98
99 gnunet_mesh_SOURCES = \
100   gnunet-mesh.c
101 gnunet_mesh_LDADD = \
102   $(top_builddir)/src/mesh/libgnunetmesh.la \
103   $(top_builddir)/src/util/libgnunetutil.la
104 gnunet_mesh_DEPENDENCIES = \
105   libgnunetmesh.la
106
107 gnunet_service_mesh_new_SOURCES = \
108  gnunet-service-mesh-new.c \
109  mesh_path.c \
110  mesh_common.c
111 gnunet_service_mesh_new_CFLAGS = $(AM_CFLAGS)
112 gnunet_service_mesh_new_LDADD = \
113   $(top_builddir)/src/util/libgnunetutil.la \
114   $(top_builddir)/src/core/libgnunetcore.la \
115   $(top_builddir)/src/dht/libgnunetdht.la \
116   $(top_builddir)/src/statistics/libgnunetstatistics.la \
117   $(top_builddir)/src/block/libgnunetblock.la
118 gnunet_service_mesh_new_DEPENDENCIES = \
119   $(top_builddir)/src/util/libgnunetutil.la \
120   $(top_builddir)/src/core/libgnunetcore.la \
121   $(top_builddir)/src/dht/libgnunetdht.la \
122   $(top_builddir)/src/statistics/libgnunetstatistics.la \
123   $(top_builddir)/src/block/libgnunetblock.la
124 if LINUX
125 gnunet_service_mesh_new_LDFLAGS = -lrt
126 endif
127
128
129 noinst_LIBRARIES = libgnunetmeshtest.a $(noinst_LIB_EXP)
130
131 libgnunetmeshtest_a_SOURCES = \
132   mesh_test_lib.c mesh_test_lib.h
133 libgnunetmeshtest_a_LIBADD = \
134  $(top_builddir)/src/util/libgnunetutil.la \
135  $(top_builddir)/src/testbed/libgnunettestbed.la \
136  $(top_builddir)/src/mesh/libgnunetmesh.la
137 libgnunetmeshtest_a_DEPENDENCIES = \
138   libgnunetmesh.la
139
140 libgnunetmesh2test_a_SOURCES = \
141   mesh2_test_lib.c mesh2_test_lib.h
142 libgnunetmesh2test_a_LIBADD = \
143  $(top_builddir)/src/util/libgnunetutil.la \
144  $(top_builddir)/src/testbed/libgnunettestbed.la \
145  $(top_builddir)/src/mesh/libgnunetmesh2.la
146 libgnunetmesh2test_a_DEPENDENCIES = \
147   libgnunetmesh2.la
148
149
150 check_PROGRAMS = \
151  test_mesh_api \
152  test_mesh_tree_api \
153  test_mesh_local_1 \
154  test_mesh_local_2 \
155  test_mesh_local_traffic_fwd \
156  test_mesh_local_traffic_bck \
157  test_mesh_local_traffic_both \
158  test_mesh_2dtorus \
159  test_mesh_small_unicast \
160  test_mesh_small_signal \
161  test_mesh_small_speed \
162  test_mesh_small_speed_nobuf \
163  test_mesh_small_speed_backwards \
164  test_mesh_small_speed_nobuf_backwards \
165  test_mesh_small_speed_ack \
166  $(EXP_TESTS)
167
168 test_mesh_api_SOURCES = \
169  test_mesh_api.c
170 test_mesh_api_LDADD = \
171  $(top_builddir)/src/util/libgnunetutil.la \
172  $(top_builddir)/src/testing/libgnunettesting.la \
173  $(top_builddir)/src/mesh/libgnunetmesh.la
174 test_mesh_api_DEPENDENCIES = \
175   libgnunetmesh.la \
176    $(top_builddir)/src/util/libgnunetutil.la
177
178 test_mesh_tree_api_SOURCES = \
179  test_mesh_tree_api.c
180 test_mesh_tree_api_LDADD = \
181  $(top_builddir)/src/util/libgnunetutil.la \
182  $(top_builddir)/src/dht/libgnunetdht.la
183 test_mesh_tree_api_DEPENDENCIES = \
184   libgnunetmesh.la \
185   $(top_builddir)/src/dht/libgnunetdht.la
186
187 test_mesh_local_1_SOURCES = \
188  test_mesh_local_1.c
189 test_mesh_local_1_LDADD = \
190  $(top_builddir)/src/util/libgnunetutil.la \
191  $(top_builddir)/src/testing/libgnunettesting.la \
192  $(top_builddir)/src/mesh/libgnunetmesh.la
193 test_mesh_local_1_DEPENDENCIES = \
194   libgnunetmesh.la
195
196 test_mesh_local_2_SOURCES = \
197  test_mesh_local_2.c
198 test_mesh_local_2_LDADD = \
199  $(top_builddir)/src/util/libgnunetutil.la \
200  $(top_builddir)/src/testing/libgnunettesting.la \
201  $(top_builddir)/src/mesh/libgnunetmesh.la
202 test_mesh_local_2_DEPENDENCIES = \
203   libgnunetmesh.la
204
205 test_mesh_local_traffic_fwd_SOURCES = \
206  test_mesh_local_traffic.c
207 test_mesh_local_traffic_fwd_LDADD = \
208  $(top_builddir)/src/util/libgnunetutil.la \
209  $(top_builddir)/src/testing/libgnunettesting.la \
210  $(top_builddir)/src/mesh/libgnunetmesh.la
211 test_mesh_local_traffic_fwd_DEPENDENCIES = \
212   libgnunetmesh.la
213
214 test_mesh_local_traffic_bck_SOURCES = \
215  test_mesh_local_traffic.c
216 test_mesh_local_traffic_bck_LDADD = \
217  $(top_builddir)/src/util/libgnunetutil.la \
218  $(top_builddir)/src/testing/libgnunettesting.la \
219  $(top_builddir)/src/mesh/libgnunetmesh.la
220 test_mesh_local_traffic_bck_DEPENDENCIES = \
221   libgnunetmesh.la
222
223 test_mesh_local_traffic_both_SOURCES = \
224  test_mesh_local_traffic.c
225 test_mesh_local_traffic_both_LDADD = \
226  $(top_builddir)/src/util/libgnunetutil.la \
227  $(top_builddir)/src/testing/libgnunettesting.la \
228  $(top_builddir)/src/mesh/libgnunetmesh.la
229 test_mesh_local_traffic_both_DEPENDENCIES = \
230   libgnunetmesh.la
231
232
233 ld_mesh_test_lib = \
234   $(top_builddir)/src/mesh/libgnunetmeshtest.a \
235   $(top_builddir)/src/mesh/libgnunetmesh.la \
236   $(top_builddir)/src/testbed/libgnunettestbed.la \
237   $(top_builddir)/src/util/libgnunetutil.la 
238
239 dep_mesh_test_lib = \
240   libgnunetmeshtest.a \
241   libgnunetmesh.la
242
243 test_mesh_2dtorus_SOURCES = \
244  test_mesh_2dtorus.c
245 test_mesh_2dtorus_LDADD = $(ld_mesh_test_lib)
246 test_mesh_2dtorus_DEPENDENCIES = $(dep_mesh_test_lib)
247
248 test_mesh_small_unicast_SOURCES = \
249  test_mesh_small.c
250 test_mesh_small_unicast_LDADD = $(ld_mesh_test_lib)
251 test_mesh_small_unicast_DEPENDENCIES = $(dep_mesh_test_lib)
252
253 test_mesh_small_signal_SOURCES = \
254  test_mesh_small.c
255 test_mesh_small_signal_LDADD = $(ld_mesh_test_lib)
256 test_mesh_small_signal_DEPENDENCIES = $(dep_mesh_test_lib)
257
258 test_mesh_small_speed_ack_SOURCES = \
259  test_mesh_small.c
260 test_mesh_small_speed_ack_LDADD = $(ld_mesh_test_lib)
261 test_mesh_small_speed_ack_DEPENDENCIES = $(dep_mesh_test_lib)
262
263 test_mesh_small_speed_SOURCES = \
264  test_mesh_small.c
265 test_mesh_small_speed_LDADD = $(ld_mesh_test_lib)
266 test_mesh_small_speed_DEPENDENCIES = $(dep_mesh_test_lib)
267
268 test_mesh_small_speed_nobuf_SOURCES = \
269  test_mesh_small.c
270 test_mesh_small_speed_nobuf_LDADD = $(ld_mesh_test_lib)
271 test_mesh_small_speed_nobuf_DEPENDENCIES = $(dep_mesh_test_lib)
272
273 test_mesh_small_speed_backwards_SOURCES = \
274  test_mesh_small.c
275 test_mesh_small_speed_backwards_LDADD = $(ld_mesh_test_lib)
276 test_mesh_small_speed_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
277
278 test_mesh_small_speed_nobuf_backwards_SOURCES = \
279  test_mesh_small.c
280 test_mesh_small_speed_nobuf_backwards_LDADD = $(ld_mesh_test_lib)
281 test_mesh_small_speed_nobuf_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
282
283
284 ld_mesh2_test_lib = \
285   $(top_builddir)/src/mesh/libgnunetmesh2test.a \
286   $(top_builddir)/src/mesh/libgnunetmesh2.la \
287   $(top_builddir)/src/testbed/libgnunettestbed.la \
288   $(top_builddir)/src/util/libgnunetutil.la 
289
290 dep_mesh2_test_lib = \
291   libgnunetmesh2test.a \
292   libgnunetmesh2.la
293
294 test_mesh2_local_SOURCES = \
295   test_mesh2_local.c
296 test_mesh2_local_LDADD = $(ld_mesh2_test_lib)
297 test_mesh2_local_DEPENDENCIES = $(dep_mesh2_test_lib)
298
299 test_mesh2_small_forward_SOURCES = \
300   test_mesh2_small.c
301 test_mesh2_small_forward_LDADD = $(ld_mesh2_test_lib)
302 test_mesh2_small_forward_DEPENDENCIES = $(dep_mesh2_test_lib)
303
304
305 if ENABLE_TEST_RUN
306 TESTS = \
307  $(EXP_TESTS) \
308  test_mesh_api \
309  test_mesh_tree_api \
310  test_mesh_local_1 test_mesh_local_2 \
311  test_mesh_local_traffic_fwd \
312  test_mesh_local_traffic_bck \
313  test_mesh_local_traffic_both \
314  test_mesh_2dtorus \
315  test_mesh_small_unicast \
316  test_mesh_small_signal \
317  test_mesh_small_speed \
318  test_mesh_small_speed_nobuf \
319  test_mesh_small_speed_backwards
320 endif
321
322 EXTRA_DIST = \
323   mesh.h mesh_protocol.h \
324   test_mesh.conf \
325   test_mesh_2dtorus.conf \
326   test_mesh_small.conf