- add separate encryption enabled mesh to avoid breakage during developement
[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-enc $(EXP_LIBEXEC)
25
26 bin_PROGRAMS = \
27  gnunet-mesh
28
29 lib_LTLIBRARIES = \
30   libgnunetmesh.la $(EXP_LIB)
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
47 libgnunetmesh_la_SOURCES = \
48   mesh_api.c mesh_common.c
49 libgnunetmesh_la_LIBADD = \
50   $(top_builddir)/src/util/libgnunetutil.la \
51   $(XLIB) \
52   $(LTLIBINTL)
53 libgnunetmesh_la_LDFLAGS = \
54   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
55   -version-info 3:0:0
56
57 gnunet_mesh_SOURCES = \
58   gnunet-mesh.c
59 gnunet_mesh_LDADD = \
60   $(top_builddir)/src/mesh/libgnunetmesh.la \
61   $(top_builddir)/src/util/libgnunetutil.la
62 gnunet_mesh_DEPENDENCIES = \
63   libgnunetmesh.la
64
65 gnunet_service_mesh_SOURCES = \
66  gnunet-service-mesh.c \
67  mesh_path.c \
68  mesh_common.c
69 gnunet_service_mesh_CFLAGS = $(AM_CFLAGS)
70 gnunet_service_mesh_LDADD = \
71   $(top_builddir)/src/util/libgnunetutil.la \
72   $(top_builddir)/src/core/libgnunetcore.la \
73   $(top_builddir)/src/dht/libgnunetdht.la \
74   $(top_builddir)/src/statistics/libgnunetstatistics.la \
75   $(top_builddir)/src/block/libgnunetblock.la
76 gnunet_service_mesh_DEPENDENCIES = \
77   $(top_builddir)/src/util/libgnunetutil.la \
78   $(top_builddir)/src/core/libgnunetcore.la \
79   $(top_builddir)/src/dht/libgnunetdht.la \
80   $(top_builddir)/src/statistics/libgnunetstatistics.la \
81   $(top_builddir)/src/block/libgnunetblock.la
82 if LINUX
83   gnunet_service_mesh_LDFLAGS = -lrt
84 endif
85
86 gnunet_service_mesh_enc_SOURCES = \
87  gnunet-service-mesh-enc.c \
88  mesh_path.c \
89  mesh_common.c
90 gnunet_service_mesh_enc_CFLAGS = $(AM_CFLAGS)
91 gnunet_service_mesh_enc_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_enc_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_enc_LDFLAGS = -lrt
105 endif
106
107
108 if HAVE_TESTING
109 noinst_LIBRARIES = libgnunetmeshtest.a $(noinst_LIB_EXP)
110 endif
111
112 libgnunetmeshtest_a_SOURCES = \
113   mesh_test_lib.c mesh_test_lib.h
114 libgnunetmeshtest_a_LIBADD = \
115  $(top_builddir)/src/util/libgnunetutil.la \
116  $(top_builddir)/src/testbed/libgnunettestbed.la \
117  $(top_builddir)/src/mesh/libgnunetmesh.la
118 libgnunetmeshtest_a_DEPENDENCIES = \
119   libgnunetmesh.la
120
121 if HAVE_TESTING
122 check_PROGRAMS = \
123   test_mesh_single \
124   test_mesh_local \
125   test_mesh_small_forward \
126   test_mesh_small_signal  \
127   test_mesh_small_speed  \
128   test_mesh_small_speed_ack  \
129   test_mesh_small_speed_nobuf  \
130   test_mesh_small_speed_backwards  \
131   test_mesh_small_speed_nobuf_backwards \
132   test_mesh_small_speed_reliable \
133   test_mesh_small_speed_reliable_backwards
134 endif
135
136 ld_mesh_test_lib = \
137   $(top_builddir)/src/util/libgnunetutil.la \
138   $(top_builddir)/src/testing/libgnunettesting.la \
139   $(top_builddir)/src/mesh/libgnunetmeshtest.a \
140   $(top_builddir)/src/mesh/libgnunetmesh.la \
141   $(top_builddir)/src/testbed/libgnunettestbed.la
142
143 dep_mesh_test_lib = \
144   libgnunetmesh.la \
145   libgnunetmeshtest.a
146
147 test_mesh_single_SOURCES = \
148   test_mesh_single.c
149 test_mesh_single_LDADD = $(ld_mesh_test_lib)
150 test_mesh_single_DEPENDENCIES = $(dep_mesh_test_lib)
151
152 test_mesh_local_SOURCES = \
153   test_mesh_local.c
154 test_mesh_local_LDADD = $(ld_mesh_test_lib)
155 test_mesh_local_DEPENDENCIES = $(dep_mesh_test_lib)
156
157 test_mesh_small_forward_SOURCES = \
158   test_mesh_small.c
159 test_mesh_small_forward_LDADD = $(ld_mesh_test_lib)
160 test_mesh_small_forward_DEPENDENCIES = $(dep_mesh_test_lib)
161
162 test_mesh_small_signal_SOURCES = \
163   test_mesh_small.c
164 test_mesh_small_signal_LDADD = $(ld_mesh_test_lib)
165 test_mesh_small_signal_DEPENDENCIES = $(dep_mesh_test_lib)
166
167 test_mesh_small_speed_SOURCES = \
168   test_mesh_small.c
169 test_mesh_small_speed_LDADD = $(ld_mesh_test_lib)
170 test_mesh_small_speed_DEPENDENCIES = $(dep_mesh_test_lib)
171
172 test_mesh_small_speed_ack_SOURCES = \
173   test_mesh_small.c
174 test_mesh_small_speed_ack_LDADD = $(ld_mesh_test_lib)
175 test_mesh_small_speed_ack_DEPENDENCIES = $(dep_mesh_test_lib)
176
177 test_mesh_small_speed_nobuf_SOURCES = \
178   test_mesh_small.c
179 test_mesh_small_speed_nobuf_LDADD = $(ld_mesh_test_lib)
180 test_mesh_small_speed_nobuf_DEPENDENCIES = $(dep_mesh_test_lib)
181
182 test_mesh_small_speed_backwards_SOURCES = \
183   test_mesh_small.c
184 test_mesh_small_speed_backwards_LDADD = $(ld_mesh_test_lib)
185 test_mesh_small_speed_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
186
187 test_mesh_small_speed_nobuf_backwards_SOURCES = \
188   test_mesh_small.c
189 test_mesh_small_speed_nobuf_backwards_LDADD = $(ld_mesh_test_lib)
190 test_mesh_small_speed_nobuf_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
191
192 test_mesh_small_speed_reliable_SOURCES = \
193   test_mesh_small.c
194 test_mesh_small_speed_reliable_LDADD = $(ld_mesh_test_lib)
195 test_mesh_small_speed_reliable_DEPENDENCIES = $(dep_mesh_test_lib)
196
197 test_mesh_small_speed_reliable_backwards_SOURCES = \
198   test_mesh_small.c
199 test_mesh_small_speed_reliable_backwards_LDADD = $(ld_mesh_test_lib)
200 test_mesh_small_speed_reliable_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
201
202
203 if ENABLE_TEST_RUN
204 TESTS = \
205  $(check_PROGRAMS)
206 endif
207
208 EXTRA_DIST = \
209   mesh.h mesh_protocol.h \
210   test_mesh.conf