lots of little things, mainly report statistics at end of dht profiling testcase
[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
29
30 libgnunet_plugin_dhtlog_mysql_la_SOURCES = \
31   plugin_dhtlog_mysql.c
32 libgnunet_plugin_dhtlog_mysql_la_LIBADD = \
33   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lz -lsqlite3
34 libgnunet_plugin_dhtlog_mysql_la_LDFLAGS = \
35  $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient
36 libgnunet_plugin_dhtlog_mysql_la_CPFLAGS = \
37  $(MYSQL_CPPFLAGS)
38
39 libgnunet_plugin_dhtlog_dummy_la_SOURCES = \
40   plugin_dhtlog_dummy.c
41 libgnunet_plugin_dhtlog_dummy_la_LIBADD = \
42   $(top_builddir)/src/util/libgnunetutil.la \
43   $(XLIB)
44 libgnunet_plugin_dhtlog_dummy_la_LDFLAGS = \
45  $(GN_PLUGIN_LDFLAGS)
46  
47 libgnunet_plugin_dhtlog_mysql_dump_la_SOURCES = \
48   plugin_dhtlog_mysql_dump.c
49 libgnunet_plugin_dhtlog_mysql_dump_la_LIBADD = \
50   $(top_builddir)/src/util/libgnunetutil.la \
51   $(XLIB)
52 libgnunet_plugin_dhtlog_mysql_dump_la_LDFLAGS = \
53  $(GN_PLUGIN_LDFLAGS)
54
55 libgnunetdhtlog_la_SOURCES = \
56   dhtlog.c dhtlog.h
57 libgnunetdhtlog_la_LIBADD = \
58   $(top_builddir)/src/util/libgnunetutil.la
59 libgnunetdhtlog_la_LDFLAGS = \
60   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
61   -version-info 0:0:0
62
63 libgnunetdht_la_SOURCES = \
64   dht_api.c dht.h
65 libgnunetdht_la_LIBADD = \
66   $(top_builddir)/src/util/libgnunetutil.la \
67   $(XLIB)
68 libgnunetdht_la_LDFLAGS = \
69   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
70   -version-info 0:0:0
71
72 if HAVE_EXPERIMENTAL
73 STUD_PROGS =  gnunet-service-dht-can \
74  gnunet-service-dht-freenet \
75  gnunet-service-dht-kademlia \
76  gnunet-service-dht-koorde 
77 endif
78
79 bin_PROGRAMS = $(STUD_PROGS) \
80  gnunet-service-dht \
81  gnunet-dht-get \
82  gnunet-dht-get-peer \
83  gnunet-dht-put 
84
85 noinst_PROGRAMS = \
86  gnunet-dht-driver 
87
88 gnunet_service_dht_SOURCES = \
89  gnunet-service-dht.c         
90 gnunet_service_dht_LDADD = \
91   $(top_builddir)/src/statistics/libgnunetstatistics.la \
92   $(top_builddir)/src/core/libgnunetcore.la \
93   $(top_builddir)/src/transport/libgnunettransport.la \
94   $(top_builddir)/src/hello/libgnunethello.la \
95   $(top_builddir)/src/datacache/libgnunetdatacache.la \
96   $(top_builddir)/src/util/libgnunetutil.la \
97   $(top_builddir)/src/dht/libgnunetdhtlog.la
98
99 gnunet_service_dht_can_SOURCES = \
100  dht_can.c dht_can_helper.c dht_can_helper.h
101 gnunet_service_dht_can_LDADD = \
102   $(top_builddir)/src/statistics/libgnunetstatistics.la \
103   $(top_builddir)/src/core/libgnunetcore.la \
104   $(top_builddir)/src/transport/libgnunettransport.la \
105   $(top_builddir)/src/hello/libgnunethello.la \
106   $(top_builddir)/src/datacache/libgnunetdatacache.la \
107   $(top_builddir)/src/util/libgnunetutil.la 
108
109 gnunet_service_dht_freenet_SOURCES = \
110  dht_freenet.c 
111 gnunet_service_dht_freenet_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/peerinfo/libgnunetpeerinfo.la \
116   $(top_builddir)/src/hello/libgnunethello.la \
117   $(top_builddir)/src/datacache/libgnunetdatacache.la \
118   $(top_builddir)/src/util/libgnunetutil.la 
119
120 gnunet_service_dht_kademlia_SOURCES = \
121  dht_kademlia.c dht_kademlia.h
122 gnunet_service_dht_kademlia_LDADD = \
123   $(top_builddir)/src/statistics/libgnunetstatistics.la \
124   $(top_builddir)/src/core/libgnunetcore.la \
125   $(top_builddir)/src/transport/libgnunettransport.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_koorde_SOURCES = \
131  dht_koorde.c dht_koorde.h
132 gnunet_service_dht_koorde_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_new_SOURCES = \
141 # gnunet-service-dht-new.c         
142 #gnunet_service_dht_new_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 #  $(top_builddir)/src/dht/libgnunetdhtlog.la
150
151 gnunet_dht_get_SOURCES = \
152  gnunet-dht-get.c         
153 gnunet_dht_get_LDADD = \
154   $(top_builddir)/src/dht/libgnunetdht.la \
155   $(top_builddir)/src/core/libgnunetcore.la \
156   $(top_builddir)/src/util/libgnunetutil.la 
157
158 gnunet_dht_get_peer_SOURCES = \
159  gnunet-dht-get-peer.c         
160 gnunet_dht_get_peer_LDADD = \
161   $(top_builddir)/src/dht/libgnunetdht.la \
162   $(top_builddir)/src/hello/libgnunethello.la \
163   $(top_builddir)/src/core/libgnunetcore.la \
164   $(top_builddir)/src/util/libgnunetutil.la 
165
166 gnunet_dht_put_SOURCES = \
167  gnunet-dht-put.c         
168 gnunet_dht_put_LDADD = \
169   $(top_builddir)/src/dht/libgnunetdht.la \
170   $(top_builddir)/src/core/libgnunetcore.la \
171   $(top_builddir)/src/util/libgnunetutil.la 
172
173 gnunet_dht_driver_SOURCES = \
174  gnunet-dht-driver.c         
175 gnunet_dht_driver_LDADD = \
176   $(top_builddir)/src/dht/libgnunetdht.la \
177   $(top_builddir)/src/dht/libgnunetdhtlog.la \
178   $(top_builddir)/src/core/libgnunetcore.la \
179   $(top_builddir)/src/testing/libgnunettesting.la \
180   $(top_builddir)/src/util/libgnunetutil.la \
181   $(top_builddir)/src/dht/libgnunetdhtlog.la
182
183 check_PROGRAMS = \
184  test_dht_api \
185  test_dht_twopeer \
186  test_dht_twopeer_put_get \
187  test_dht_multipeer \
188  test_dhtlog
189
190 if !DISABLE_TEST_RUN
191 TESTS = test_dht_api $(check_SCRIPTS) \
192  test_dht_twopeer \
193  test_dht_twopeer_put_get
194 endif
195
196 test_dht_api_SOURCES = \
197  test_dht_api.c
198 test_dht_api_LDADD = \
199  $(top_builddir)/src/util/libgnunetutil.la \
200  $(top_builddir)/src/hello/libgnunethello.la \
201  $(top_builddir)/src/dht/libgnunetdht.la
202
203 test_dht_multipeer_SOURCES = \
204  test_dht_multipeer.c
205 test_dht_multipeer_LDADD = \
206  $(top_builddir)/src/util/libgnunetutil.la \
207  $(top_builddir)/src/testing/libgnunettesting.la \
208  $(top_builddir)/src/dht/libgnunetdht.la  
209
210 test_dht_twopeer_SOURCES = \
211  test_dht_twopeer.c
212 test_dht_twopeer_LDADD = \
213  $(top_builddir)/src/util/libgnunetutil.la \
214  $(top_builddir)/src/testing/libgnunettesting.la \
215  $(top_builddir)/src/dht/libgnunetdht.la    
216
217 test_dht_twopeer_put_get_SOURCES = \
218  test_dht_twopeer_put_get.c
219 test_dht_twopeer_put_get_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_dhtlog_SOURCES = \
225  test_dhtlog.c
226 test_dhtlog_LDADD = \
227  $(top_builddir)/src/util/libgnunetutil.la \
228  $(top_builddir)/src/testing/libgnunettesting.la \
229  $(top_builddir)/src/dht/libgnunetdht.la \
230  $(top_builddir)/src/dht/libgnunetdhtlog.la
231
232 EXTRA_DIST = \
233   $(check_SCRIPTS) \
234   test_dht_api_data.conf \
235   test_dht_api_peer1.conf \
236   test_dht_twopeer_data.conf \
237   test_dht_multipeer_data.conf
238
239 check_SCRIPTS = \
240   test_dht_tools.sh