- Act malicious API complete
[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
47
48 libexec_PROGRAMS = \
49  gnunet-service-dht \
50  gnunet-service-dht-xvine
51
52 noinst_PROGRAMS = \
53  gnunet-dht-monitor \
54  gnunet-dht-get \
55  gnunet-dht-put \
56  gnunet-dht-profiler
57
58 gnunet_service_dht_SOURCES = \
59  gnunet-service-dht.c gnunet-service-dht.h \
60  gnunet-service-dht_clients.c gnunet-service-dht_clients.h \
61  gnunet-service-dht_datacache.c gnunet-service-dht_datacache.h \
62  gnunet-service-dht_hello.c gnunet-service-dht_hello.h \
63  gnunet-service-dht_nse.c gnunet-service-dht_nse.h \
64  gnunet-service-dht_neighbours.c gnunet-service-dht_neighbours.h \
65  gnunet-service-dht_routing.c gnunet-service-dht_routing.h
66 gnunet_service_dht_LDADD = \
67   $(top_builddir)/src/statistics/libgnunetstatistics.la \
68   $(top_builddir)/src/core/libgnunetcore.la \
69   $(top_builddir)/src/nse/libgnunetnse.la \
70   $(top_builddir)/src/ats/libgnunetats.la \
71   $(top_builddir)/src/transport/libgnunettransport.la \
72   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
73   $(top_builddir)/src/hello/libgnunethello.la \
74   $(top_builddir)/src/block/libgnunetblock.la \
75   $(top_builddir)/src/datacache/libgnunetdatacache.la \
76   $(top_builddir)/src/util/libgnunetutil.la \
77   -lm
78
79 gnunet_service_dht_xvine_SOURCES = \
80  gnunet-service-xdht.c gnunet-service-xdht.h \
81  gnunet-service-xdht_clients.c gnunet-service-xdht_clients.h \
82  gnunet-service-xdht_datacache.c gnunet-service-xdht_datacache.h \
83  gnunet-service-xdht_hello.c gnunet-service-xdht_hello.h \
84  gnunet-service-xdht_nse.c gnunet-service-xdht_nse.h \
85  gnunet-service-xdht_neighbours.c gnunet-service-xdht_neighbours.h \
86  gnunet-service-xdht_routing.c gnunet-service-xdht_routing.h
87 gnunet_service_dht_xvine_LDADD = \
88   $(top_builddir)/src/statistics/libgnunetstatistics.la \
89   $(top_builddir)/src/core/libgnunetcore.la \
90   $(top_builddir)/src/nse/libgnunetnse.la \
91   $(top_builddir)/src/ats/libgnunetats.la \
92   $(top_builddir)/src/transport/libgnunettransport.la \
93   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
94   $(top_builddir)/src/hello/libgnunethello.la \
95   $(top_builddir)/src/block/libgnunetblock.la \
96   $(top_builddir)/src/datacache/libgnunetdatacache.la \
97   $(top_builddir)/src/util/libgnunetutil.la \
98   -lm
99
100
101
102 gnunet_dht_get_SOURCES = \
103  gnunet-dht-get.c
104 gnunet_dht_get_LDADD = \
105   libgnunetdht.la \
106   $(top_builddir)/src/core/libgnunetcore.la \
107   $(top_builddir)/src/util/libgnunetutil.la
108
109 gnunet_dht_put_SOURCES = \
110  gnunet-dht-put.c
111 gnunet_dht_put_LDADD = \
112   libgnunetdht.la \
113   $(top_builddir)/src/core/libgnunetcore.la \
114   $(top_builddir)/src/util/libgnunetutil.la
115
116 gnunet_dht_monitor_SOURCES = \
117  gnunet-dht-monitor.c
118 gnunet_dht_monitor_LDADD = \
119   libgnunetdht.la \
120   $(top_builddir)/src/core/libgnunetcore.la \
121   $(top_builddir)/src/util/libgnunetutil.la
122
123 gnunet_dht_profiler_SOURCES = \
124   gnunet_dht_profiler.c
125 gnunet_dht_profiler_LDADD = \
126   libgnunetdht.la \
127   $(top_builddir)/src/core/libgnunetcore.la \
128   $(top_builddir)/src/util/libgnunetutil.la \
129  $(top_builddir)/src/testbed/libgnunettestbed.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  libgnunetdht.la
141
142 if HAVE_TESTING
143 check_PROGRAMS = \
144  test_dht_api \
145  test_dht_twopeer \
146  test_dht_multipeer \
147  test_dht_line \
148  test_dht_2dtorus \
149  test_dht_monitor
150 endif
151
152 if HAVE_EXPERIMENTAL
153 # These tests still do not work as testbed does
154 # not support the respective topology op
155  NEW_TESTS = test_dht_2dtorus test_dht_multipeer
156 endif
157
158 if ENABLE_TEST_RUN
159 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
160 TESTS = test_dht_api $(check_SCRIPTS) \
161  test_dht_twopeer \
162  test_dht_line \
163  test_dht_monitor \
164  $(NEW_TESTS)
165 endif
166
167 test_dht_api_SOURCES = \
168  test_dht_api.c
169 test_dht_api_LDADD = \
170  $(top_builddir)/src/util/libgnunetutil.la \
171  $(top_builddir)/src/testing/libgnunettesting.la \
172  $(top_builddir)/src/hello/libgnunethello.la \
173  libgnunetdht.la
174
175 test_dht_twopeer_SOURCES = \
176  test_dht_topo.c
177 test_dht_twopeer_LDADD = \
178  libgnunetdhttest.a \
179  $(top_builddir)/src/util/libgnunetutil.la \
180  libgnunetdhttest.a \
181  $(top_builddir)/src/testbed/libgnunettestbed.la \
182  libgnunetdht.la
183
184 test_dht_2dtorus_SOURCES = \
185  test_dht_topo.c
186 test_dht_2dtorus_LDADD = \
187  libgnunetdhttest.a \
188  $(top_builddir)/src/util/libgnunetutil.la \
189  $(top_builddir)/src/testbed/libgnunettestbed.la \
190  libgnunetdht.la
191
192 test_dht_line_SOURCES = \
193  test_dht_topo.c
194 test_dht_line_LDADD = \
195  libgnunetdhttest.a \
196  $(top_builddir)/src/util/libgnunetutil.la \
197  $(top_builddir)/src/testbed/libgnunettestbed.la \
198  libgnunetdht.la
199
200 test_dht_multipeer_SOURCES = \
201  test_dht_topo.c
202 test_dht_multipeer_LDADD = \
203  libgnunetdhttest.a \
204  $(top_builddir)/src/util/libgnunetutil.la \
205  $(top_builddir)/src/statistics/libgnunetstatistics.la \
206  $(top_builddir)/src/testbed/libgnunettestbed.la \
207  libgnunetdht.la
208
209 test_dht_monitor_SOURCES = \
210   test_dht_monitor.c
211 test_dht_monitor_LDADD = \
212  libgnunetdhttest.a \
213  $(top_builddir)/src/util/libgnunetutil.la \
214  $(top_builddir)/src/testbed/libgnunettestbed.la \
215  libgnunetdht.la
216
217 EXTRA_DIST = \
218   $(check_SCRIPTS) \
219   test_dht_api_data.conf \
220   test_dht_api_peer1.conf \
221   test_dht_monitor.conf \
222   test_dht_multipeer.conf \
223   test_dht_2dtorus.conf \
224   test_dht_line.conf \
225   test_dht_tools.py.in \
226   test_dht_multipeer_topology.dat
227
228 if HAVE_PYTHON
229 check_SCRIPTS = \
230   test_dht_tools.py
231 endif
232
233 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
234
235 %.py: %.py.in Makefile
236         $(do_subst) < $(srcdir)/$< > $@
237         chmod +x $@
238
239 test_dht_tools.py: test_dht_tools.py.in Makefile
240         $(do_subst) < $(srcdir)/test_dht_tools.py.in > test_dht_tools.py
241         chmod +x test_dht_tools.py