3d30f98d7ec4903348ac8da3ce511f28c92d3e02
[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 libgnunetdhtnew_la_SOURCES = \
84   dht_api_new.c dht_new.h 
85 libgnunetdhtnew_la_LIBADD = \
86   $(top_builddir)/src/util/libgnunetutil.la \
87   $(XLIB)
88 libgnunetdhtnew_la_LDFLAGS = \
89   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
90   -version-info 0:0:0
91
92 bin_PROGRAMS = \
93  gnunet-service-dht \
94  gnunet-service-dht-new \
95  gnunet-dht-get \
96  gnunet-dht-get-peer \
97  gnunet-dht-put
98
99 if HAVE_MALICIOUS
100 noinst_PROGRAMS = \
101  gnunet-dht-driver 
102 endif
103
104 gnunet_service_dht_SOURCES = \
105  gnunet-service-dht.c         
106 gnunet_service_dht_LDADD = \
107   $(top_builddir)/src/statistics/libgnunetstatistics.la \
108   $(top_builddir)/src/core/libgnunetcore.la \
109   $(top_builddir)/src/nse/libgnunetnse.la \
110   $(top_builddir)/src/transport/libgnunettransport.la \
111   $(top_builddir)/src/hello/libgnunethello.la \
112   $(top_builddir)/src/block/libgnunetblock.la \
113   $(top_builddir)/src/datacache/libgnunetdatacache.la \
114   $(top_builddir)/src/util/libgnunetutil.la \
115   $(top_builddir)/src/dht/libgnunetdhtlog.la -lm
116 gnunet_service_dht_DEPENDENCIES = \
117   libgnunetdhtlog.la                              
118
119 gnunet_service_dht_new_SOURCES = \
120  gnunet-service-dht-new.c gnunet-service-dht.h \
121  gnunet-service-dht_clients.c gnunet-service-dht_clients.h \
122  gnunet-service-dht_datacache.c gnunet-service-dht_datacache.h \
123  gnunet-service-dht_nse.c gnunet-service-dht_nse.h \
124  gnunet-service-dht_neighbours.c gnunet-service-dht_neighbours.h \
125  gnunet-service-dht_routing.c gnunet-service-dht_routing.h 
126 gnunet_service_dht_new_LDADD = \
127   $(top_builddir)/src/statistics/libgnunetstatistics.la \
128   $(top_builddir)/src/core/libgnunetcore.la \
129   $(top_builddir)/src/nse/libgnunetnse.la \
130   $(top_builddir)/src/transport/libgnunettransport.la \
131   $(top_builddir)/src/hello/libgnunethello.la \
132   $(top_builddir)/src/block/libgnunetblock.la \
133   $(top_builddir)/src/datacache/libgnunetdatacache.la \
134   $(top_builddir)/src/util/libgnunetutil.la \
135   -lm
136
137 gnunet_dht_get_SOURCES = \
138  gnunet-dht-get.c         
139 gnunet_dht_get_LDADD = \
140   $(top_builddir)/src/dht/libgnunetdht.la \
141   $(top_builddir)/src/core/libgnunetcore.la \
142   $(top_builddir)/src/util/libgnunetutil.la 
143 gnunet_dht_get_DEPENDENCIES = \
144   libgnunetdht.la                             
145
146 gnunet_dht_get_peer_SOURCES = \
147  gnunet-dht-get-peer.c         
148 gnunet_dht_get_peer_LDADD = \
149   $(top_builddir)/src/dht/libgnunetdht.la \
150   $(top_builddir)/src/hello/libgnunethello.la \
151   $(top_builddir)/src/core/libgnunetcore.la \
152   $(top_builddir)/src/util/libgnunetutil.la 
153 gnunet_dht_get_peer_DEPENDENCIES = \
154   libgnunetdht.la                             
155
156 gnunet_dht_put_SOURCES = \
157  gnunet-dht-put.c         
158 gnunet_dht_put_LDADD = \
159   $(top_builddir)/src/dht/libgnunetdht.la \
160   $(top_builddir)/src/core/libgnunetcore.la \
161   $(top_builddir)/src/util/libgnunetutil.la 
162 gnunet_dht_put_DEPENDENCIES = \
163   libgnunetdht.la                             
164
165 gnunet_dht_driver_SOURCES = \
166  gnunet-dht-driver.c         
167 gnunet_dht_driver_LDADD = \
168   $(top_builddir)/src/dht/libgnunetdht.la \
169   $(top_builddir)/src/dht/libgnunetdhtlog.la \
170   $(top_builddir)/src/core/libgnunetcore.la \
171   $(top_builddir)/src/testing/libgnunettesting.la \
172   $(top_builddir)/src/util/libgnunetutil.la \
173   $(top_builddir)/src/dht/libgnunetdhtlog.la
174 gnunet_dht_driver_DEPENDENCIES = \
175   libgnunetdht.la \
176   libgnunetdhtlog.la  
177
178
179 check_PROGRAMS = \
180  test_dht_api \
181  test_dht_twopeer \
182  test_dht_twopeer_put_get \
183  test_dht_twopeer_get_put \
184  test_dht_twopeer_path_tracking \
185  test_dht_multipeer \
186  test_dhtlog 
187 # test_hash_operations
188
189 if ENABLE_TEST_RUN
190 TESTS = test_dht_api $(check_SCRIPTS) \
191  test_dht_twopeer \
192  test_dht_twopeer_put_get \
193  test_dht_twopeer_get_put \
194  test_dht_twopeer_path_tracking \
195  test_dht_multipeer \
196  test_dhtlog
197 endif
198
199 test_dht_api_SOURCES = \
200  test_dht_api.c
201 test_dht_api_LDADD = \
202  $(top_builddir)/src/util/libgnunetutil.la \
203  $(top_builddir)/src/hello/libgnunethello.la \
204  $(top_builddir)/src/dht/libgnunetdht.la
205 test_dht_api_DEPENDENCIES = \
206   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 test_dht_multipeer_DEPENDENCIES = \
215   libgnunetdht.la                           
216  
217 #test_hash_operations_SOURCES = \
218 # test_hash_operations.c
219 #test_hash_operations_LDADD = \
220 # $(top_builddir)/src/util/libgnunetutil.la \
221 # $(top_builddir)/src/testing/libgnunettesting.la \
222 # $(top_builddir)/src/dht/libgnunetdht.la 
223
224 test_dht_twopeer_SOURCES = \
225  test_dht_twopeer.c
226 test_dht_twopeer_LDADD = \
227  $(top_builddir)/src/util/libgnunetutil.la \
228  $(top_builddir)/src/testing/libgnunettesting.la \
229  $(top_builddir)/src/dht/libgnunetdht.la    
230 test_dht_twopeer_DEPENDENCIES = \
231   libgnunetdht.la                           
232
233 test_dht_twopeer_put_get_SOURCES = \
234  test_dht_twopeer_put_get.c
235 test_dht_twopeer_put_get_LDADD = \
236  $(top_builddir)/src/util/libgnunetutil.la \
237  $(top_builddir)/src/testing/libgnunettesting.la \
238  $(top_builddir)/src/dht/libgnunetdht.la   
239
240 test_dht_twopeer_get_put_SOURCES = \
241  test_dht_twopeer_get_put.c
242 test_dht_twopeer_get_put_LDADD = \
243  $(top_builddir)/src/util/libgnunetutil.la \
244  $(top_builddir)/src/testing/libgnunettesting.la \
245  $(top_builddir)/src/dht/libgnunetdht.la   
246
247 test_dht_twopeer_path_tracking_SOURCES = \
248  test_dht_twopeer_path_tracking.c
249 test_dht_twopeer_path_tracking_LDADD = \
250  $(top_builddir)/src/util/libgnunetutil.la \
251  $(top_builddir)/src/testing/libgnunettesting.la \
252  $(top_builddir)/src/dht/libgnunetdht.la   
253
254 test_dhtlog_SOURCES = \
255  test_dhtlog.c
256 test_dhtlog_LDADD = \
257  $(top_builddir)/src/util/libgnunetutil.la \
258  $(top_builddir)/src/testing/libgnunettesting.la \
259  $(top_builddir)/src/dht/libgnunetdht.la \
260  $(top_builddir)/src/dht/libgnunetdhtlog.la
261
262 EXTRA_DIST = \
263   $(check_SCRIPTS) \
264   test_dht_api_data.conf \
265   test_dht_api_peer1.conf \
266   test_dht_twopeer_data.conf \
267   test_dht_multipeer_data.conf \
268   test_dhtlog_data.conf \
269   multipeer_topo.dat
270
271 check_SCRIPTS = \
272   test_dht_tools.sh