Move regex DHT integration from mesh to regex
[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
32 plugin_LTLIBRARIES = \
33  libgnunet_plugin_block_mesh.la
34
35 libgnunet_plugin_block_mesh_la_SOURCES = \
36  plugin_block_mesh.c
37 libgnunet_plugin_block_mesh_la_LIBADD = \
38  $(top_builddir)/src/block/libgnunetblock.la \
39  $(top_builddir)/src/util/libgnunetutil.la
40 libgnunet_plugin_block_mesh_la_LDFLAGS = \
41  $(GN_PLUGIN_LDFLAGS)
42 libgnunet_plugin_block_mesh_la_DEPENDENCIES = \
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 2:0:1
55
56 gnunet_service_mesh_SOURCES = \
57  gnunet-service-mesh.c \
58  mesh_tunnel_tree.c mesh_tunnel_tree.h \
59  mesh_common.c
60 gnunet_service_mesh_CFLAGS = $(AM_CFLAGS)
61 gnunet_service_mesh_LDADD = \
62   $(top_builddir)/src/util/libgnunetutil.la \
63   $(top_builddir)/src/core/libgnunetcore.la \
64   $(top_builddir)/src/dht/libgnunetdht.la \
65   $(top_builddir)/src/statistics/libgnunetstatistics.la \
66   $(top_builddir)/src/block/libgnunetblock.la \
67   $(top_builddir)/src/regex/libgnunetregex.la
68 gnunet_service_mesh_DEPENDENCIES = \
69   $(top_builddir)/src/util/libgnunetutil.la \
70   $(top_builddir)/src/core/libgnunetcore.la \
71   $(top_builddir)/src/dht/libgnunetdht.la \
72   $(top_builddir)/src/statistics/libgnunetstatistics.la \
73   $(top_builddir)/src/block/libgnunetblock.la \
74   $(top_builddir)/src/regex/libgnunetregex.la
75 if LINUX
76 gnunet_service_mesh_LDFLAGS = -lrt
77 endif
78
79 gnunet_mesh_SOURCES = \
80  gnunet-mesh.c         
81 gnunet_mesh_LDADD = \
82   $(top_builddir)/src/mesh/libgnunetmesh.la \
83   $(top_builddir)/src/util/libgnunetutil.la
84 gnunet_mesh_DEPENDENCIES = \
85   libgnunetmesh.la
86
87 gnunet_service_mesh_new_SOURCES = \
88  gnunet-service-mesh-new.c \
89  mesh_tunnel_tree.c \
90  mesh_common.c
91 gnunet_service_mesh_new_CFLAGS = $(AM_CFLAGS)
92 gnunet_service_mesh_new_LDADD = \
93   $(top_builddir)/src/util/libgnunetutil.la \
94   $(top_builddir)/src/core/libgnunetcore.la \
95   $(top_builddir)/src/dht/libgnunetdht.la \
96   $(top_builddir)/src/statistics/libgnunetstatistics.la \
97   $(top_builddir)/src/block/libgnunetblock.la \
98   $(top_builddir)/src/regex/libgnunetregex.la
99 gnunet_service_mesh_new_DEPENDENCIES = \
100   $(top_builddir)/src/util/libgnunetutil.la \
101   $(top_builddir)/src/core/libgnunetcore.la \
102   $(top_builddir)/src/dht/libgnunetdht.la \
103   $(top_builddir)/src/statistics/libgnunetstatistics.la \
104   $(top_builddir)/src/block/libgnunetblock.la \
105   $(top_builddir)/src/regex/libgnunetregex.la
106 if LINUX
107 gnunet_service_mesh_new_LDFLAGS = -lrt
108 endif
109
110
111 noinst_PROGRAMS = \
112   gnunet-regex-profiler \
113   gnunet-daemon-regexprofiler
114
115 gnunet_regex_profiler_SOURCES = \
116   gnunet-regex-profiler.c
117 gnunet_regex_profiler_LDADD = \
118   $(top_builddir)/src/util/libgnunetutil.la \
119   $(top_builddir)/src/testbed/libgnunettestbed.la \
120   $(top_builddir)/src/mesh/libgnunetmesh.la \
121   $(top_builddir)/src/regex/libgnunetregex.la \
122   $(top_builddir)/src/statistics/libgnunetstatistics.la
123 gnunet_regex_profiler_DEPENDENCIES = \
124    libgnunetmesh.la
125
126 gnunet_daemon_regexprofiler_SOURCES = \
127   gnunet-daemon-regexprofiler.c
128 gnunet_daemon_regexprofiler_LDADD = \
129   $(top_builddir)/src/util/libgnunetutil.la \
130   $(top_builddir)/src/mesh/libgnunetmesh.la \
131   $(top_builddir)/src/statistics/libgnunetstatistics.la
132 gnunet_daemon_regexprofiler_DEPENDENCIES = \
133   libgnunetmesh.la
134
135 noinst_LIBRARIES = libgnunetmeshtest.a
136
137 libgnunetmeshtest_a_SOURCES = \
138   mesh_test_lib.c mesh_test_lib.h
139 libgnunetmeshtest_a_LIBADD = \
140  $(top_builddir)/src/util/libgnunetutil.la \
141  $(top_builddir)/src/testbed/libgnunettestbed.la \
142  $(top_builddir)/src/mesh/libgnunetmesh.la
143 libgnunetmeshtest_a_DEPENDENCIES = \
144   libgnunetmesh.la
145
146
147 check_PROGRAMS = \
148  test_mesh_api \
149  test_mesh_tree_api \
150  test_mesh_local_1 \
151  test_mesh_local_2 \
152  test_mesh_local_traffic_fwd \
153  test_mesh_local_traffic_bck \
154  test_mesh_local_traffic_both \
155  test_mesh_2dtorus \
156  test_mesh_regex \
157  test_mesh_small_unicast \
158  test_mesh_small_multicast \
159  test_mesh_small_signal \
160  test_mesh_small_speed \
161  test_mesh_small_speed_nobuf \
162  test_mesh_small_speed_min \
163  test_mesh_small_speed_backwards \
164  test_mesh_small_speed_nobuf_backwards \
165  test_mesh_small_speed_min_backwards \
166  test_mesh_small_speed_ack
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_regex_SOURCES = \
249  test_mesh_regex.c
250 test_mesh_regex_LDADD = $(ld_mesh_test_lib)
251 test_mesh_regex_DEPENDENCIES = $(dep_mesh_test_lib)
252
253 test_mesh_small_unicast_SOURCES = \
254  test_mesh_small.c
255 test_mesh_small_unicast_LDADD = $(ld_mesh_test_lib)
256 test_mesh_small_unicast_DEPENDENCIES = $(dep_mesh_test_lib)
257
258 test_mesh_small_multicast_SOURCES = \
259  test_mesh_small.c
260 test_mesh_small_multicast_LDADD = $(ld_mesh_test_lib)
261 test_mesh_small_multicast_DEPENDENCIES = $(dep_mesh_test_lib)
262
263 test_mesh_small_signal_SOURCES = \
264  test_mesh_small.c
265 test_mesh_small_signal_LDADD = $(ld_mesh_test_lib)
266 test_mesh_small_signal_DEPENDENCIES = $(dep_mesh_test_lib)
267
268 test_mesh_small_speed_ack_SOURCES = \
269  test_mesh_small.c
270 test_mesh_small_speed_ack_LDADD = $(ld_mesh_test_lib)
271 test_mesh_small_speed_ack_DEPENDENCIES = $(dep_mesh_test_lib)
272
273 test_mesh_small_speed_SOURCES = \
274  test_mesh_small.c
275 test_mesh_small_speed_LDADD = $(ld_mesh_test_lib)
276 test_mesh_small_speed_DEPENDENCIES = $(dep_mesh_test_lib)
277
278 test_mesh_small_speed_min_SOURCES = \
279  test_mesh_small.c
280 test_mesh_small_speed_min_LDADD = $(ld_mesh_test_lib)
281 test_mesh_small_speed_min_DEPENDENCIES = $(dep_mesh_test_lib)
282
283 test_mesh_small_speed_nobuf_SOURCES = \
284  test_mesh_small.c
285 test_mesh_small_speed_nobuf_LDADD = $(ld_mesh_test_lib)
286 test_mesh_small_speed_nobuf_DEPENDENCIES = $(dep_mesh_test_lib)
287
288 test_mesh_small_speed_backwards_SOURCES = \
289  test_mesh_small.c
290 test_mesh_small_speed_backwards_LDADD = $(ld_mesh_test_lib)
291 test_mesh_small_speed_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
292
293 test_mesh_small_speed_min_backwards_SOURCES = \
294  test_mesh_small.c
295 test_mesh_small_speed_min_backwards_LDADD = $(ld_mesh_test_lib)
296 test_mesh_small_speed_min_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
297
298 test_mesh_small_speed_nobuf_backwards_SOURCES = \
299  test_mesh_small.c
300 test_mesh_small_speed_nobuf_backwards_LDADD = $(ld_mesh_test_lib)
301 test_mesh_small_speed_nobuf_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
302
303
304 if ENABLE_TEST_RUN
305 TESTS = test_mesh_api \
306  test_mesh_tree_api \
307  test_mesh_local_1 test_mesh_local_2 \
308  test_mesh_local_traffic_fwd \
309  test_mesh_local_traffic_bck \
310  test_mesh_local_traffic_both \
311  test_mesh_2dtorus test_mesh_regex \
312  test_mesh_small_unicast test_mesh_small_multicast \
313  test_mesh_small_signal \
314  test_mesh_small_speed \
315  test_mesh_small_speed_min \
316  test_mesh_small_speed_nobuf \
317  test_mesh_small_speed_backwards \
318  test_mesh_small_speed_min_backwards
319 endif
320
321 EXTRA_DIST = \
322   mesh.h mesh_protocol.h \
323   test_mesh.conf \
324   test_mesh_2dtorus.conf \
325   test_mesh_small.conf