d7208d601d72d03f17d76a0023e137b33064d764
[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-new \
26  $(EXP_LIBEXEC)
27
28 bin_PROGRAMS = \
29  gnunet-cadet
30
31 lib_LTLIBRARIES = \
32   libgnunetcadetnew.la \
33   libgnunetcadet.la \
34   $(EXP_LIB)
35
36 libgnunetcadet_la_SOURCES = \
37   cadet_api.c cadet_common.c
38 libgnunetcadet_la_LIBADD = \
39   $(top_builddir)/src/util/libgnunetutil.la \
40   $(XLIB) \
41   $(LTLIBINTL)
42 libgnunetcadet_la_LDFLAGS = \
43   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
44   -version-info 5:0:0
45
46
47 libgnunetcadetnew_la_SOURCES = \
48   cadet_api_new.c
49 libgnunetcadetnew_la_LIBADD = \
50   $(top_builddir)/src/util/libgnunetutil.la \
51   $(XLIB) \
52   $(LTLIBINTL)
53 libgnunetcadetnew_la_LDFLAGS = \
54   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
55   -version-info 6:0:0
56
57 gnunet_cadet_SOURCES = \
58   gnunet-cadet.c
59 gnunet_cadet_LDADD = \
60   libgnunetcadetnew.la \
61   $(top_builddir)/src/util/libgnunetutil.la
62
63 gnunet_service_cadet_new_SOURCES = \
64  gnunet-service-cadet-new.c gnunet-service-cadet-new.h \
65  gnunet-service-cadet-new_channel.c gnunet-service-cadet-new_channel.h \
66  gnunet-service-cadet-new_connection.c gnunet-service-cadet-new_connection.h \
67  gnunet-service-cadet-new_core.c gnunet-service-cadet-new_core.h \
68  gnunet-service-cadet-new_dht.c gnunet-service-cadet-new_dht.h \
69  gnunet-service-cadet-new_hello.c gnunet-service-cadet-new_hello.h \
70  gnunet-service-cadet-new_tunnels.c gnunet-service-cadet-new_tunnels.h \
71  gnunet-service-cadet-new_paths.c gnunet-service-cadet-new_paths.h \
72  gnunet-service-cadet-new_peer.c gnunet-service-cadet-new_peer.h
73 gnunet_service_cadet_new_LDADD = \
74   $(top_builddir)/src/util/libgnunetutil.la \
75   $(top_builddir)/src/ats/libgnunetats.la \
76   $(top_builddir)/src/core/libgnunetcore.la \
77   $(top_builddir)/src/dht/libgnunetdht.la \
78   $(top_builddir)/src/statistics/libgnunetstatistics.la \
79   $(top_builddir)/src/transport/libgnunettransport.la \
80   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
81   $(top_builddir)/src/hello/libgnunethello.la \
82   $(top_builddir)/src/block/libgnunetblock.la
83 if LINUX
84   gnunet_service_cadet_new_LDFLAGS = -lrt
85 endif
86
87
88 if HAVE_TESTING
89  noinst_LTLIBRARIES = libgnunetcadettest.la $(noinst_LIB_EXP)
90  noinst_PROGRAMS = gnunet-cadet-profiler
91 endif
92
93 if HAVE_TESTING
94 check_PROGRAMS = \
95   test_cadet_local_mq \
96   test_cadet_2_forward \
97   test_cadet_2_forward \
98   test_cadet_2_signal \
99   test_cadet_2_keepalive \
100   test_cadet_2_speed \
101   test_cadet_2_speed_ack \
102   test_cadet_2_speed_backwards \
103   test_cadet_2_speed_reliable \
104   test_cadet_2_speed_reliable_backwards \
105   test_cadet_5_forward \
106   test_cadet_5_signal \
107   test_cadet_5_keepalive \
108   test_cadet_5_speed \
109   test_cadet_5_speed_ack \
110   test_cadet_5_speed_reliable \
111   test_cadet_5_speed_reliable_backwards \
112   test_cadet_5_speed_backwards
113 endif
114
115 ld_cadet_test_lib = \
116   $(top_builddir)/src/util/libgnunetutil.la \
117   $(top_builddir)/src/testing/libgnunettesting.la \
118   libgnunetcadettest.la \
119   libgnunetcadet.la \
120   $(top_builddir)/src/testbed/libgnunettestbed.la \
121   $(top_builddir)/src/statistics/libgnunetstatistics.la
122
123 dep_cadet_test_lib = \
124   libgnunetcadet.la \
125   libgnunetcadettest.la \
126   $(top_builddir)/src/statistics/libgnunetstatistics.la
127
128
129 gnunet_cadet_profiler_SOURCES = \
130   gnunet-cadet-profiler.c
131 gnunet_cadet_profiler_LDADD = $(ld_cadet_test_lib)
132
133
134 test_cadet_local_mq_SOURCES = \
135   test_cadet_local_mq.c
136 test_cadet_local_mq_LDADD = \
137   libgnunetcadetnew.la \
138   $(top_builddir)/src/testing/libgnunettesting.la \
139   $(top_builddir)/src/util/libgnunetutil.la
140
141
142 libgnunetcadettest_la_SOURCES = \
143   cadet_test_lib_new.c cadet_test_lib_new.h
144 libgnunetcadettest_la_LIBADD = \
145  $(top_builddir)/src/util/libgnunetutil.la \
146  $(top_builddir)/src/testbed/libgnunettestbed.la \
147  libgnunetcadetnew.la
148
149 ld_cadet_test_lib = \
150   $(top_builddir)/src/util/libgnunetutil.la \
151   $(top_builddir)/src/testing/libgnunettesting.la \
152   libgnunetcadetnew.la \
153   libgnunetcadettest.la \
154   $(top_builddir)/src/testbed/libgnunettestbed.la \
155   $(top_builddir)/src/statistics/libgnunetstatistics.la
156 dep_cadet_test_lib = \
157   libgnunetcadetnew.la \
158   libgnunetcadettest.la \
159   $(top_builddir)/src/statistics/libgnunetstatistics.la
160
161 test_cadet_2_forward_SOURCES = \
162   test_cadet_new.c
163 test_cadet_2_forward_LDADD = $(ld_cadet_test_lib)
164
165 test_cadet_2_signal_SOURCES = \
166   test_cadet_new.c
167 test_cadet_2_signal_LDADD = $(ld_cadet_test_lib)
168
169 test_cadet_2_keepalive_SOURCES = \
170   test_cadet_new.c
171 test_cadet_2_keepalive_LDADD = $(ld_cadet_test_lib)
172
173 test_cadet_2_speed_SOURCES = \
174   test_cadet_new.c
175 test_cadet_2_speed_LDADD = $(ld_cadet_test_lib)
176
177 test_cadet_2_speed_ack_SOURCES = \
178   test_cadet_new.c
179 test_cadet_2_speed_ack_LDADD = $(ld_cadet_test_lib)
180
181 test_cadet_2_speed_backwards_SOURCES = \
182   test_cadet_new.c
183 test_cadet_2_speed_backwards_LDADD = $(ld_cadet_test_lib)
184
185 test_cadet_2_speed_reliable_SOURCES = \
186   test_cadet_new.c
187 test_cadet_2_speed_reliable_LDADD = $(ld_cadet_test_lib)
188
189 test_cadet_2_speed_reliable_backwards_SOURCES = \
190   test_cadet_new.c
191 test_cadet_2_speed_reliable_backwards_LDADD = $(ld_cadet_test_lib)
192
193
194 test_cadet_5_forward_SOURCES = \
195   test_cadet_new.c
196 test_cadet_5_forward_LDADD = $(ld_cadet_test_lib)
197
198 test_cadet_5_signal_SOURCES = \
199   test_cadet_new.c
200 test_cadet_5_signal_LDADD = $(ld_cadet_test_lib)
201
202 test_cadet_5_keepalive_SOURCES = \
203   test_cadet_new.c
204 test_cadet_5_keepalive_LDADD = $(ld_cadet_test_lib)
205
206 test_cadet_5_speed_SOURCES = \
207   test_cadet_new.c
208 test_cadet_5_speed_LDADD = $(ld_cadet_test_lib)
209
210 test_cadet_5_speed_ack_SOURCES = \
211   test_cadet_new.c
212 test_cadet_5_speed_ack_LDADD = $(ld_cadet_test_lib)
213
214 test_cadet_5_speed_backwards_SOURCES = \
215   test_cadet_new.c
216 test_cadet_5_speed_backwards_LDADD = $(ld_cadet_test_lib)
217
218 test_cadet_5_speed_reliable_SOURCES = \
219   test_cadet_new.c
220 test_cadet_5_speed_reliable_LDADD = $(ld_cadet_test_lib)
221
222 test_cadet_5_speed_reliable_backwards_SOURCES = \
223   test_cadet_new.c
224 test_cadet_5_speed_reliable_backwards_LDADD = $(ld_cadet_test_lib)
225
226
227 if ENABLE_TEST_RUN
228 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
229 TESTS = \
230  $(check_PROGRAMS)
231 endif
232
233 EXTRA_DIST = \
234   cadet.h cadet_protocol.h \
235   test_cadet.conf \
236   test_cadet_drop.conf