fixing accidental commit
[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 if HAVE_MYSQL
65 STUD_PROGS =  gnunet-service-dht-can \
66  gnunet-service-dht-freenet \
67  gnunet-service-dht-kademlia \
68  gnunet-service-dht-koorde 
69 endif
70
71 bin_PROGRAMS = $(STUD_PROGS) \
72  gnunet-service-dht \
73  gnunet-dht-get \
74  gnunet-dht-get-peer \
75  gnunet-dht-put 
76
77 noinst_PROGRAMS = \
78  gnunet-dht-driver
79
80 gnunet_service_dht_SOURCES = \
81  gnunet-service-dht.c         
82 gnunet_service_dht_LDADD = \
83   $(top_builddir)/src/statistics/libgnunetstatistics.la \
84   $(top_builddir)/src/core/libgnunetcore.la \
85   $(top_builddir)/src/transport/libgnunettransport.la \
86   $(top_builddir)/src/hello/libgnunethello.la \
87   $(top_builddir)/src/datacache/libgnunetdatacache.la \
88   $(top_builddir)/src/util/libgnunetutil.la \
89   $(top_builddir)/src/dht/libgnunetdhtlog.la
90
91 gnunet_service_dht_can_SOURCES = \
92  dht_can.c dht_can_helper.c dht_can_helper.h
93 gnunet_service_dht_can_LDADD = \
94   $(top_builddir)/src/statistics/libgnunetstatistics.la \
95   $(top_builddir)/src/core/libgnunetcore.la \
96   $(top_builddir)/src/transport/libgnunettransport.la \
97   $(top_builddir)/src/hello/libgnunethello.la \
98   $(top_builddir)/src/datacache/libgnunetdatacache.la \
99   $(top_builddir)/src/util/libgnunetutil.la 
100
101 gnunet_service_dht_freenet_SOURCES = \
102  dht_freenet.c 
103 gnunet_service_dht_freenet_LDADD = \
104   $(top_builddir)/src/statistics/libgnunetstatistics.la \
105   $(top_builddir)/src/core/libgnunetcore.la \
106   $(top_builddir)/src/transport/libgnunettransport.la \
107   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
108   $(top_builddir)/src/hello/libgnunethello.la \
109   $(top_builddir)/src/datacache/libgnunetdatacache.la \
110   $(top_builddir)/src/util/libgnunetutil.la 
111
112 gnunet_service_dht_kademlia_SOURCES = \
113  dht_kademlia.c dht_kademlia.h
114 gnunet_service_dht_kademlia_LDADD = \
115   $(top_builddir)/src/statistics/libgnunetstatistics.la \
116   $(top_builddir)/src/core/libgnunetcore.la \
117   $(top_builddir)/src/transport/libgnunettransport.la \
118   $(top_builddir)/src/hello/libgnunethello.la \
119   $(top_builddir)/src/datacache/libgnunetdatacache.la \
120   $(top_builddir)/src/util/libgnunetutil.la 
121
122 gnunet_service_dht_koorde_SOURCES = \
123  dht_koorde.c dht_koorde.h
124 gnunet_service_dht_koorde_LDADD = \
125   $(top_builddir)/src/statistics/libgnunetstatistics.la \
126   $(top_builddir)/src/core/libgnunetcore.la \
127   $(top_builddir)/src/transport/libgnunettransport.la \
128   $(top_builddir)/src/hello/libgnunethello.la \
129   $(top_builddir)/src/datacache/libgnunetdatacache.la \
130   $(top_builddir)/src/util/libgnunetutil.la 
131
132 #gnunet_service_dht_new_SOURCES = \
133 # gnunet-service-dht-new.c         
134 #gnunet_service_dht_new_LDADD = \
135 #  $(top_builddir)/src/statistics/libgnunetstatistics.la \
136 #  $(top_builddir)/src/core/libgnunetcore.la \
137 #  $(top_builddir)/src/transport/libgnunettransport.la \
138 #  $(top_builddir)/src/hello/libgnunethello.la \
139 #  $(top_builddir)/src/datacache/libgnunetdatacache.la \
140 #  $(top_builddir)/src/util/libgnunetutil.la \
141 #  $(top_builddir)/src/dht/libgnunetdhtlog.la
142
143 gnunet_dht_get_SOURCES = \
144  gnunet-dht-get.c         
145 gnunet_dht_get_LDADD = \
146   $(top_builddir)/src/dht/libgnunetdht.la \
147   $(top_builddir)/src/core/libgnunetcore.la \
148   $(top_builddir)/src/util/libgnunetutil.la 
149
150 gnunet_dht_get_peer_SOURCES = \
151  gnunet-dht-get-peer.c         
152 gnunet_dht_get_peer_LDADD = \
153   $(top_builddir)/src/dht/libgnunetdht.la \
154   $(top_builddir)/src/hello/libgnunethello.la \
155   $(top_builddir)/src/core/libgnunetcore.la \
156   $(top_builddir)/src/util/libgnunetutil.la 
157
158 gnunet_dht_put_SOURCES = \
159  gnunet-dht-put.c         
160 gnunet_dht_put_LDADD = \
161   $(top_builddir)/src/dht/libgnunetdht.la \
162   $(top_builddir)/src/core/libgnunetcore.la \
163   $(top_builddir)/src/util/libgnunetutil.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
175 check_PROGRAMS = \
176  test_dht_api \
177  test_dht_twopeer \
178  test_dht_twopeer_put_get \
179  test_dht_multipeer \
180  test_dhtlog
181
182 TESTS = test_dht_api $(check_SCRIPTS) \
183  test_dht_twopeer \
184  test_dht_twopeer_put_get
185
186 test_dht_api_SOURCES = \
187  test_dht_api.c
188 test_dht_api_LDADD = \
189  $(top_builddir)/src/util/libgnunetutil.la \
190  $(top_builddir)/src/hello/libgnunethello.la \
191  $(top_builddir)/src/dht/libgnunetdht.la
192
193 test_dht_multipeer_SOURCES = \
194  test_dht_multipeer.c
195 test_dht_multipeer_LDADD = \
196  $(top_builddir)/src/util/libgnunetutil.la \
197  $(top_builddir)/src/testing/libgnunettesting.la \
198  $(top_builddir)/src/dht/libgnunetdht.la  
199
200 test_dht_twopeer_SOURCES = \
201  test_dht_twopeer.c
202 test_dht_twopeer_LDADD = \
203  $(top_builddir)/src/util/libgnunetutil.la \
204  $(top_builddir)/src/testing/libgnunettesting.la \
205  $(top_builddir)/src/dht/libgnunetdht.la    
206
207 test_dht_twopeer_put_get_SOURCES = \
208  test_dht_twopeer_put_get.c
209 test_dht_twopeer_put_get_LDADD = \
210  $(top_builddir)/src/util/libgnunetutil.la \
211  $(top_builddir)/src/testing/libgnunettesting.la \
212  $(top_builddir)/src/dht/libgnunetdht.la   
213
214 test_dhtlog_SOURCES = \
215  test_dhtlog.c
216 test_dhtlog_LDADD = \
217  $(top_builddir)/src/util/libgnunetutil.la \
218  $(top_builddir)/src/testing/libgnunettesting.la \
219  $(top_builddir)/src/dht/libgnunetdht.la \
220  $(top_builddir)/src/dht/libgnunetdhtlog.la
221
222 EXTRA_DIST = \
223   $(check_SCRIPTS) \
224   test_dht_api_data.conf \
225   test_dht_api_peer1.conf \
226   test_dht_twopeer_data.conf \
227   test_dht_multipeer_data.conf
228
229 check_SCRIPTS = \
230   test_dht_tools.sh