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