- added timing debug macros, improved local root->leaf performance ~20%
[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 pkgcfg_DATA = \
15   mesh.conf
16
17 plugindir = $(libdir)/gnunet
18
19 AM_CLFAGS = -g
20
21 bin_PROGRAMS = \
22  gnunet-service-mesh
23
24 lib_LTLIBRARIES = \
25   libgnunetmesh.la \
26   libgnunetmeshblock.la
27
28 plugin_LTLIBRARIES = \
29  libgnunet_plugin_block_mesh.la
30
31 libgnunet_plugin_block_mesh_la_SOURCES = \
32  plugin_block_mesh.c
33 libgnunet_plugin_block_mesh_la_LIBADD = \
34  $(top_builddir)/src/mesh/libgnunetmeshblock.la \
35  $(top_builddir)/src/block/libgnunetblock.la \
36  $(top_builddir)/src/util/libgnunetutil.la
37 libgnunet_plugin_block_mesh_la_LDFLAGS = \
38  $(GN_PLUGIN_LDFLAGS)
39 libgnunet_plugin_block_mesh_la_DEPENDENCIES = \
40  libgnunetmeshblock.la \
41  $(top_builddir)/src/block/libgnunetblock.la \
42  $(top_builddir)/src/util/libgnunetutil.la
43
44 libgnunetmesh_la_SOURCES = \
45   mesh_api.c mesh_common.c
46 libgnunetmesh_la_LIBADD = \
47   $(top_builddir)/src/util/libgnunetutil.la \
48   $(XLIB) \
49   $(LTLIBINTL)
50 libgnunetmesh_la_LDFLAGS = \
51   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
52   -version-info 1:0:0
53
54 libgnunetmeshblock_la_SOURCES = \
55   mesh_block_lib.c
56 libgnunetmeshblock_la_LIBADD = \
57   $(top_builddir)/src/util/libgnunetutil.la \
58   $(XLIB) \
59   $(LTLIBINTL)
60 libgnunetmeshblock_la_LDFLAGS = \
61   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
62   -version-info 1:0:0
63
64 gnunet_service_mesh_SOURCES = \
65  gnunet-service-mesh.c \
66  mesh_tunnel_tree.c \
67  mesh_common.c
68 gnunet_service_mesh_CFLAGS = $(AM_CFLAGS)
69 gnunet_service_mesh_LDADD = \
70   $(top_builddir)/src/util/libgnunetutil.la \
71   $(top_builddir)/src/core/libgnunetcore.la \
72   $(top_builddir)/src/dht/libgnunetdht.la \
73   $(top_builddir)/src/statistics/libgnunetstatistics.la \
74   $(top_builddir)/src/block/libgnunetblock.la \
75   $(top_builddir)/src/mesh/libgnunetmeshblock.la \
76   $(top_builddir)/src/regex/libgnunetregex.la
77 gnunet_service_mesh_DEPENDENCIES = \
78   $(top_builddir)/src/util/libgnunetutil.la \
79   $(top_builddir)/src/core/libgnunetcore.la \
80   $(top_builddir)/src/dht/libgnunetdht.la \
81   $(top_builddir)/src/statistics/libgnunetstatistics.la \
82   $(top_builddir)/src/block/libgnunetblock.la \
83   libgnunetmeshblock.la \
84   $(top_builddir)/src/regex/libgnunetregex.la
85 gnunet_service_mesh_LDFLAGS = -lrt
86
87 check_PROGRAMS = \
88  test_mesh_api \
89  test_mesh_tree_api \
90  test_mesh_local_1 \
91  test_mesh_local_2 \
92  test_mesh_local_traffic_fwd \
93  test_mesh_local_traffic_bck \
94  test_mesh_local_traffic_both \
95  test_mesh_2dtorus \
96  test_mesh_regex \
97  test_mesh_small_unicast \
98  test_mesh_small_multicast \
99  test_mesh_small_speed \
100  test_mesh_small_speed_ack
101
102 test_mesh_api_SOURCES = \
103  test_mesh_api.c
104 test_mesh_api_LDADD = \
105  $(top_builddir)/src/util/libgnunetutil.la \
106  $(top_builddir)/src/testing/libgnunettesting.la \
107  $(top_builddir)/src/mesh/libgnunetmesh.la
108 test_mesh_api_DEPENDENCIES = \
109   libgnunetmesh.la \
110    $(top_builddir)/src/util/libgnunetutil.la
111
112 test_mesh_tree_api_SOURCES = \
113  test_mesh_tree_api.c
114 test_mesh_tree_api_LDADD = \
115  $(top_builddir)/src/util/libgnunetutil.la \
116  $(top_builddir)/src/dht/libgnunetdht.la
117 test_mesh_tree_api_DEPENDENCIES = \
118   libgnunetmesh.la \
119   $(top_builddir)/src/dht/libgnunetdht.la
120
121 test_mesh_local_1_SOURCES = \
122  test_mesh_local_1.c
123 test_mesh_local_1_LDADD = \
124  $(top_builddir)/src/util/libgnunetutil.la \
125  $(top_builddir)/src/testing/libgnunettesting.la \
126  $(top_builddir)/src/mesh/libgnunetmesh.la
127 test_mesh_local_1_DEPENDENCIES = \
128   libgnunetmesh.la
129
130 test_mesh_local_2_SOURCES = \
131  test_mesh_local_2.c
132 test_mesh_local_2_LDADD = \
133  $(top_builddir)/src/util/libgnunetutil.la \
134  $(top_builddir)/src/testing/libgnunettesting.la \
135  $(top_builddir)/src/mesh/libgnunetmesh.la
136 test_mesh_local_2_DEPENDENCIES = \
137   libgnunetmesh.la
138
139 test_mesh_local_traffic_fwd_SOURCES = \
140  test_mesh_local_traffic.c
141 test_mesh_local_traffic_fwd_LDADD = \
142  $(top_builddir)/src/util/libgnunetutil.la \
143  $(top_builddir)/src/testing/libgnunettesting.la \
144  $(top_builddir)/src/mesh/libgnunetmesh.la
145 test_mesh_local_traffic_fwd_DEPENDENCIES = \
146   libgnunetmesh.la
147
148 test_mesh_local_traffic_bck_SOURCES = \
149  test_mesh_local_traffic.c
150 test_mesh_local_traffic_bck_LDADD = \
151  $(top_builddir)/src/util/libgnunetutil.la \
152  $(top_builddir)/src/testing/libgnunettesting.la \
153  $(top_builddir)/src/mesh/libgnunetmesh.la
154 test_mesh_local_traffic_bck_DEPENDENCIES = \
155   libgnunetmesh.la
156
157 test_mesh_local_traffic_both_SOURCES = \
158  test_mesh_local_traffic.c
159 test_mesh_local_traffic_both_LDADD = \
160  $(top_builddir)/src/util/libgnunetutil.la \
161  $(top_builddir)/src/testing/libgnunettesting.la \
162  $(top_builddir)/src/mesh/libgnunetmesh.la
163 test_mesh_local_traffic_both_DEPENDENCIES = \
164   libgnunetmesh.la
165
166
167 test_mesh_2dtorus_SOURCES = \
168  test_mesh_2dtorus.c
169 test_mesh_2dtorus_LDADD = \
170   $(top_builddir)/src/util/libgnunetutil.la \
171   $(top_builddir)/src/testing_old/libgnunettesting_old.la
172
173 test_mesh_regex_SOURCES = \
174  test_mesh_regex.c
175 test_mesh_regex_LDADD = \
176   $(top_builddir)/src/mesh/libgnunetmesh.la \
177   $(top_builddir)/src/util/libgnunetutil.la \
178   $(top_builddir)/src/testing_old/libgnunettesting_old.la
179 test_mesh_regex_DEPENDENCIES = \
180   libgnunetmesh.la
181
182
183 test_mesh_small_unicast_SOURCES = \
184  test_mesh_small.c
185 test_mesh_small_unicast_LDADD = \
186   $(top_builddir)/src/mesh/libgnunetmesh.la \
187   $(top_builddir)/src/util/libgnunetutil.la \
188   $(top_builddir)/src/testing_old/libgnunettesting_old.la
189 test_mesh_small_unicast_DEPENDENCIES = \
190   libgnunetmesh.la
191
192 test_mesh_small_multicast_SOURCES = \
193  test_mesh_small.c
194 test_mesh_small_multicast_LDADD = \
195   $(top_builddir)/src/mesh/libgnunetmesh.la \
196   $(top_builddir)/src/util/libgnunetutil.la \
197   $(top_builddir)/src/testing_old/libgnunettesting_old.la
198 test_mesh_small_multicast_DEPENDENCIES = \
199   libgnunetmesh.la
200
201 test_mesh_small_speed_SOURCES = \
202  test_mesh_small.c
203 test_mesh_small_speed_LDADD = \
204   $(top_builddir)/src/mesh/libgnunetmesh.la \
205   $(top_builddir)/src/util/libgnunetutil.la \
206   $(top_builddir)/src/testing_old/libgnunettesting_old.la
207 test_mesh_small_speed_DEPENDENCIES = \
208   libgnunetmesh.la
209
210 test_mesh_small_speed_ack_SOURCES = \
211  test_mesh_small.c
212 test_mesh_small_speed_ack_LDADD = \
213   $(top_builddir)/src/mesh/libgnunetmesh.la \
214   $(top_builddir)/src/util/libgnunetutil.la \
215   $(top_builddir)/src/testing_old/libgnunettesting_old.la
216 test_mesh_small_speed_ack_DEPENDENCIES = \
217   libgnunetmesh.la
218
219 if ENABLE_TEST_RUN
220 TESTS = test_mesh_api \
221  test_mesh_tree_api \
222  test_mesh_local_1 test_mesh_local_2 \
223  test_mesh_local_traffic_fwd \
224  test_mesh_local_traffic_bck \
225  test_mesh_local_traffic_both \
226  test_mesh_2dtorus test_mesh_regex \
227  test_mesh_small_unicast test_mesh_small_multicast
228 endif
229
230 EXTRA_DIST = \
231   test_mesh.conf \
232   test_mesh_2dtorus.conf \
233   test_mesh_small.conf \
234   test_mesh_path.conf