- use new mesh for test_mesh_local
[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 EXP_LIB = \
24  libgnunetmeshenc.la
25
26 EXP_LIBEXEC = \
27  gnunet-service-mesh-enc
28
29 libexec_PROGRAMS = \
30  gnunet-service-mesh $(EXP_LIBEXEC)
31
32 bin_PROGRAMS = \
33  gnunet-mesh
34
35 lib_LTLIBRARIES = \
36   libgnunetmesh.la $(EXP_LIB)
37
38 plugin_LTLIBRARIES = \
39  libgnunet_plugin_block_mesh.la
40
41 libgnunet_plugin_block_mesh_la_SOURCES = \
42  plugin_block_mesh.c
43 libgnunet_plugin_block_mesh_la_LIBADD = \
44  $(top_builddir)/src/block/libgnunetblock.la \
45  $(top_builddir)/src/util/libgnunetutil.la
46 libgnunet_plugin_block_mesh_la_LDFLAGS = \
47  $(GN_PLUGIN_LDFLAGS)
48 libgnunet_plugin_block_mesh_la_DEPENDENCIES = \
49  $(top_builddir)/src/block/libgnunetblock.la \
50  $(top_builddir)/src/util/libgnunetutil.la
51
52
53 libgnunetmesh_la_SOURCES = \
54   mesh_api.c mesh_common.c
55 libgnunetmesh_la_LIBADD = \
56   $(top_builddir)/src/util/libgnunetutil.la \
57   $(XLIB) \
58   $(LTLIBINTL)
59 libgnunetmesh_la_LDFLAGS = \
60   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
61   -version-info 3:0:0
62
63
64 libgnunetmeshenc_la_SOURCES = \
65   mesh_api_enc.c mesh_common.c
66 libgnunetmeshenc_la_LIBADD = \
67   $(top_builddir)/src/util/libgnunetutil.la \
68   $(XLIB) \
69   $(LTLIBINTL)
70 libgnunetmeshenc_la_LDFLAGS = \
71   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
72   -version-info 1:0:0
73
74
75 gnunet_mesh_SOURCES = \
76   gnunet-mesh.c
77 gnunet_mesh_LDADD = \
78   $(top_builddir)/src/mesh/libgnunetmesh.la \
79   $(top_builddir)/src/util/libgnunetutil.la
80 gnunet_mesh_DEPENDENCIES = \
81   libgnunetmesh.la
82
83 gnunet_service_mesh_SOURCES = \
84  gnunet-service-mesh.c \
85  mesh_path.c \
86  mesh_common.c
87 gnunet_service_mesh_CFLAGS = $(AM_CFLAGS)
88 gnunet_service_mesh_LDADD = \
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 gnunet_service_mesh_DEPENDENCIES = \
95   $(top_builddir)/src/util/libgnunetutil.la \
96   $(top_builddir)/src/core/libgnunetcore.la \
97   $(top_builddir)/src/dht/libgnunetdht.la \
98   $(top_builddir)/src/statistics/libgnunetstatistics.la \
99   $(top_builddir)/src/block/libgnunetblock.la
100 if LINUX
101   gnunet_service_mesh_LDFLAGS = -lrt
102 endif
103
104 gnunet_service_mesh_enc_SOURCES = \
105  gnunet-service-mesh-enc.c \
106  mesh_path.c \
107  mesh_common.c
108 gnunet_service_mesh_enc_CFLAGS = $(AM_CFLAGS)
109 gnunet_service_mesh_enc_LDADD = \
110   $(top_builddir)/src/util/libgnunetutil.la \
111   $(top_builddir)/src/core/libgnunetcore.la \
112   $(top_builddir)/src/dht/libgnunetdht.la \
113   $(top_builddir)/src/statistics/libgnunetstatistics.la \
114   $(top_builddir)/src/block/libgnunetblock.la
115 gnunet_service_mesh_enc_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 if LINUX
122   gnunet_service_mesh_enc_LDFLAGS = -lrt
123 endif
124
125
126 if HAVE_TESTING
127 noinst_LIBRARIES = libgnunetmeshtest.a $(noinst_LIB_EXP)
128 endif
129
130 libgnunetmeshtest_a_SOURCES = \
131   mesh_test_lib.c mesh_test_lib.h
132 libgnunetmeshtest_a_LIBADD = \
133  $(top_builddir)/src/util/libgnunetutil.la \
134  $(top_builddir)/src/testbed/libgnunettestbed.la \
135  $(top_builddir)/src/mesh/libgnunetmeshenc.la
136 libgnunetmeshtest_a_DEPENDENCIES = \
137   libgnunetmeshenc.la
138
139 if HAVE_TESTING
140 check_PROGRAMS = \
141   test_mesh_single \
142   test_mesh_local \
143   test_mesh_small_forward \
144   test_mesh_small_signal  \
145   test_mesh_small_speed  \
146   test_mesh_small_speed_ack  \
147   test_mesh_small_speed_nobuf  \
148   test_mesh_small_speed_backwards  \
149   test_mesh_small_speed_nobuf_backwards \
150   test_mesh_small_speed_reliable \
151   test_mesh_small_speed_reliable_backwards
152 endif
153
154 ld_mesh_test_lib = \
155   $(top_builddir)/src/util/libgnunetutil.la \
156   $(top_builddir)/src/testing/libgnunettesting.la \
157   $(top_builddir)/src/mesh/libgnunetmeshtest.a \
158   $(top_builddir)/src/mesh/libgnunetmeshenc.la \
159   $(top_builddir)/src/testbed/libgnunettestbed.la
160
161 dep_mesh_test_lib = \
162   libgnunetmeshenc.la \
163   libgnunetmeshtest.a
164
165 test_mesh_single_SOURCES = \
166   test_mesh_single.c
167 test_mesh_single_LDADD = $(ld_mesh_test_lib)
168 test_mesh_single_DEPENDENCIES = $(dep_mesh_test_lib)
169
170 test_mesh_local_SOURCES = \
171   test_mesh_local.c
172 test_mesh_local_LDADD = $(ld_mesh_test_lib)
173 test_mesh_local_DEPENDENCIES = $(dep_mesh_test_lib)
174
175 test_mesh_small_forward_SOURCES = \
176   test_mesh_small.c
177 test_mesh_small_forward_LDADD = $(ld_mesh_test_lib)
178 test_mesh_small_forward_DEPENDENCIES = $(dep_mesh_test_lib)
179
180 test_mesh_small_signal_SOURCES = \
181   test_mesh_small.c
182 test_mesh_small_signal_LDADD = $(ld_mesh_test_lib)
183 test_mesh_small_signal_DEPENDENCIES = $(dep_mesh_test_lib)
184
185 test_mesh_small_speed_SOURCES = \
186   test_mesh_small.c
187 test_mesh_small_speed_LDADD = $(ld_mesh_test_lib)
188 test_mesh_small_speed_DEPENDENCIES = $(dep_mesh_test_lib)
189
190 test_mesh_small_speed_ack_SOURCES = \
191   test_mesh_small.c
192 test_mesh_small_speed_ack_LDADD = $(ld_mesh_test_lib)
193 test_mesh_small_speed_ack_DEPENDENCIES = $(dep_mesh_test_lib)
194
195 test_mesh_small_speed_nobuf_SOURCES = \
196   test_mesh_small.c
197 test_mesh_small_speed_nobuf_LDADD = $(ld_mesh_test_lib)
198 test_mesh_small_speed_nobuf_DEPENDENCIES = $(dep_mesh_test_lib)
199
200 test_mesh_small_speed_backwards_SOURCES = \
201   test_mesh_small.c
202 test_mesh_small_speed_backwards_LDADD = $(ld_mesh_test_lib)
203 test_mesh_small_speed_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
204
205 test_mesh_small_speed_nobuf_backwards_SOURCES = \
206   test_mesh_small.c
207 test_mesh_small_speed_nobuf_backwards_LDADD = $(ld_mesh_test_lib)
208 test_mesh_small_speed_nobuf_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
209
210 test_mesh_small_speed_reliable_SOURCES = \
211   test_mesh_small.c
212 test_mesh_small_speed_reliable_LDADD = $(ld_mesh_test_lib)
213 test_mesh_small_speed_reliable_DEPENDENCIES = $(dep_mesh_test_lib)
214
215 test_mesh_small_speed_reliable_backwards_SOURCES = \
216   test_mesh_small.c
217 test_mesh_small_speed_reliable_backwards_LDADD = $(ld_mesh_test_lib)
218 test_mesh_small_speed_reliable_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
219
220
221 if ENABLE_TEST_RUN
222 TESTS = \
223  $(check_PROGRAMS)
224 endif
225
226 EXTRA_DIST = \
227   mesh.h mesh_protocol.h \
228   test_mesh.conf