-skeletons for transport-ng
[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/ats/libgnunetats.la \
66   $(top_builddir)/src/dht/libgnunetdht.la \
67   $(top_builddir)/src/statistics/libgnunetstatistics.la \
68   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
69   $(top_builddir)/src/hello/libgnunethello.la \
70   $(top_builddir)/src/block/libgnunetblock.la
71 if LINUX
72   gnunet_service_cadet_LDFLAGS = -lrt
73 endif
74
75
76 if HAVE_TESTING
77  noinst_LIBRARIES = libgnunetcadettest.a $(noinst_LIB_EXP)
78  noinst_PROGRAMS = gnunet-cadet-profiler
79 endif
80
81 libgnunetcadettest_a_SOURCES = \
82   cadet_test_lib.c cadet_test_lib.h
83 libgnunetcadettest_a_LIBADD = \
84  $(top_builddir)/src/util/libgnunetutil.la \
85  $(top_builddir)/src/testbed/libgnunettestbed.la \
86  libgnunetcadet.la
87
88 if HAVE_TESTING
89 check_PROGRAMS = \
90   test_cadet_single \
91   test_cadet_local \
92   test_cadet_2_forward \
93   test_cadet_2_signal \
94   test_cadet_2_keepalive \
95   test_cadet_2_speed \
96   test_cadet_2_speed_ack \
97   test_cadet_2_speed_backwards \
98   test_cadet_2_speed_reliable \
99   test_cadet_2_speed_reliable_backwards \
100   test_cadet_5_forward \
101   test_cadet_5_signal \
102   test_cadet_5_keepalive \
103   test_cadet_5_speed \
104   test_cadet_5_speed_ack \
105   test_cadet_5_speed_backwards \
106   test_cadet_5_speed_reliable \
107   test_cadet_5_speed_reliable_backwards
108 endif
109
110 ld_cadet_test_lib = \
111   $(top_builddir)/src/util/libgnunetutil.la \
112   $(top_builddir)/src/testing/libgnunettesting.la \
113   libgnunetcadettest.a \
114   libgnunetcadet.la \
115   $(top_builddir)/src/testbed/libgnunettestbed.la \
116   $(top_builddir)/src/statistics/libgnunetstatistics.la
117
118 dep_cadet_test_lib = \
119   libgnunetcadet.la \
120   libgnunetcadettest.a \
121   $(top_builddir)/src/statistics/libgnunetstatistics.la
122
123
124 gnunet_cadet_profiler_SOURCES = \
125   gnunet-cadet-profiler.c
126 gnunet_cadet_profiler_LDADD = $(ld_cadet_test_lib)
127
128
129 test_cadet_single_SOURCES = \
130   test_cadet_single.c
131 test_cadet_single_LDADD = $(ld_cadet_test_lib)
132
133 test_cadet_local_SOURCES = \
134   test_cadet_local.c
135 test_cadet_local_LDADD = $(ld_cadet_test_lib)
136
137
138 test_cadet_2_forward_SOURCES = \
139   test_cadet.c
140 test_cadet_2_forward_LDADD = $(ld_cadet_test_lib)
141
142 test_cadet_2_signal_SOURCES = \
143   test_cadet.c
144 test_cadet_2_signal_LDADD = $(ld_cadet_test_lib)
145
146 test_cadet_2_keepalive_SOURCES = \
147   test_cadet.c
148 test_cadet_2_keepalive_LDADD = $(ld_cadet_test_lib)
149
150 test_cadet_2_speed_SOURCES = \
151   test_cadet.c
152 test_cadet_2_speed_LDADD = $(ld_cadet_test_lib)
153
154 test_cadet_2_speed_ack_SOURCES = \
155   test_cadet.c
156 test_cadet_2_speed_ack_LDADD = $(ld_cadet_test_lib)
157
158 test_cadet_2_speed_backwards_SOURCES = \
159   test_cadet.c
160 test_cadet_2_speed_backwards_LDADD = $(ld_cadet_test_lib)
161
162 test_cadet_2_speed_reliable_SOURCES = \
163   test_cadet.c
164 test_cadet_2_speed_reliable_LDADD = $(ld_cadet_test_lib)
165
166 test_cadet_2_speed_reliable_backwards_SOURCES = \
167   test_cadet.c
168 test_cadet_2_speed_reliable_backwards_LDADD = $(ld_cadet_test_lib)
169
170
171 test_cadet_5_forward_SOURCES = \
172   test_cadet.c
173 test_cadet_5_forward_LDADD = $(ld_cadet_test_lib)
174
175 test_cadet_5_signal_SOURCES = \
176   test_cadet.c
177 test_cadet_5_signal_LDADD = $(ld_cadet_test_lib)
178
179 test_cadet_5_keepalive_SOURCES = \
180   test_cadet.c
181 test_cadet_5_keepalive_LDADD = $(ld_cadet_test_lib)
182
183 test_cadet_5_speed_SOURCES = \
184   test_cadet.c
185 test_cadet_5_speed_LDADD = $(ld_cadet_test_lib)
186
187 test_cadet_5_speed_ack_SOURCES = \
188   test_cadet.c
189 test_cadet_5_speed_ack_LDADD = $(ld_cadet_test_lib)
190
191 test_cadet_5_speed_backwards_SOURCES = \
192   test_cadet.c
193 test_cadet_5_speed_backwards_LDADD = $(ld_cadet_test_lib)
194
195 test_cadet_5_speed_reliable_SOURCES = \
196   test_cadet.c
197 test_cadet_5_speed_reliable_LDADD = $(ld_cadet_test_lib)
198
199 test_cadet_5_speed_reliable_backwards_SOURCES = \
200   test_cadet.c
201 test_cadet_5_speed_reliable_backwards_LDADD = $(ld_cadet_test_lib)
202
203
204 if ENABLE_TEST_RUN
205 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
206 TESTS = \
207  $(check_PROGRAMS)
208 endif
209
210 EXTRA_DIST = \
211   cadet.h cadet_protocol.h \
212   test_cadet.conf \
213   test_cadet_drop.conf