rename cadet*new to just cadet, except for libgnunetcadetnew-logic (where the 'old...
[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  $(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_SOURCES = \
64  gnunet-service-cadet.c gnunet-service-cadet.h \
65  gnunet-service-cadet_channel.c gnunet-service-cadet_channel.h \
66  gnunet-service-cadet_connection.c gnunet-service-cadet_connection.h \
67  gnunet-service-cadet_core.c gnunet-service-cadet_core.h \
68  gnunet-service-cadet_dht.c gnunet-service-cadet_dht.h \
69  gnunet-service-cadet_hello.c gnunet-service-cadet_hello.h \
70  gnunet-service-cadet_tunnels.c gnunet-service-cadet_tunnels.h \
71  gnunet-service-cadet_paths.c gnunet-service-cadet_paths.h \
72  gnunet-service-cadet_peer.c gnunet-service-cadet_peer.h
73 gnunet_service_cadet_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
116 #gnunet_cadet_profiler_SOURCES = \
117 #  gnunet-cadet-profiler.c
118 #gnunet_cadet_profiler_LDADD = $(ld_cadet_test_lib)
119
120
121 test_cadet_local_mq_SOURCES = \
122   test_cadet_local_mq.c
123 test_cadet_local_mq_LDADD = \
124   libgnunetcadetnew.la \
125   $(top_builddir)/src/testing/libgnunettesting.la \
126   $(top_builddir)/src/util/libgnunetutil.la
127
128
129 libgnunetcadettest_la_SOURCES = \
130   cadet_test_lib.c cadet_test_lib.h
131 libgnunetcadettest_la_LIBADD = \
132  $(top_builddir)/src/util/libgnunetutil.la \
133  $(top_builddir)/src/testbed/libgnunettestbed.la \
134  libgnunetcadetnew.la
135
136 ld_cadet_test_lib = \
137   $(top_builddir)/src/util/libgnunetutil.la \
138   $(top_builddir)/src/testing/libgnunettesting.la \
139   libgnunetcadetnew.la \
140   libgnunetcadettest.la \
141   $(top_builddir)/src/testbed/libgnunettestbed.la \
142   $(top_builddir)/src/statistics/libgnunetstatistics.la
143 dep_cadet_test_lib = \
144   libgnunetcadetnew.la \
145   libgnunetcadettest.la \
146   $(top_builddir)/src/statistics/libgnunetstatistics.la
147
148 test_cadet_2_forward_SOURCES = \
149   test_cadet.c
150 test_cadet_2_forward_LDADD = $(ld_cadet_test_lib)
151
152 test_cadet_2_signal_SOURCES = \
153   test_cadet.c
154 test_cadet_2_signal_LDADD = $(ld_cadet_test_lib)
155
156 test_cadet_2_keepalive_SOURCES = \
157   test_cadet.c
158 test_cadet_2_keepalive_LDADD = $(ld_cadet_test_lib)
159
160 test_cadet_2_speed_SOURCES = \
161   test_cadet.c
162 test_cadet_2_speed_LDADD = $(ld_cadet_test_lib)
163
164 test_cadet_2_speed_ack_SOURCES = \
165   test_cadet.c
166 test_cadet_2_speed_ack_LDADD = $(ld_cadet_test_lib)
167
168 test_cadet_2_speed_backwards_SOURCES = \
169   test_cadet.c
170 test_cadet_2_speed_backwards_LDADD = $(ld_cadet_test_lib)
171
172 test_cadet_2_speed_reliable_SOURCES = \
173   test_cadet.c
174 test_cadet_2_speed_reliable_LDADD = $(ld_cadet_test_lib)
175
176 test_cadet_2_speed_reliable_backwards_SOURCES = \
177   test_cadet.c
178 test_cadet_2_speed_reliable_backwards_LDADD = $(ld_cadet_test_lib)
179
180 test_cadet_5_forward_SOURCES = \
181   test_cadet.c
182 test_cadet_5_forward_LDADD = $(ld_cadet_test_lib)
183
184 test_cadet_5_signal_SOURCES = \
185   test_cadet.c
186 test_cadet_5_signal_LDADD = $(ld_cadet_test_lib)
187
188 test_cadet_5_keepalive_SOURCES = \
189   test_cadet.c
190 test_cadet_5_keepalive_LDADD = $(ld_cadet_test_lib)
191
192 test_cadet_5_speed_SOURCES = \
193   test_cadet.c
194 test_cadet_5_speed_LDADD = $(ld_cadet_test_lib)
195
196 test_cadet_5_speed_ack_SOURCES = \
197   test_cadet.c
198 test_cadet_5_speed_ack_LDADD = $(ld_cadet_test_lib)
199
200 test_cadet_5_speed_backwards_SOURCES = \
201   test_cadet.c
202 test_cadet_5_speed_backwards_LDADD = $(ld_cadet_test_lib)
203
204 test_cadet_5_speed_reliable_SOURCES = \
205   test_cadet.c
206 test_cadet_5_speed_reliable_LDADD = $(ld_cadet_test_lib)
207
208 test_cadet_5_speed_reliable_backwards_SOURCES = \
209   test_cadet.c
210 test_cadet_5_speed_reliable_backwards_LDADD = $(ld_cadet_test_lib)
211
212
213 if ENABLE_TEST_RUN
214 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
215 TESTS = \
216  $(check_PROGRAMS)
217 endif
218
219 EXTRA_DIST = \
220   cadet.h cadet_protocol.h \
221   test_cadet.conf \
222   test_cadet_drop.conf