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