nitpicks
[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 libgnunetdht_la_LIBADD = \
75   $(top_builddir)/src/util/libgnunetutil.la \
76   $(XLIB)
77 libgnunetdht_la_LDFLAGS = \
78   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
79   -version-info 0:0:0
80
81 if HAVE_EXPERIMENTAL
82 STUD_PROGS =  gnunet-service-dht-can \
83  gnunet-service-dht-freenet \
84  gnunet-service-dht-kademlia \
85  gnunet-service-dht-koorde 
86 STUD_TESTS = test_kademlia_end2end
87 endif
88
89 bin_PROGRAMS = $(STUD_PROGS) \
90  gnunet-service-dht \
91  gnunet-dht-get \
92  gnunet-dht-get-peer \
93  gnunet-dht-put 
94
95 noinst_PROGRAMS = \
96  gnunet-dht-driver 
97
98 gnunet_service_dht_SOURCES = \
99  gnunet-service-dht.c         
100 gnunet_service_dht_LDADD = \
101   $(top_builddir)/src/statistics/libgnunetstatistics.la \
102   $(top_builddir)/src/core/libgnunetcore.la \
103   $(top_builddir)/src/transport/libgnunettransport.la \
104   $(top_builddir)/src/hello/libgnunethello.la \
105   $(top_builddir)/src/datacache/libgnunetdatacache.la \
106   $(top_builddir)/src/util/libgnunetutil.la \
107   $(top_builddir)/src/dht/libgnunetdhtlog.la
108
109 gnunet_service_dht_can_SOURCES = \
110  dht_can.c dht_can_helper.c dht_can_helper.h
111 gnunet_service_dht_can_LDADD = \
112   $(top_builddir)/src/statistics/libgnunetstatistics.la \
113   $(top_builddir)/src/core/libgnunetcore.la \
114   $(top_builddir)/src/transport/libgnunettransport.la \
115   $(top_builddir)/src/hello/libgnunethello.la \
116   $(top_builddir)/src/datacache/libgnunetdatacache.la \
117   $(top_builddir)/src/util/libgnunetutil.la 
118
119 gnunet_service_dht_freenet_SOURCES = \
120  dht_freenet.c 
121 gnunet_service_dht_freenet_LDADD = \
122   $(top_builddir)/src/statistics/libgnunetstatistics.la \
123   $(top_builddir)/src/core/libgnunetcore.la \
124   $(top_builddir)/src/transport/libgnunettransport.la \
125   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
126   $(top_builddir)/src/hello/libgnunethello.la \
127   $(top_builddir)/src/datacache/libgnunetdatacache.la \
128   $(top_builddir)/src/util/libgnunetutil.la 
129
130 gnunet_service_dht_kademlia_SOURCES = \
131  dht_kademlia.c dht_kademlia.h
132 gnunet_service_dht_kademlia_LDADD = \
133   $(top_builddir)/src/statistics/libgnunetstatistics.la \
134   $(top_builddir)/src/core/libgnunetcore.la \
135   $(top_builddir)/src/transport/libgnunettransport.la \
136   $(top_builddir)/src/hello/libgnunethello.la \
137   $(top_builddir)/src/datacache/libgnunetdatacache.la \
138   $(top_builddir)/src/util/libgnunetutil.la 
139
140 gnunet_service_dht_koorde_SOURCES = \
141  dht_koorde.c dht_koorde.h
142 gnunet_service_dht_koorde_LDADD = \
143   $(top_builddir)/src/statistics/libgnunetstatistics.la \
144   $(top_builddir)/src/core/libgnunetcore.la \
145   $(top_builddir)/src/transport/libgnunettransport.la \
146   $(top_builddir)/src/hello/libgnunethello.la \
147   $(top_builddir)/src/datacache/libgnunetdatacache.la \
148   $(top_builddir)/src/util/libgnunetutil.la 
149
150 #gnunet_service_dht_new_SOURCES = \
151 # gnunet-service-dht-new.c         
152 #gnunet_service_dht_new_LDADD = \
153 #  $(top_builddir)/src/statistics/libgnunetstatistics.la \
154 #  $(top_builddir)/src/core/libgnunetcore.la \
155 #  $(top_builddir)/src/transport/libgnunettransport.la \
156 #  $(top_builddir)/src/hello/libgnunethello.la \
157 #  $(top_builddir)/src/datacache/libgnunetdatacache.la \
158 #  $(top_builddir)/src/util/libgnunetutil.la \
159 #  $(top_builddir)/src/dht/libgnunetdhtlog.la
160
161 gnunet_dht_get_SOURCES = \
162  gnunet-dht-get.c         
163 gnunet_dht_get_LDADD = \
164   $(top_builddir)/src/dht/libgnunetdht.la \
165   $(top_builddir)/src/core/libgnunetcore.la \
166   $(top_builddir)/src/util/libgnunetutil.la 
167
168 gnunet_dht_get_peer_SOURCES = \
169  gnunet-dht-get-peer.c         
170 gnunet_dht_get_peer_LDADD = \
171   $(top_builddir)/src/dht/libgnunetdht.la \
172   $(top_builddir)/src/hello/libgnunethello.la \
173   $(top_builddir)/src/core/libgnunetcore.la \
174   $(top_builddir)/src/util/libgnunetutil.la 
175
176 gnunet_dht_put_SOURCES = \
177  gnunet-dht-put.c         
178 gnunet_dht_put_LDADD = \
179   $(top_builddir)/src/dht/libgnunetdht.la \
180   $(top_builddir)/src/core/libgnunetcore.la \
181   $(top_builddir)/src/util/libgnunetutil.la 
182
183 gnunet_dht_driver_SOURCES = \
184  gnunet-dht-driver.c         
185 gnunet_dht_driver_LDADD = \
186   $(top_builddir)/src/dht/libgnunetdht.la \
187   $(top_builddir)/src/dht/libgnunetdhtlog.la \
188   $(top_builddir)/src/core/libgnunetcore.la \
189   $(top_builddir)/src/testing/libgnunettesting.la \
190   $(top_builddir)/src/util/libgnunetutil.la \
191   $(top_builddir)/src/dht/libgnunetdhtlog.la
192
193 check_PROGRAMS = $(STUD_TESTS) \
194  test_dht_api \
195  test_dht_twopeer \
196  test_dht_twopeer_put_get \
197  test_dht_multipeer \
198  test_dhtlog
199
200 if !DISABLE_TEST_RUN
201 TESTS = test_dht_api $(check_SCRIPTS) \
202  test_dht_twopeer \
203  test_dht_twopeer_put_get
204 endif
205
206 test_dht_api_SOURCES = \
207  test_dht_api.c
208 test_dht_api_LDADD = \
209  $(top_builddir)/src/util/libgnunetutil.la \
210  $(top_builddir)/src/hello/libgnunethello.la \
211  $(top_builddir)/src/dht/libgnunetdht.la
212
213 test_dht_multipeer_SOURCES = \
214  test_dht_multipeer.c
215 test_dht_multipeer_LDADD = \
216  $(top_builddir)/src/util/libgnunetutil.la \
217  $(top_builddir)/src/testing/libgnunettesting.la \
218  $(top_builddir)/src/dht/libgnunetdht.la  
219
220 test_dht_twopeer_SOURCES = \
221  test_dht_twopeer.c
222 test_dht_twopeer_LDADD = \
223  $(top_builddir)/src/util/libgnunetutil.la \
224  $(top_builddir)/src/testing/libgnunettesting.la \
225  $(top_builddir)/src/dht/libgnunetdht.la    
226
227 test_dht_twopeer_put_get_SOURCES = \
228  test_dht_twopeer_put_get.c
229 test_dht_twopeer_put_get_LDADD = \
230  $(top_builddir)/src/util/libgnunetutil.la \
231  $(top_builddir)/src/testing/libgnunettesting.la \
232  $(top_builddir)/src/dht/libgnunetdht.la   
233
234 test_dhtlog_SOURCES = \
235  test_dhtlog.c
236 test_dhtlog_LDADD = \
237  $(top_builddir)/src/util/libgnunetutil.la \
238  $(top_builddir)/src/testing/libgnunettesting.la \
239  $(top_builddir)/src/dht/libgnunetdht.la \
240  $(top_builddir)/src/dht/libgnunetdhtlog.la
241
242 test_kademlia_end2end_SOURCES = \
243  test_kademlia_end2end.c
244 test_kademlia_end2end_LDADD = \
245  $(top_builddir)/src/util/libgnunetutil.la \
246  $(top_builddir)/src/testing/libgnunettesting.la \
247  $(top_builddir)/src/dht/libgnunetdht.la \
248  $(top_builddir)/src/dht/libgnunetdhtlog.la
249
250 EXTRA_DIST = \
251   $(check_SCRIPTS) \
252   test_dht_api_data.conf \
253   test_dht_api_peer1.conf \
254   test_dht_twopeer_data.conf \
255   test_dht_multipeer_data.conf
256
257 check_SCRIPTS = \
258   test_dht_tools.sh