remove SHA-512 code, use libgcrypt implementation
[oweals/gnunet.git] / src / dht / Makefile.am
1 INCLUDES = -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 if HAVE_MYSQL
9  MYSQL_PLUGIN = libgnunet_plugin_dhtlog_mysql.la
10 endif
11
12 if HAVE_ZLIB
13  ZLIB_LNK = -lz
14 endif
15
16 if USE_COVERAGE
17   AM_CFLAGS = --coverage -O0
18   XLIB = -lgcov
19 endif
20
21 lib_LTLIBRARIES = libgnunetdht.la \
22  libgnunetdhtlog.la
23
24 plugin_LTLIBRARIES = \
25  $(MYSQL_PLUGIN) \
26  libgnunet_plugin_dhtlog_dummy.la \
27  libgnunet_plugin_dhtlog_mysql_dump.la \
28  libgnunet_plugin_dhtlog_mysql_dump_load.la  
29
30
31 libgnunet_plugin_dhtlog_mysql_la_SOURCES = \
32   plugin_dhtlog_mysql.c
33 libgnunet_plugin_dhtlog_mysql_la_LIBADD = \
34   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lz -lsqlite3
35 libgnunet_plugin_dhtlog_mysql_la_LDFLAGS = \
36  $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient
37 libgnunet_plugin_dhtlog_mysql_la_CPFLAGS = \
38  $(MYSQL_CPPFLAGS)
39
40 libgnunet_plugin_dhtlog_dummy_la_SOURCES = \
41   plugin_dhtlog_dummy.c
42 libgnunet_plugin_dhtlog_dummy_la_LIBADD = \
43   $(top_builddir)/src/util/libgnunetutil.la \
44   $(XLIB)
45 libgnunet_plugin_dhtlog_dummy_la_LDFLAGS = \
46  $(GN_PLUGIN_LDFLAGS)
47
48 libgnunet_plugin_dhtlog_mysql_dump_la_SOURCES = \
49   plugin_dhtlog_mysql_dump.c
50 libgnunet_plugin_dhtlog_mysql_dump_la_LIBADD = \
51   $(top_builddir)/src/util/libgnunetutil.la \
52   $(XLIB)
53 libgnunet_plugin_dhtlog_mysql_dump_la_LDFLAGS = \
54  $(GN_PLUGIN_LDFLAGS)
55
56 libgnunet_plugin_dhtlog_mysql_dump_load_la_SOURCES = \
57   plugin_dhtlog_mysql_dump_load.c
58 libgnunet_plugin_dhtlog_mysql_dump_load_la_LIBADD = \
59   $(top_builddir)/src/util/libgnunetutil.la \
60   $(XLIB)
61 libgnunet_plugin_dhtlog_mysql_dump_load_la_LDFLAGS = \
62  $(GN_PLUGIN_LDFLAGS)
63
64 libgnunetdhtlog_la_SOURCES = \
65   dhtlog.c dhtlog.h
66 libgnunetdhtlog_la_LIBADD = \
67   $(top_builddir)/src/util/libgnunetutil.la
68 libgnunetdhtlog_la_LDFLAGS = \
69   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
70   -version-info 0:0:0
71
72 libgnunetdht_la_SOURCES = \
73   dht_api.c dht.h \
74   dht_api_get_put.c \
75   dht_api_find_peer.c 
76 libgnunetdht_la_LIBADD = \
77   $(top_builddir)/src/util/libgnunetutil.la \
78   $(XLIB)
79 libgnunetdht_la_LDFLAGS = \
80   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
81   -version-info 0:0:0
82
83 if HAVE_EXPERIMENTAL
84 STUD_PROGS =  gnunet-service-dht-can \
85  gnunet-service-dht-freenet \
86  gnunet-service-dht-kademlia \
87  gnunet-service-dht-koorde 
88 STUD_TESTS = test_kademlia_end2end
89 endif
90
91 bin_PROGRAMS = $(STUD_PROGS) \
92  gnunet-service-dht \
93  gnunet-dht-get \
94  gnunet-dht-get-peer \
95  gnunet-dht-put 
96
97 if HAVE_MALICIOUS
98 noinst_PROGRAMS = \
99  gnunet-dht-driver 
100 endif
101
102 gnunet_service_dht_SOURCES = \
103  gnunet-service-dht.c         
104 gnunet_service_dht_LDADD = \
105   $(top_builddir)/src/statistics/libgnunetstatistics.la \
106   $(top_builddir)/src/core/libgnunetcore.la \
107   $(top_builddir)/src/transport/libgnunettransport.la \
108   $(top_builddir)/src/hello/libgnunethello.la \
109   $(top_builddir)/src/block/libgnunetblock.la \
110   $(top_builddir)/src/datacache/libgnunetdatacache.la \
111   $(top_builddir)/src/util/libgnunetutil.la \
112   $(top_builddir)/src/dht/libgnunetdhtlog.la -lm
113
114 gnunet_service_dht_can_SOURCES = \
115  dht_can.c dht_can_helper.c dht_can_helper.h
116 gnunet_service_dht_can_LDADD = \
117   $(top_builddir)/src/statistics/libgnunetstatistics.la \
118   $(top_builddir)/src/core/libgnunetcore.la \
119   $(top_builddir)/src/transport/libgnunettransport.la \
120   $(top_builddir)/src/hello/libgnunethello.la \
121   $(top_builddir)/src/datacache/libgnunetdatacache.la \
122   $(top_builddir)/src/util/libgnunetutil.la 
123
124 gnunet_service_dht_freenet_SOURCES = \
125  dht_freenet.c 
126 gnunet_service_dht_freenet_LDADD = \
127   $(top_builddir)/src/statistics/libgnunetstatistics.la \
128   $(top_builddir)/src/core/libgnunetcore.la \
129   $(top_builddir)/src/transport/libgnunettransport.la \
130   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
131   $(top_builddir)/src/hello/libgnunethello.la \
132   $(top_builddir)/src/datacache/libgnunetdatacache.la \
133   $(top_builddir)/src/util/libgnunetutil.la 
134
135 gnunet_service_dht_kademlia_SOURCES = \
136  dht_kademlia.c dht_kademlia.h
137 gnunet_service_dht_kademlia_LDADD = \
138   $(top_builddir)/src/statistics/libgnunetstatistics.la \
139   $(top_builddir)/src/core/libgnunetcore.la \
140   $(top_builddir)/src/transport/libgnunettransport.la \
141   $(top_builddir)/src/hello/libgnunethello.la \
142   $(top_builddir)/src/datacache/libgnunetdatacache.la \
143   $(top_builddir)/src/util/libgnunetutil.la 
144
145 gnunet_service_dht_koorde_SOURCES = \
146  dht_koorde.c dht_koorde.h
147 gnunet_service_dht_koorde_LDADD = \
148   $(top_builddir)/src/statistics/libgnunetstatistics.la \
149   $(top_builddir)/src/core/libgnunetcore.la \
150   $(top_builddir)/src/transport/libgnunettransport.la \
151   $(top_builddir)/src/hello/libgnunethello.la \
152   $(top_builddir)/src/datacache/libgnunetdatacache.la \
153   $(top_builddir)/src/util/libgnunetutil.la 
154
155 gnunet_dht_get_SOURCES = \
156  gnunet-dht-get.c         
157 gnunet_dht_get_LDADD = \
158   $(top_builddir)/src/dht/libgnunetdht.la \
159   $(top_builddir)/src/core/libgnunetcore.la \
160   $(top_builddir)/src/util/libgnunetutil.la 
161
162 gnunet_dht_get_peer_SOURCES = \
163  gnunet-dht-get-peer.c         
164 gnunet_dht_get_peer_LDADD = \
165   $(top_builddir)/src/dht/libgnunetdht.la \
166   $(top_builddir)/src/hello/libgnunethello.la \
167   $(top_builddir)/src/core/libgnunetcore.la \
168   $(top_builddir)/src/util/libgnunetutil.la 
169
170 gnunet_dht_put_SOURCES = \
171  gnunet-dht-put.c         
172 gnunet_dht_put_LDADD = \
173   $(top_builddir)/src/dht/libgnunetdht.la \
174   $(top_builddir)/src/core/libgnunetcore.la \
175   $(top_builddir)/src/util/libgnunetutil.la 
176
177 gnunet_dht_driver_SOURCES = \
178  gnunet-dht-driver.c         
179 gnunet_dht_driver_LDADD = \
180   $(top_builddir)/src/dht/libgnunetdht.la \
181   $(top_builddir)/src/dht/libgnunetdhtlog.la \
182   $(top_builddir)/src/core/libgnunetcore.la \
183   $(top_builddir)/src/testing/libgnunettesting.la \
184   $(top_builddir)/src/util/libgnunetutil.la \
185   $(top_builddir)/src/dht/libgnunetdhtlog.la
186
187 check_PROGRAMS = $(STUD_TESTS) \
188  test_dht_api \
189  test_dht_twopeer \
190  test_dht_twopeer_put_get \
191  test_dht_multipeer \
192  test_dhtlog 
193 # test_hash_operations
194
195 if !DISABLE_TEST_RUN
196 TESTS = test_dht_api $(check_SCRIPTS) \
197  test_dht_twopeer \
198  test_dht_twopeer_put_get
199 endif
200
201 test_dht_api_SOURCES = \
202  test_dht_api.c
203 test_dht_api_LDADD = \
204  $(top_builddir)/src/util/libgnunetutil.la \
205  $(top_builddir)/src/hello/libgnunethello.la \
206  $(top_builddir)/src/dht/libgnunetdht.la
207
208 test_dht_multipeer_SOURCES = \
209  test_dht_multipeer.c
210 test_dht_multipeer_LDADD = \
211  $(top_builddir)/src/util/libgnunetutil.la \
212  $(top_builddir)/src/testing/libgnunettesting.la \
213  $(top_builddir)/src/dht/libgnunetdht.la  
214  
215 #test_hash_operations_SOURCES = \
216 # test_hash_operations.c
217 #test_hash_operations_LDADD = \
218 # $(top_builddir)/src/util/libgnunetutil.la \
219 # $(top_builddir)/src/testing/libgnunettesting.la \
220 # $(top_builddir)/src/dht/libgnunetdht.la 
221
222 test_dht_twopeer_SOURCES = \
223  test_dht_twopeer.c
224 test_dht_twopeer_LDADD = \
225  $(top_builddir)/src/util/libgnunetutil.la \
226  $(top_builddir)/src/testing/libgnunettesting.la \
227  $(top_builddir)/src/dht/libgnunetdht.la    
228
229 test_dht_twopeer_put_get_SOURCES = \
230  test_dht_twopeer_put_get.c
231 test_dht_twopeer_put_get_LDADD = \
232  $(top_builddir)/src/util/libgnunetutil.la \
233  $(top_builddir)/src/testing/libgnunettesting.la \
234  $(top_builddir)/src/dht/libgnunetdht.la   
235
236 test_dhtlog_SOURCES = \
237  test_dhtlog.c
238 test_dhtlog_LDADD = \
239  $(top_builddir)/src/util/libgnunetutil.la \
240  $(top_builddir)/src/testing/libgnunettesting.la \
241  $(top_builddir)/src/dht/libgnunetdht.la \
242  $(top_builddir)/src/dht/libgnunetdhtlog.la
243
244 test_kademlia_end2end_SOURCES = \
245  test_kademlia_end2end.c
246 test_kademlia_end2end_LDADD = \
247  $(top_builddir)/src/util/libgnunetutil.la \
248  $(top_builddir)/src/testing/libgnunettesting.la \
249  $(top_builddir)/src/dht/libgnunetdht.la \
250  $(top_builddir)/src/dht/libgnunetdhtlog.la
251
252 EXTRA_DIST = \
253   $(check_SCRIPTS) \
254   test_dht_api_data.conf \
255   test_dht_api_peer1.conf \
256   test_dht_twopeer_data.conf \
257   test_dht_multipeer_data.conf
258
259 check_SCRIPTS = \
260   test_dht_tools.sh