- don't break if connection is empty (no messages to dequeue/call callback)
[oweals/gnunet.git] / src / cadet / Makefile.am
1 AM_CPPFLAGS = -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   cadet.conf
18
19 plugindir = $(libdir)/gnunet
20
21 AM_CLFAGS = -g
22
23 libexec_PROGRAMS = \
24  gnunet-service-cadet $(EXP_LIBEXEC)
25
26 bin_PROGRAMS = \
27  gnunet-cadet
28
29 lib_LTLIBRARIES = \
30   libgnunetcadet.la $(EXP_LIB)
31
32 libgnunetcadet_la_SOURCES = \
33   cadet_api.c cadet_common.c
34 libgnunetcadet_la_LIBADD = \
35   $(top_builddir)/src/util/libgnunetutil.la \
36   $(XLIB) \
37   $(LTLIBINTL)
38 libgnunetcadet_la_LDFLAGS = \
39   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
40   -version-info 5:0:0
41
42 gnunet_cadet_SOURCES = \
43   gnunet-cadet.c
44 gnunet_cadet_LDADD = \
45   libgnunetcadet.la \
46   $(top_builddir)/src/util/libgnunetutil.la
47
48 gnunet_service_cadet_SOURCES = \
49  gnunet-service-cadet_tunnel.c gnunet-service-cadet_tunnel.h \
50  gnunet-service-cadet_connection.c gnunet-service-cadet_connection.h \
51  gnunet-service-cadet_channel.c gnunet-service-cadet_channel.h \
52  gnunet-service-cadet_local.c gnunet-service-cadet_local.h \
53  gnunet-service-cadet_peer.c gnunet-service-cadet_peer.h \
54  gnunet-service-cadet_dht.c gnunet-service-cadet_dht.h \
55  gnunet-service-cadet_hello.c gnunet-service-cadet_hello.h \
56  cadet_path.c cadet_path.h \
57  cadet_common.c \
58  gnunet-service-cadet.c
59 gnunet_service_cadet_CFLAGS = $(AM_CFLAGS)
60 gnunet_service_cadet_LDADD = \
61   $(top_builddir)/src/util/libgnunetutil.la \
62   $(top_builddir)/src/transport/libgnunettransport.la \
63   $(top_builddir)/src/core/libgnunetcore.la \
64   $(top_builddir)/src/dht/libgnunetdht.la \
65   $(top_builddir)/src/statistics/libgnunetstatistics.la \
66   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
67   $(top_builddir)/src/hello/libgnunethello.la \
68   $(top_builddir)/src/block/libgnunetblock.la
69 if LINUX
70   gnunet_service_cadet_LDFLAGS = -lrt
71 endif
72
73
74 if HAVE_TESTING
75  noinst_LIBRARIES = libgnunetcadettest.a $(noinst_LIB_EXP)
76  noinst_PROGRAMS = gnunet-cadet-profiler
77 endif
78
79 libgnunetcadettest_a_SOURCES = \
80   cadet_test_lib.c cadet_test_lib.h
81 libgnunetcadettest_a_LIBADD = \
82  $(top_builddir)/src/util/libgnunetutil.la \
83  $(top_builddir)/src/testbed/libgnunettestbed.la \
84  libgnunetcadet.la
85
86 if HAVE_TESTING
87 check_PROGRAMS = \
88   test_cadet_single \
89   test_cadet_local \
90   test_cadet_2_forward \
91   test_cadet_2_signal \
92   test_cadet_2_keepalive \
93   test_cadet_2_speed \
94   test_cadet_2_speed_ack \
95   test_cadet_2_speed_backwards \
96   test_cadet_2_speed_reliable \
97   test_cadet_2_speed_reliable_backwards \
98   test_cadet_5_forward \
99   test_cadet_5_signal \
100   test_cadet_5_keepalive \
101   test_cadet_5_speed \
102   test_cadet_5_speed_ack \
103   test_cadet_5_speed_backwards \
104   test_cadet_5_speed_reliable \
105   test_cadet_5_speed_reliable_backwards
106 endif
107
108 ld_cadet_test_lib = \
109   $(top_builddir)/src/util/libgnunetutil.la \
110   $(top_builddir)/src/testing/libgnunettesting.la \
111   libgnunetcadettest.a \
112   libgnunetcadet.la \
113   $(top_builddir)/src/testbed/libgnunettestbed.la \
114   $(top_builddir)/src/statistics/libgnunetstatistics.la
115
116 dep_cadet_test_lib = \
117   libgnunetcadet.la \
118   libgnunetcadettest.a \
119   $(top_builddir)/src/statistics/libgnunetstatistics.la
120
121
122 gnunet_cadet_profiler_SOURCES = \
123   gnunet-cadet-profiler.c
124 gnunet_cadet_profiler_LDADD = $(ld_cadet_test_lib)
125
126
127 test_cadet_single_SOURCES = \
128   test_cadet_single.c
129 test_cadet_single_LDADD = $(ld_cadet_test_lib)
130
131 test_cadet_local_SOURCES = \
132   test_cadet_local.c
133 test_cadet_local_LDADD = $(ld_cadet_test_lib)
134
135
136 test_cadet_2_forward_SOURCES = \
137   test_cadet.c
138 test_cadet_2_forward_LDADD = $(ld_cadet_test_lib)
139
140 test_cadet_2_signal_SOURCES = \
141   test_cadet.c
142 test_cadet_2_signal_LDADD = $(ld_cadet_test_lib)
143
144 test_cadet_2_keepalive_SOURCES = \
145   test_cadet.c
146 test_cadet_2_keepalive_LDADD = $(ld_cadet_test_lib)
147
148 test_cadet_2_speed_SOURCES = \
149   test_cadet.c
150 test_cadet_2_speed_LDADD = $(ld_cadet_test_lib)
151
152 test_cadet_2_speed_ack_SOURCES = \
153   test_cadet.c
154 test_cadet_2_speed_ack_LDADD = $(ld_cadet_test_lib)
155
156 test_cadet_2_speed_backwards_SOURCES = \
157   test_cadet.c
158 test_cadet_2_speed_backwards_LDADD = $(ld_cadet_test_lib)
159
160 test_cadet_2_speed_reliable_SOURCES = \
161   test_cadet.c
162 test_cadet_2_speed_reliable_LDADD = $(ld_cadet_test_lib)
163
164 test_cadet_2_speed_reliable_backwards_SOURCES = \
165   test_cadet.c
166 test_cadet_2_speed_reliable_backwards_LDADD = $(ld_cadet_test_lib)
167
168
169 test_cadet_5_forward_SOURCES = \
170   test_cadet.c
171 test_cadet_5_forward_LDADD = $(ld_cadet_test_lib)
172
173 test_cadet_5_signal_SOURCES = \
174   test_cadet.c
175 test_cadet_5_signal_LDADD = $(ld_cadet_test_lib)
176
177 test_cadet_5_keepalive_SOURCES = \
178   test_cadet.c
179 test_cadet_5_keepalive_LDADD = $(ld_cadet_test_lib)
180
181 test_cadet_5_speed_SOURCES = \
182   test_cadet.c
183 test_cadet_5_speed_LDADD = $(ld_cadet_test_lib)
184
185 test_cadet_5_speed_ack_SOURCES = \
186   test_cadet.c
187 test_cadet_5_speed_ack_LDADD = $(ld_cadet_test_lib)
188
189 test_cadet_5_speed_backwards_SOURCES = \
190   test_cadet.c
191 test_cadet_5_speed_backwards_LDADD = $(ld_cadet_test_lib)
192
193 test_cadet_5_speed_reliable_SOURCES = \
194   test_cadet.c
195 test_cadet_5_speed_reliable_LDADD = $(ld_cadet_test_lib)
196
197 test_cadet_5_speed_reliable_backwards_SOURCES = \
198   test_cadet.c
199 test_cadet_5_speed_reliable_backwards_LDADD = $(ld_cadet_test_lib)
200
201
202 if ENABLE_TEST_RUN
203 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
204 TESTS = \
205  $(check_PROGRAMS)
206 endif
207
208 EXTRA_DIST = \
209   cadet.h cadet_protocol.h \
210   test_cadet.conf \
211   test_cadet_drop.conf
212