21192f91c8950eafe7cfdbebe714f5ef8306a3ee
[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 HAVE_MYSQL = 0
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  libgnunet_plugin_dhtlog_dummy.la $(MYSQL_PLUGIN)
26
27 libgnunet_plugin_dhtlog_dummy_la_SOURCES = \
28   plugin_dhtlog_dummy.c
29 libgnunet_plugin_dhtlog_dummy_la_LIBADD = \
30   $(top_builddir)/src/util/libgnunetutil.la \
31   $(XLIB)
32 libgnunet_plugin_dhtlog_dummy_la_LDFLAGS = \
33  $(GN_PLUGIN_LDFLAGS)
34
35 libgnunetdhtlog_la_SOURCES = \
36   dhtlog.c dhtlog.h
37 libgnunetdhtlog_la_LIBADD = \
38   $(top_builddir)/src/util/libgnunetutil.la
39 libgnunetdhtlog_la_LDFLAGS = \
40   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
41   -version-info 0:0:0
42
43 if HAVE_MYSQL
44 libgnunet_plugin_dhtlog_mysql_la_SOURCES = \
45   plugin_dhtlog_mysql.c
46 libgnunet_plugin_dhtlog_mysql_la_LIBADD = \
47   $(top_builddir)/src/util/libgnunetutil.la \
48   $(XLIB)
49 libgnunet_plugin_dhtlog_mysql_la_LDFLAGS = \
50  $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient $(ZLIB_LNK)
51 libgnunet_plugin_dhtlog_mysql_la_CPPFLAGS = \
52  $(MYSQL_CPPFLAGS) 
53 endif 
54
55 libgnunetdht_la_SOURCES = \
56   dht_api.c dht.h
57 libgnunetdht_la_LIBADD = \
58   $(top_builddir)/src/util/libgnunetutil.la \
59   $(XLIB)
60 libgnunetdht_la_LDFLAGS = \
61   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
62   -version-info 0:0:0
63
64 STUD_PROGS =  gnunet-service-dht-can \
65  gnunet-service-dht-freenet \
66  gnunet-service-dht-kademlia \
67  gnunet-service-dht-koorde 
68
69 bin_PROGRAMS = $(STUD_PROGS) \
70  gnunet-service-dht \
71  gnunet-dht-get \
72  gnunet-dht-get-peer \
73  gnunet-dht-put 
74
75 noinst_PROGRAMS = \
76  gnunet-dht-driver
77
78 gnunet_service_dht_SOURCES = \
79  gnunet-service-dht.c         
80 gnunet_service_dht_LDADD = \
81   $(top_builddir)/src/statistics/libgnunetstatistics.la \
82   $(top_builddir)/src/core/libgnunetcore.la \
83   $(top_builddir)/src/transport/libgnunettransport.la \
84   $(top_builddir)/src/hello/libgnunethello.la \
85   $(top_builddir)/src/datacache/libgnunetdatacache.la \
86   $(top_builddir)/src/util/libgnunetutil.la \
87   $(top_builddir)/src/dht/libgnunetdhtlog.la
88
89 gnunet_service_dht_can_SOURCES = \
90  dht_can.c dht_can_helper.c dht_can_helper.h
91 gnunet_service_dht_can_LDADD = \
92   $(top_builddir)/src/statistics/libgnunetstatistics.la \
93   $(top_builddir)/src/core/libgnunetcore.la \
94   $(top_builddir)/src/transport/libgnunettransport.la \
95   $(top_builddir)/src/hello/libgnunethello.la \
96   $(top_builddir)/src/datacache/libgnunetdatacache.la \
97   $(top_builddir)/src/util/libgnunetutil.la 
98
99 gnunet_service_dht_freenet_SOURCES = \
100  dht_freenet.c 
101 gnunet_service_dht_freenet_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/peerinfo/libgnunetpeerinfo.la \
106   $(top_builddir)/src/hello/libgnunethello.la \
107   $(top_builddir)/src/datacache/libgnunetdatacache.la \
108   $(top_builddir)/src/util/libgnunetutil.la 
109
110 gnunet_service_dht_kademlia_SOURCES = \
111  dht_kademlia.c dht_kademlia.h
112 gnunet_service_dht_kademlia_LDADD = \
113   $(top_builddir)/src/statistics/libgnunetstatistics.la \
114   $(top_builddir)/src/core/libgnunetcore.la \
115   $(top_builddir)/src/transport/libgnunettransport.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_koorde_SOURCES = \
121  dht_koorde.c dht_koorde.h
122 gnunet_service_dht_koorde_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_new_SOURCES = \
131 # gnunet-service-dht-new.c         
132 #gnunet_service_dht_new_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 #  $(top_builddir)/src/dht/libgnunetdhtlog.la
140
141 gnunet_dht_get_SOURCES = \
142  gnunet-dht-get.c         
143 gnunet_dht_get_LDADD = \
144   $(top_builddir)/src/dht/libgnunetdht.la \
145   $(top_builddir)/src/core/libgnunetcore.la \
146   $(top_builddir)/src/util/libgnunetutil.la 
147
148 gnunet_dht_get_peer_SOURCES = \
149  gnunet-dht-get-peer.c         
150 gnunet_dht_get_peer_LDADD = \
151   $(top_builddir)/src/dht/libgnunetdht.la \
152   $(top_builddir)/src/hello/libgnunethello.la \
153   $(top_builddir)/src/core/libgnunetcore.la \
154   $(top_builddir)/src/util/libgnunetutil.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
163 gnunet_dht_driver_SOURCES = \
164  gnunet-dht-driver.c         
165 gnunet_dht_driver_LDADD = \
166   $(top_builddir)/src/dht/libgnunetdht.la \
167   $(top_builddir)/src/dht/libgnunetdhtlog.la \
168   $(top_builddir)/src/core/libgnunetcore.la \
169   $(top_builddir)/src/testing/libgnunettesting.la \
170   $(top_builddir)/src/util/libgnunetutil.la \
171   $(top_builddir)/src/dht/libgnunetdhtlog.la
172
173 check_PROGRAMS = \
174  test_dht_api \
175  test_dht_twopeer \
176  test_dht_twopeer_put_get \
177  test_dht_multipeer \
178  test_dhtlog
179
180 TESTS = test_dht_api $(check_SCRIPTS) \
181  test_dht_twopeer \
182  test_dht_twopeer_put_get
183
184 test_dht_api_SOURCES = \
185  test_dht_api.c
186 test_dht_api_LDADD = \
187  $(top_builddir)/src/util/libgnunetutil.la \
188  $(top_builddir)/src/hello/libgnunethello.la \
189  $(top_builddir)/src/dht/libgnunetdht.la
190
191 test_dht_multipeer_SOURCES = \
192  test_dht_multipeer.c
193 test_dht_multipeer_LDADD = \
194  $(top_builddir)/src/util/libgnunetutil.la \
195  $(top_builddir)/src/testing/libgnunettesting.la \
196  $(top_builddir)/src/dht/libgnunetdht.la  
197
198 test_dht_twopeer_SOURCES = \
199  test_dht_twopeer.c
200 test_dht_twopeer_LDADD = \
201  $(top_builddir)/src/util/libgnunetutil.la \
202  $(top_builddir)/src/testing/libgnunettesting.la \
203  $(top_builddir)/src/dht/libgnunetdht.la    
204
205 test_dht_twopeer_put_get_SOURCES = \
206  test_dht_twopeer_put_get.c
207 test_dht_twopeer_put_get_LDADD = \
208  $(top_builddir)/src/util/libgnunetutil.la \
209  $(top_builddir)/src/testing/libgnunettesting.la \
210  $(top_builddir)/src/dht/libgnunetdht.la   
211
212 test_dhtlog_SOURCES = \
213  test_dhtlog.c
214 test_dhtlog_LDADD = \
215  $(top_builddir)/src/util/libgnunetutil.la \
216  $(top_builddir)/src/testing/libgnunettesting.la \
217  $(top_builddir)/src/dht/libgnunetdht.la \
218  $(top_builddir)/src/dht/libgnunetdhtlog.la
219
220 EXTRA_DIST = \
221   $(check_SCRIPTS) \
222   test_dht_api_data.conf \
223   test_dht_api_peer1.conf \
224   test_dht_twopeer_data.conf \
225   test_dht_multipeer_data.conf
226
227 check_SCRIPTS = \
228   test_dht_tools.sh