Adapting verify successor code to use trail id
[oweals/gnunet.git] / src / dht / Makefile.am
1 AM_CPPFLAGS = -I$(top_srcdir)/src/include
2 if MINGW
3  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols -lole32 -lshell32 -liconv -lstdc++ -lcomdlg32 -lgdi32
4 endif
5
6 plugindir = $(libdir)/gnunet
7
8 pkgcfgdir= $(pkgdatadir)/config.d/
9
10 libexecdir= $(pkglibdir)/libexec/
11
12 pkgcfg_DATA = \
13   dht.conf
14
15 if USE_COVERAGE
16   AM_CFLAGS = --coverage -O0
17   XLIB = -lgcov
18 endif
19
20 lib_LTLIBRARIES = \
21  libgnunetdht.la
22
23 libgnunetdht_la_SOURCES = \
24   dht_api.c dht.h
25 libgnunetdht_la_LIBADD = \
26   $(top_builddir)/src/util/libgnunetutil.la \
27   $(XLIB) \
28   $(LTLIBINTL)
29 libgnunetdht_la_LDFLAGS = \
30   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
31   -version-info 2:0:2
32
33
34 plugin_LTLIBRARIES = \
35   libgnunet_plugin_block_dht.la
36
37 libgnunet_plugin_block_dht_la_SOURCES = \
38   plugin_block_dht.c
39 libgnunet_plugin_block_dht_la_LIBADD = \
40   $(top_builddir)/src/hello/libgnunethello.la \
41   $(top_builddir)/src/block/libgnunetblock.la \
42   $(top_builddir)/src/util/libgnunetutil.la \
43   $(LTLIBINTL)
44 libgnunet_plugin_block_dht_la_LDFLAGS = \
45  $(GN_PLUGIN_LDFLAGS)
46 libgnunet_plugin_block_dht_la_DEPENDENCIES = \
47   $(top_builddir)/src/block/libgnunetblock.la
48
49
50
51 libexec_PROGRAMS = \
52  gnunet-service-dht \
53  gnunet-service-dht-xvine
54
55 noinst_PROGRAMS = \
56  gnunet-dht-monitor \
57  gnunet-dht-get \
58  gnunet-dht-put
59
60 gnunet_service_dht_SOURCES = \
61  gnunet-service-dht.c gnunet-service-dht.h \
62  gnunet-service-dht_clients.c gnunet-service-dht_clients.h \
63  gnunet-service-dht_datacache.c gnunet-service-dht_datacache.h \
64  gnunet-service-dht_hello.c gnunet-service-dht_hello.h \
65  gnunet-service-dht_nse.c gnunet-service-dht_nse.h \
66  gnunet-service-dht_neighbours.c gnunet-service-dht_neighbours.h \
67  gnunet-service-dht_routing.c gnunet-service-dht_routing.h
68 gnunet_service_dht_LDADD = \
69   $(top_builddir)/src/statistics/libgnunetstatistics.la \
70   $(top_builddir)/src/core/libgnunetcore.la \
71   $(top_builddir)/src/nse/libgnunetnse.la \
72   $(top_builddir)/src/ats/libgnunetats.la \
73   $(top_builddir)/src/transport/libgnunettransport.la \
74   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
75   $(top_builddir)/src/hello/libgnunethello.la \
76   $(top_builddir)/src/block/libgnunetblock.la \
77   $(top_builddir)/src/datacache/libgnunetdatacache.la \
78   $(top_builddir)/src/util/libgnunetutil.la \
79   -lm
80
81 gnunet_service_dht_xvine_SOURCES = \
82  gnunet-service-xdht.c gnunet-service-xdht.h \
83  gnunet-service-xdht_clients.c gnunet-service-xdht_clients.h \
84  gnunet-service-xdht_datacache.c gnunet-service-xdht_datacache.h \
85  gnunet-service-xdht_hello.c gnunet-service-xdht_hello.h \
86  gnunet-service-xdht_nse.c gnunet-service-xdht_nse.h \
87  gnunet-service-xdht_neighbours.c gnunet-service-xdht_neighbours.h \
88  gnunet-service-xdht_routing.c gnunet-service-xdht_routing.h
89 gnunet_service_dht_xvine_LDADD = \
90   $(top_builddir)/src/statistics/libgnunetstatistics.la \
91   $(top_builddir)/src/core/libgnunetcore.la \
92   $(top_builddir)/src/nse/libgnunetnse.la \
93   $(top_builddir)/src/ats/libgnunetats.la \
94   $(top_builddir)/src/transport/libgnunettransport.la \
95   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
96   $(top_builddir)/src/hello/libgnunethello.la \
97   $(top_builddir)/src/block/libgnunetblock.la \
98   $(top_builddir)/src/datacache/libgnunetdatacache.la \
99   $(top_builddir)/src/util/libgnunetutil.la \
100   -lm
101
102
103
104 gnunet_dht_get_SOURCES = \
105  gnunet-dht-get.c
106 gnunet_dht_get_LDADD = \
107   $(top_builddir)/src/dht/libgnunetdht.la \
108   $(top_builddir)/src/core/libgnunetcore.la \
109   $(top_builddir)/src/util/libgnunetutil.la
110 gnunet_dht_get_DEPENDENCIES = \
111   libgnunetdht.la
112
113 gnunet_dht_put_SOURCES = \
114  gnunet-dht-put.c
115 gnunet_dht_put_LDADD = \
116   $(top_builddir)/src/dht/libgnunetdht.la \
117   $(top_builddir)/src/core/libgnunetcore.la \
118   $(top_builddir)/src/util/libgnunetutil.la
119 gnunet_dht_put_DEPENDENCIES = \
120   libgnunetdht.la
121
122 gnunet_dht_monitor_SOURCES = \
123  gnunet-dht-monitor.c
124 gnunet_dht_monitor_LDADD = \
125   $(top_builddir)/src/dht/libgnunetdht.la \
126   $(top_builddir)/src/core/libgnunetcore.la \
127   $(top_builddir)/src/util/libgnunetutil.la
128 gnunet_dht_monitor_DEPENDENCIES = \
129   libgnunetdht.la
130
131 if HAVE_TESTING
132 noinst_LIBRARIES = libgnunetdhttest.a
133 endif
134
135 libgnunetdhttest_a_SOURCES = \
136   dht_test_lib.c dht_test_lib.h
137 libgnunetdhttest_a_LIBADD = \
138  $(top_builddir)/src/util/libgnunetutil.la \
139  $(top_builddir)/src/testbed/libgnunettestbed.la \
140  $(top_builddir)/src/dht/libgnunetdht.la
141 libgnunetdhttest_a_DEPENDENCIES = \
142   libgnunetdht.la
143
144 if HAVE_TESTING
145 check_PROGRAMS = \
146  test_dht_api \
147  test_dht_twopeer \
148  test_dht_multipeer \
149  test_dht_line \
150  test_dht_2dtorus \
151  test_dht_monitor
152 endif
153
154 if HAVE_EXPERIMENTAL
155 # These tests still do not work as testbed does
156 # not support the respective topology op
157  NEW_TESTS = test_dht_2dtorus test_dht_multipeer
158 endif
159
160 if ENABLE_TEST_RUN
161 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
162 TESTS = test_dht_api $(check_SCRIPTS) \
163  test_dht_twopeer \
164  test_dht_line \
165  test_dht_monitor \
166  $(NEW_TESTS)
167 endif
168
169 test_dht_api_SOURCES = \
170  test_dht_api.c
171 test_dht_api_LDADD = \
172  $(top_builddir)/src/util/libgnunetutil.la \
173  $(top_builddir)/src/testing/libgnunettesting.la \
174  $(top_builddir)/src/hello/libgnunethello.la \
175  $(top_builddir)/src/dht/libgnunetdht.la
176 test_dht_api_DEPENDENCIES = \
177   libgnunetdht.la
178
179 test_dht_twopeer_SOURCES = \
180  test_dht_topo.c
181 test_dht_twopeer_LDADD = \
182  $(top_builddir)/src/dht/libgnunetdhttest.a \
183  $(top_builddir)/src/util/libgnunetutil.la \
184  $(top_builddir)/src/dht/libgnunetdhttest.a \
185  $(top_builddir)/src/testbed/libgnunettestbed.la \
186  $(top_builddir)/src/dht/libgnunetdht.la
187 test_dht_twopeer_DEPENDENCIES = \
188   libgnunetdht.la
189
190 test_dht_2dtorus_SOURCES = \
191  test_dht_topo.c
192 test_dht_2dtorus_LDADD = \
193  $(top_builddir)/src/dht/libgnunetdhttest.a \
194  $(top_builddir)/src/util/libgnunetutil.la \
195  $(top_builddir)/src/testbed/libgnunettestbed.la \
196  $(top_builddir)/src/dht/libgnunetdht.la
197 test_dht_2dtorus_DEPENDENCIES = \
198   libgnunetdht.la
199
200 test_dht_line_SOURCES = \
201  test_dht_topo.c
202 test_dht_line_LDADD = \
203  $(top_builddir)/src/dht/libgnunetdhttest.a \
204  $(top_builddir)/src/util/libgnunetutil.la \
205  $(top_builddir)/src/testbed/libgnunettestbed.la \
206  $(top_builddir)/src/dht/libgnunetdht.la
207 test_dht_line_DEPENDENCIES = \
208   libgnunetdht.la
209
210 test_dht_multipeer_SOURCES = \
211  test_dht_topo.c
212 test_dht_multipeer_LDADD = \
213  $(top_builddir)/src/dht/libgnunetdhttest.a \
214  $(top_builddir)/src/util/libgnunetutil.la \
215  $(top_builddir)/src/statistics/libgnunetstatistics.la \
216  $(top_builddir)/src/testbed/libgnunettestbed.la \
217  $(top_builddir)/src/dht/libgnunetdht.la
218 test_dht_multipeer_DEPENDENCIES = \
219   libgnunetdht.la
220
221 test_dht_monitor_SOURCES = \
222   test_dht_monitor.c
223 test_dht_monitor_LDADD = \
224  $(top_builddir)/src/dht/libgnunetdhttest.a \
225  $(top_builddir)/src/util/libgnunetutil.la \
226  $(top_builddir)/src/testbed/libgnunettestbed.la \
227  $(top_builddir)/src/dht/libgnunetdht.la
228 test_dht_monitor_DEPENDENCIES = \
229   libgnunetdht.la
230
231 EXTRA_DIST = \
232   $(check_SCRIPTS) \
233   test_dht_api_data.conf \
234   test_dht_api_peer1.conf \
235   test_dht_monitor.conf \
236   test_dht_multipeer.conf \
237   test_dht_2dtorus.conf \
238   test_dht_line.conf \
239   test_dht_tools.py.in \
240   test_dht_multipeer_topology.dat
241
242 if HAVE_PYTHON
243 check_SCRIPTS = \
244   test_dht_tools.py
245 endif
246
247 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
248
249 %.py: %.py.in Makefile
250         $(do_subst) < $(srcdir)/$< > $@
251         chmod +x $@
252
253 test_dht_tools.py: test_dht_tools.py.in Makefile
254         $(do_subst) < $(srcdir)/test_dht_tools.py.in > test_dht_tools.py
255         chmod +x test_dht_tools.py