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