6f38c6a94a71fff639cededc252fb53a3b791606
[oweals/gnunet.git] / src / cadet / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 if MINGW
5   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
6 endif
7
8 if USE_COVERAGE
9   AM_CFLAGS = --coverage -O0
10   XLIB = -lgcov
11 endif
12
13 pkgcfgdir= $(pkgdatadir)/config.d/
14
15 libexecdir= $(pkglibdir)/libexec/
16
17 pkgcfg_DATA = \
18   cadet.conf
19
20 plugindir = $(libdir)/gnunet
21
22 AM_CLFAGS = -g
23
24 libexec_PROGRAMS = \
25  gnunet-service-cadet \
26  gnunet-service-cadet-new \
27  $(EXP_LIBEXEC)
28
29 bin_PROGRAMS = \
30  gnunet-cadet
31
32 lib_LTLIBRARIES = \
33   libgnunetcadetnew.la \
34   libgnunetcadet.la \
35   $(EXP_LIB)
36
37 libgnunetcadet_la_SOURCES = \
38   cadet_api.c cadet_common.c
39 libgnunetcadet_la_LIBADD = \
40   $(top_builddir)/src/util/libgnunetutil.la \
41   $(XLIB) \
42   $(LTLIBINTL)
43 libgnunetcadet_la_LDFLAGS = \
44   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
45   -version-info 5:0:0
46
47
48 libgnunetcadetnew_la_SOURCES = \
49   cadet_api_new.c
50 libgnunetcadetnew_la_LIBADD = \
51   $(top_builddir)/src/util/libgnunetutil.la \
52   $(XLIB) \
53   $(LTLIBINTL)
54 libgnunetcadetnew_la_LDFLAGS = \
55   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
56   -version-info 6:0:0
57
58 gnunet_cadet_SOURCES = \
59   gnunet-cadet.c
60 gnunet_cadet_LDADD = \
61   libgnunetcadetnew.la \
62   $(top_builddir)/src/util/libgnunetutil.la
63
64 gnunet_service_cadet_new_SOURCES = \
65  gnunet-service-cadet-new.c gnunet-service-cadet-new.h \
66  gnunet-service-cadet-new_channel.c gnunet-service-cadet-new_channel.h \
67  gnunet-service-cadet-new_connection.c gnunet-service-cadet-new_connection.h \
68  gnunet-service-cadet-new_core.c gnunet-service-cadet-new_core.h \
69  gnunet-service-cadet-new_dht.c gnunet-service-cadet-new_dht.h \
70  gnunet-service-cadet-new_hello.c gnunet-service-cadet-new_hello.h \
71  gnunet-service-cadet-new_tunnels.c gnunet-service-cadet-new_tunnels.h \
72  gnunet-service-cadet-new_paths.c gnunet-service-cadet-new_paths.h \
73  gnunet-service-cadet-new_peer.c gnunet-service-cadet-new_peer.h
74 gnunet_service_cadet_new_LDADD = \
75   $(top_builddir)/src/util/libgnunetutil.la \
76   $(top_builddir)/src/ats/libgnunetats.la \
77   $(top_builddir)/src/core/libgnunetcore.la \
78   $(top_builddir)/src/dht/libgnunetdht.la \
79   $(top_builddir)/src/statistics/libgnunetstatistics.la \
80   $(top_builddir)/src/transport/libgnunettransport.la \
81   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
82   $(top_builddir)/src/hello/libgnunethello.la \
83   $(top_builddir)/src/block/libgnunetblock.la
84
85 gnunet_service_cadet_SOURCES = \
86  gnunet-service-cadet_tunnel.c gnunet-service-cadet_tunnel.h \
87  gnunet-service-cadet_connection.c gnunet-service-cadet_connection.h \
88  gnunet-service-cadet_channel.c gnunet-service-cadet_channel.h \
89  gnunet-service-cadet_local.c gnunet-service-cadet_local.h \
90  gnunet-service-cadet_peer.c gnunet-service-cadet_peer.h \
91  gnunet-service-cadet_dht.c gnunet-service-cadet_dht.h \
92  gnunet-service-cadet_hello.c gnunet-service-cadet_hello.h \
93  cadet_path.c cadet_path.h \
94  cadet_common.c \
95  gnunet-service-cadet.c
96 gnunet_service_cadet_CFLAGS = $(AM_CFLAGS)
97 gnunet_service_cadet_LDADD = \
98   $(top_builddir)/src/util/libgnunetutil.la \
99   $(top_builddir)/src/transport/libgnunettransport.la \
100   $(top_builddir)/src/core/libgnunetcore.la \
101   $(top_builddir)/src/ats/libgnunetats.la \
102   $(top_builddir)/src/dht/libgnunetdht.la \
103   $(top_builddir)/src/statistics/libgnunetstatistics.la \
104   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
105   $(top_builddir)/src/hello/libgnunethello.la \
106   $(top_builddir)/src/block/libgnunetblock.la
107 if LINUX
108   gnunet_service_cadet_LDFLAGS = -lrt
109 endif
110
111
112 if HAVE_TESTING
113  noinst_LIBRARIES = libgnunetcadettest.a libgnunetcadettestnew.a $(noinst_LIB_EXP)
114  noinst_PROGRAMS = gnunet-cadet-profiler
115 endif
116
117 libgnunetcadettest_a_SOURCES = \
118   cadet_test_lib.c cadet_test_lib.h
119 libgnunetcadettest_a_LIBADD = \
120  $(top_builddir)/src/util/libgnunetutil.la \
121  $(top_builddir)/src/testbed/libgnunettestbed.la \
122  libgnunetcadet.la
123
124 if HAVE_TESTING
125 check_PROGRAMS = \
126   test_cadet_local_mq \
127   test_cadet_2_forward_new \
128   test_cadet_single \
129   test_cadet_local \
130   test_cadet_2_forward \
131   test_cadet_2_signal \
132   test_cadet_2_keepalive \
133   test_cadet_2_speed \
134   test_cadet_2_speed_ack \
135   test_cadet_2_speed_backwards \
136   test_cadet_2_speed_reliable \
137   test_cadet_2_speed_reliable_backwards \
138   test_cadet_5_forward \
139   test_cadet_5_signal \
140   test_cadet_5_keepalive \
141   test_cadet_5_speed \
142   test_cadet_5_speed_ack \
143   test_cadet_5_speed_reliable \
144   test_cadet_5_speed_reliable_backwards \
145   test_cadet_5_speed_backwards
146 endif
147
148 ld_cadet_test_lib = \
149   $(top_builddir)/src/util/libgnunetutil.la \
150   $(top_builddir)/src/testing/libgnunettesting.la \
151   libgnunetcadettest.a \
152   libgnunetcadetnew.la \
153   $(top_builddir)/src/testbed/libgnunettestbed.la \
154   $(top_builddir)/src/statistics/libgnunetstatistics.la
155
156 dep_cadet_test_lib = \
157   libgnunetcadetnew.la \
158   libgnunetcadettest.a \
159   $(top_builddir)/src/statistics/libgnunetstatistics.la
160
161
162 gnunet_cadet_profiler_SOURCES = \
163   gnunet-cadet-profiler.c
164 gnunet_cadet_profiler_LDADD = $(ld_cadet_test_lib)
165
166
167 test_cadet_single_SOURCES = \
168   test_cadet_single.c
169 test_cadet_single_LDADD = $(ld_cadet_test_lib)
170
171 test_cadet_local_SOURCES = \
172   test_cadet_local.c
173 test_cadet_local_LDADD = $(ld_cadet_test_lib)
174
175
176 test_cadet_local_mq_SOURCES = \
177   test_cadet_local_mq.c
178 test_cadet_local_mq_LDADD = \
179   libgnunetcadetnew.la \
180   $(top_builddir)/src/testing/libgnunettesting.la \
181   $(top_builddir)/src/util/libgnunetutil.la
182
183 test_cadet_2_forward_SOURCES = \
184   test_cadet.c
185 test_cadet_2_forward_LDADD = $(ld_cadet_test_lib)
186
187 test_cadet_2_signal_SOURCES = \
188   test_cadet.c
189 test_cadet_2_signal_LDADD = $(ld_cadet_test_lib)
190
191 test_cadet_2_keepalive_SOURCES = \
192   test_cadet.c
193 test_cadet_2_keepalive_LDADD = $(ld_cadet_test_lib)
194
195 test_cadet_2_speed_SOURCES = \
196   test_cadet.c
197 test_cadet_2_speed_LDADD = $(ld_cadet_test_lib)
198
199 test_cadet_2_speed_ack_SOURCES = \
200   test_cadet.c
201 test_cadet_2_speed_ack_LDADD = $(ld_cadet_test_lib)
202
203 test_cadet_2_speed_backwards_SOURCES = \
204   test_cadet.c
205 test_cadet_2_speed_backwards_LDADD = $(ld_cadet_test_lib)
206
207 test_cadet_2_speed_reliable_SOURCES = \
208   test_cadet.c
209 test_cadet_2_speed_reliable_LDADD = $(ld_cadet_test_lib)
210
211 test_cadet_2_speed_reliable_backwards_SOURCES = \
212   test_cadet.c
213 test_cadet_2_speed_reliable_backwards_LDADD = $(ld_cadet_test_lib)
214
215
216 test_cadet_5_forward_SOURCES = \
217   test_cadet.c
218 test_cadet_5_forward_LDADD = $(ld_cadet_test_lib)
219
220 test_cadet_5_signal_SOURCES = \
221   test_cadet.c
222 test_cadet_5_signal_LDADD = $(ld_cadet_test_lib)
223
224 test_cadet_5_keepalive_SOURCES = \
225   test_cadet.c
226 test_cadet_5_keepalive_LDADD = $(ld_cadet_test_lib)
227
228 test_cadet_5_speed_SOURCES = \
229   test_cadet.c
230 test_cadet_5_speed_LDADD = $(ld_cadet_test_lib)
231
232 test_cadet_5_speed_ack_SOURCES = \
233   test_cadet.c
234 test_cadet_5_speed_ack_LDADD = $(ld_cadet_test_lib)
235
236 test_cadet_5_speed_backwards_SOURCES = \
237   test_cadet.c
238 test_cadet_5_speed_backwards_LDADD = $(ld_cadet_test_lib)
239
240 test_cadet_5_speed_reliable_SOURCES = \
241   test_cadet.c
242 test_cadet_5_speed_reliable_LDADD = $(ld_cadet_test_lib)
243
244 test_cadet_5_speed_reliable_backwards_SOURCES = \
245   test_cadet.c
246 test_cadet_5_speed_reliable_backwards_LDADD = $(ld_cadet_test_lib)
247
248
249 # NEW TESTS
250 libgnunetcadettestnew_a_SOURCES = \
251   cadet_test_lib_new.c cadet_test_lib_new.h
252 libgnunetcadettestnew_a_LIBADD = \
253  $(top_builddir)/src/util/libgnunetutil.la \
254  $(top_builddir)/src/testbed/libgnunettestbed.la \
255  libgnunetcadetnew.la
256
257 ld_cadet_test_lib_new = \
258   $(top_builddir)/src/util/libgnunetutil.la \
259   $(top_builddir)/src/testing/libgnunettesting.la \
260   libgnunetcadetnew.la \
261   libgnunetcadettestnew.a \
262   $(top_builddir)/src/testbed/libgnunettestbed.la \
263   $(top_builddir)/src/statistics/libgnunetstatistics.la
264 dep_cadet_test_lib_new = \
265   libgnunetcadetnew.la \
266   libgnunetcadettestnew.a \
267   $(top_builddir)/src/statistics/libgnunetstatistics.la
268
269 test_cadet_2_forward_new_SOURCES = \
270   test_cadet_new.c
271 test_cadet_2_forward_new_LDADD = $(ld_cadet_test_lib_new)
272
273
274 if ENABLE_TEST_RUN
275 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
276 TESTS = \
277  $(check_PROGRAMS)
278 endif
279
280 EXTRA_DIST = \
281   cadet.h cadet_protocol.h \
282   test_cadet.conf \
283   test_cadet_drop.conf