-dead code elimination
[oweals/gnunet.git] / src / gns / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 if HAVE_GLIBCNSS
4 NSS_SUBDIR = nss
5 endif
6
7 SUBDIRS = . $(NSS_SUBDIR)
8
9 EXTRA_DIST = \
10   test_gns_defaults.conf \
11   test_gns_simple_lookup.conf \
12   test_gns_dht_default.conf \
13   gns-helper-service-w32.conf \
14   gnunet-gns-proxy-setup-ca \
15   zonefiles/J7POEUT41A8PBFS7KVVDRF88GBOU4HK8PSU5QKVLVE3R9T91E99G.zkey \
16   zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \
17   zonefiles/test_zonekey
18
19 if MINGW
20   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
21   DO_W32_HELPER = gnunet-gns-helper-service-w32
22   DO_W32_NSP = libw32nsp.la
23   DO_W32_NSPTOOLS = w32nsp-install w32nsp-uninstall w32nsp-resolve
24   DO_W32_HS_CONF = gns-helper-service-w32.conf
25 else
26   USE_VPN = $(top_builddir)/src/vpn/libgnunetvpn.la
27 endif
28
29 if USE_COVERAGE
30   AM_CFLAGS = --coverage -O0
31 endif
32
33 pkgcfgdir = $(pkgdatadir)/config.d/
34
35 libexecdir= $(pkglibdir)/libexec/
36
37 plugindir = $(libdir)/gnunet
38
39 pkgcfg_DATA = \
40   gns.conf \
41   $(DO_W32_HS_CONF)
42
43 lib_LTLIBRARIES = \
44   $(DO_W32_NSP) \
45   libgnunetgns.la \
46   libgnunetgns_common.la
47
48
49 if HAVE_MHD
50  DO_FCFSD=gnunet-gns-fcfsd
51 if HAVE_GNUTLS
52 if HAVE_LIBCURL
53  DO_PROXY=gnunet-gns-proxy
54 endif
55 endif
56 endif
57
58 libexec_PROGRAMS = \
59   gnunet-service-gns $(DO_FCFSD) \
60   $(DO_PROXY) \
61   $(DO_W32_HELPER) \
62   gnunet-dns2gns
63
64 bin_PROGRAMS = \
65   $(DO_W32_NSPTOOLS) \
66   gnunet-gns 
67
68 bin_SCRIPTS = gnunet-gns-proxy-setup-ca
69
70 plugin_LTLIBRARIES = \
71   libgnunet_plugin_block_gns.la
72
73 gnunet_gns_SOURCES = \
74  gnunet-gns.c
75 gnunet_gns_LDADD = \
76   $(top_builddir)/src/gns/libgnunetgns.la \
77   $(top_builddir)/src/util/libgnunetutil.la \
78   $(top_builddir)/src/namestore/libgnunetnamestore.la \
79   $(GN_LIBINTL)
80 gnunet_gns_DEPENDENCIES = \
81   libgnunetgns.la
82
83 gnunet_dns2gns_SOURCES = \
84  gnunet-dns2gns.c
85 gnunet_dns2gns_LDADD = \
86   $(top_builddir)/src/gns/libgnunetgns.la \
87   $(top_builddir)/src/util/libgnunetutil.la \
88   $(top_builddir)/src/namestore/libgnunetnamestore.la \
89   $(top_builddir)/src/dns/libgnunetdnsparser.la \
90   $(top_builddir)/src/dns/libgnunetdnsstub.la \
91   $(GN_LIBINTL)
92 gnunet_dns2gns_DEPENDENCIES = \
93   $(top_builddir)/src/util/libgnunetutil.la \
94   $(top_builddir)/src/namestore/libgnunetnamestore.la \
95   $(top_builddir)/src/dns/libgnunetdnsparser.la \
96   $(top_builddir)/src/dns/libgnunetdnsstub.la \
97   libgnunetgns.la
98
99 gnunet_gns_proxy_SOURCES = \
100  gnunet-gns-proxy.c gns_proxy_proto.h 
101 gnunet_gns_proxy_LDADD = -lmicrohttpd -lcurl -lgnutls \
102   $(top_builddir)/src/gns/libgnunetgns.la \
103   $(top_builddir)/src/util/libgnunetutil.la \
104   $(GN_LIBINTL)
105 gnunet_gns_proxy_DEPENDENCIES = \
106   libgnunetgns.la
107
108 gnunet_gns_helper_service_w32_SOURCES = \
109   gnunet-gns-helper-service-w32.c
110 gnunet_gns_helper_service_w32_LDADD = \
111   $(top_builddir)/src/gns/libgnunetgns.la \
112   $(top_builddir)/src/util/libgnunetutil.la \
113   $(GN_LIBINTL)
114 gnunet_gns_helper_service_w32_DEPENDENCIES = \
115   libgnunetgns.la
116
117 w32nsp_install_SOURCES = \
118   w32nsp-install.c
119 w32nsp_install_LDADD = -lws2_32
120
121 w32nsp_uninstall_SOURCES = \
122   w32nsp-uninstall.c
123 w32nsp_uninstall_LDADD = -lws2_32
124
125 w32nsp_resolve_SOURCES = \
126   w32nsp-resolve.c
127 w32nsp_resolve_LDADD = -lws2_32
128
129 gnunet_service_gns_SOURCES = \
130  gnunet-service-gns.c \
131  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
132  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h 
133 gnunet_service_gns_LDADD = \
134   -lm \
135   $(top_builddir)/src/statistics/libgnunetstatistics.la \
136   $(top_builddir)/src/util/libgnunetutil.la \
137   libgnunetgns_common.la \
138   $(top_builddir)/src/dns/libgnunetdns.la \
139   $(top_builddir)/src/dns/libgnunetdnsparser.la \
140   $(top_builddir)/src/dns/libgnunetdnsstub.la \
141   $(top_builddir)/src/dht/libgnunetdht.la \
142   $(top_builddir)/src/namestore/libgnunetnamestore.la \
143   $(USE_VPN) \
144   $(GN_LIBINTL)
145 gnunet_service_gns_DEPENDENCIES = \
146   $(top_builddir)/src/statistics/libgnunetstatistics.la \
147   $(top_builddir)/src/util/libgnunetutil.la \
148   libgnunetgns_common.la \
149   $(top_builddir)/src/dns/libgnunetdns.la \
150   $(top_builddir)/src/dns/libgnunetdnsparser.la \
151   $(top_builddir)/src/dht/libgnunetdht.la \
152   $(top_builddir)/src/namestore/libgnunetnamestore.la \
153   $(USE_VPN)
154
155
156
157 gnunet_gns_fcfsd_SOURCES = \
158  gnunet-gns-fcfsd.c 
159 gnunet_gns_fcfsd_LDADD = -lmicrohttpd \
160   $(top_builddir)/src/util/libgnunetutil.la \
161   $(top_builddir)/src/namestore/libgnunetnamestore.la \
162   $(GN_LIBINTL)
163 gnunet_gns_fcfsd_DEPENDENCIES = \
164   $(top_builddir)/src/util/libgnunetutil.la \
165   $(top_builddir)/src/namestore/libgnunetnamestore.la
166
167 libw32nsp_la_SOURCES = \
168   w32nsp.c
169 libw32nsp_la_LIBADD = \
170   -lole32 -lws2_32
171 libw32nsp_la_LDFLAGS = \
172   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
173   $(GN_LIB_LDFLAGS)
174
175 libgnunetgns_la_SOURCES = \
176  gns_api.c gns.h
177 libgnunetgns_la_LIBADD = \
178  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
179  $(top_builddir)/src/namestore/libgnunetnamestore.la
180 libgnunetgns_la_LDFLAGS = \
181   $(GN_LIB_LDFLAGS)
182 libgnunetgns_la_DEPENDENCIES = \
183  $(top_builddir)/src/util/libgnunetutil.la \
184  $(top_builddir)/src/namestore/libgnunetnamestore.la
185
186
187 libgnunetgns_common_la_SOURCES = \
188  gns_common.c gns_common.h
189 libgnunetgns_common_la_LDFLAGS = \
190   $(GN_LIB_LDFLAGS)
191 libgnunetgns_common_la_LIBADD = \
192  $(top_builddir)/src/util/libgnunetutil.la 
193 libgnunetgns_common_la_DEPENDENCIES = \
194  $(top_builddir)/src/util/libgnunetutil.la 
195
196
197 libgnunet_plugin_block_gns_la_SOURCES = \
198   plugin_block_gns.c
199 libgnunet_plugin_block_gns_la_LIBADD = \
200   $(top_builddir)/src/util/libgnunetutil.la \
201   $(top_builddir)/src/block/libgnunetblock.la \
202   $(top_builddir)/src/gns/libgnunetgns_common.la \
203   $(top_builddir)/src/namestore/libgnunetnamestore.la
204 libgnunet_plugin_block_gns_la_LDFLAGS = \
205   $(GN_PLUGIN_LDFLAGS)
206 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
207   $(top_builddir)/src/util/libgnunetutil.la \
208   libgnunetgns_common.la \
209   $(top_builddir)/src/block/libgnunetblock.la \
210   $(top_builddir)/src/namestore/libgnunetnamestore.la
211
212 if HAVE_TESTING
213 check_PROGRAMS = \
214   test_gns_simple_shorten \
215   test_gns_simple_lookup \
216   test_gns_simple_delegated_lookup \
217   test_gns_simple_mx_lookup \
218   test_gns_simple_srv_lookup \
219   test_gns_simple_zkey_lookup \
220   test_gns_dht_delegated_lookup \
221   test_gns_pseu_shorten \
222   test_gns_max_queries \
223   test_gns_cname_lookup \
224   test_gns_ns_lookup \
225   test_gns_revocation \
226   test_gns_dht_three_peers
227  #test_gns_proxy
228 endif
229
230 if ENABLE_TEST_RUN
231 if LINUX
232 if HAVE_SQLITE
233 TESTS = $(check_PROGRAMS)
234 endif
235 endif
236 endif
237
238
239 #test_gns_proxy_SOURCES = \
240 #  test_gns_proxy.c
241 #test_gns_proxy_LDADD = -lmicrohttpd @LIBCURL@ \
242 #  $(top_builddir)/src/util/libgnunetutil.la \
243 #  $(top_builddir)/src/namestore/libgnunetnamestore.la \
244 #  $(top_builddir)/src/gns/libgnunetgns.la \
245 #  $(top_builddir)/src/testing/libgnunettesting.la
246 #test_gns_proxy_DEPENDENCIES = \
247 #  $(top_builddir)/src/util/libgnunetutil.la \
248 #  $(top_builddir)/src/namestore/libgnunetnamestore.la \
249 #  libgnunetgns.la \
250 #  $(top_builddir)/src/testing/libgnunettesting.la
251
252 test_gns_dht_three_peers_SOURCES = \
253   test_gns_dht_three_peers.c
254 test_gns_dht_three_peers_LDADD = \
255   $(top_builddir)/src/util/libgnunetutil.la \
256   $(top_builddir)/src/namestore/libgnunetnamestore.la \
257   $(top_builddir)/src/gns/libgnunetgns.la \
258   $(top_builddir)/src/testing/libgnunettesting.la \
259   $(top_builddir)/src/testbed/libgnunettestbed.la
260 test_gns_dht_three_peers_DEPENDENCIES = \
261   $(top_builddir)/src/util/libgnunetutil.la \
262   $(top_builddir)/src/namestore/libgnunetnamestore.la \
263   libgnunetgns.la \
264   $(top_builddir)/src/testing/libgnunettesting.la \
265   $(top_builddir)/src/testbed/libgnunettestbed.la
266
267 test_gns_simple_lookup_SOURCES = \
268   test_gns_simple_lookup.c
269 test_gns_simple_lookup_LDADD = \
270   $(top_builddir)/src/util/libgnunetutil.la \
271   $(top_builddir)/src/namestore/libgnunetnamestore.la \
272   $(top_builddir)/src/gns/libgnunetgns.la \
273   $(top_builddir)/src/testing/libgnunettesting.la
274 test_gns_simple_lookup_DEPENDENCIES = \
275   $(top_builddir)/src/util/libgnunetutil.la \
276   $(top_builddir)/src/namestore/libgnunetnamestore.la \
277   libgnunetgns.la \
278   $(top_builddir)/src/testing/libgnunettesting.la
279
280 test_gns_simple_delegated_lookup_SOURCES = \
281   test_gns_simple_delegated_lookup.c
282 test_gns_simple_delegated_lookup_LDADD = \
283   $(top_builddir)/src/util/libgnunetutil.la \
284   $(top_builddir)/src/namestore/libgnunetnamestore.la \
285   $(top_builddir)/src/gns/libgnunetgns.la \
286   $(top_builddir)/src/testing/libgnunettesting.la
287 test_gns_simple_delegated_lookup_DEPENDENCIES = \
288   $(top_builddir)/src/util/libgnunetutil.la \
289   $(top_builddir)/src/namestore/libgnunetnamestore.la \
290   libgnunetgns.la \
291   $(top_builddir)/src/testing/libgnunettesting.la
292
293 test_gns_simple_mx_lookup_SOURCES = \
294   test_gns_simple_mx_lookup.c
295 test_gns_simple_mx_lookup_LDADD = \
296   $(top_builddir)/src/util/libgnunetutil.la \
297   $(top_builddir)/src/namestore/libgnunetnamestore.la \
298   $(top_builddir)/src/gns/libgnunetgns.la \
299   $(top_builddir)/src/testing/libgnunettesting.la
300 test_gns_simple_mx_lookup_DEPENDENCIES = \
301   $(top_builddir)/src/util/libgnunetutil.la \
302   $(top_builddir)/src/namestore/libgnunetnamestore.la \
303   libgnunetgns.la \
304   $(top_builddir)/src/testing/libgnunettesting.la
305
306 test_gns_simple_srv_lookup_SOURCES = \
307   test_gns_simple_srv_lookup.c
308 test_gns_simple_srv_lookup_LDADD = \
309   $(top_builddir)/src/util/libgnunetutil.la \
310   $(top_builddir)/src/namestore/libgnunetnamestore.la \
311   $(top_builddir)/src/gns/libgnunetgns.la \
312   $(top_builddir)/src/testing/libgnunettesting.la
313 test_gns_simple_srv_lookup_DEPENDENCIES = \
314   $(top_builddir)/src/util/libgnunetutil.la \
315   $(top_builddir)/src/namestore/libgnunetnamestore.la \
316   libgnunetgns.la \
317   $(top_builddir)/src/testing/libgnunettesting.la
318
319 test_gns_simple_zkey_lookup_SOURCES = \
320   test_gns_simple_zkey_lookup.c
321 test_gns_simple_zkey_lookup_LDADD = \
322   $(top_builddir)/src/util/libgnunetutil.la \
323   $(top_builddir)/src/namestore/libgnunetnamestore.la \
324   $(top_builddir)/src/gns/libgnunetgns.la \
325   $(top_builddir)/src/testing/libgnunettesting.la
326 test_gns_simple_zkey_lookup_DEPENDENCIES = \
327   $(top_builddir)/src/util/libgnunetutil.la \
328   $(top_builddir)/src/namestore/libgnunetnamestore.la \
329   libgnunetgns.la \
330   $(top_builddir)/src/testing/libgnunettesting.la
331
332 test_gns_dht_delegated_lookup_SOURCES = \
333   test_gns_dht_delegated_lookup.c
334 test_gns_dht_delegated_lookup_LDADD = \
335   $(top_builddir)/src/util/libgnunetutil.la \
336   $(top_builddir)/src/namestore/libgnunetnamestore.la \
337   $(top_builddir)/src/dht/libgnunetdht.la \
338   $(top_builddir)/src/gns/libgnunetgns.la \
339   $(top_builddir)/src/testing/libgnunettesting.la
340 test_gns_dht_delegated_lookup_DEPENDENCIES = \
341   $(top_builddir)/src/util/libgnunetutil.la \
342   $(top_builddir)/src/namestore/libgnunetnamestore.la \
343   $(top_builddir)/src/dht/libgnunetdht.la \
344   libgnunetgns.la \
345   $(top_builddir)/src/testing/libgnunettesting.la
346
347 test_gns_simple_shorten_SOURCES = \
348   test_gns_simple_shorten.c
349 test_gns_simple_shorten_LDADD = \
350   $(top_builddir)/src/util/libgnunetutil.la \
351   $(top_builddir)/src/namestore/libgnunetnamestore.la \
352   $(top_builddir)/src/gns/libgnunetgns.la \
353   $(top_builddir)/src/testing/libgnunettesting.la
354 test_gns_simple_shorten_DEPENDENCIES = \
355   $(top_builddir)/src/util/libgnunetutil.la \
356   $(top_builddir)/src/namestore/libgnunetnamestore.la \
357   libgnunetgns.la \
358   $(top_builddir)/src/testing/libgnunettesting.la
359
360
361 test_gns_pseu_shorten_SOURCES = \
362   test_gns_pseu_shorten.c
363 test_gns_pseu_shorten_LDADD = \
364   $(top_builddir)/src/util/libgnunetutil.la \
365   $(top_builddir)/src/namestore/libgnunetnamestore.la \
366   $(top_builddir)/src/dht/libgnunetdht.la \
367   $(top_builddir)/src/gns/libgnunetgns.la \
368   $(top_builddir)/src/testing/libgnunettesting.la
369 test_gns_pseu_shorten_DEPENDENCIES = \
370   $(top_builddir)/src/util/libgnunetutil.la \
371   $(top_builddir)/src/namestore/libgnunetnamestore.la \
372   $(top_builddir)/src/dht/libgnunetdht.la \
373   libgnunetgns.la \
374   $(top_builddir)/src/testing/libgnunettesting.la
375
376
377 test_gns_max_queries_SOURCES = \
378   test_gns_max_queries.c
379 test_gns_max_queries_LDADD = \
380   $(top_builddir)/src/util/libgnunetutil.la \
381   $(top_builddir)/src/namestore/libgnunetnamestore.la \
382   $(top_builddir)/src/gns/libgnunetgns.la \
383   $(top_builddir)/src/testing/libgnunettesting.la
384 test_gns_max_queries_DEPENDENCIES = \
385   $(top_builddir)/src/util/libgnunetutil.la \
386   $(top_builddir)/src/namestore/libgnunetnamestore.la \
387   libgnunetgns.la \
388   $(top_builddir)/src/testing/libgnunettesting.la
389
390 test_gns_cname_lookup_SOURCES = \
391   test_gns_cname_lookup.c
392 test_gns_cname_lookup_LDADD = \
393   $(top_builddir)/src/util/libgnunetutil.la \
394   $(top_builddir)/src/namestore/libgnunetnamestore.la \
395   $(top_builddir)/src/gns/libgnunetgns.la \
396   $(top_builddir)/src/testing/libgnunettesting.la
397 test_gns_cname_lookup_DEPENDENCIES = \
398   $(top_builddir)/src/util/libgnunetutil.la \
399   $(top_builddir)/src/namestore/libgnunetnamestore.la \
400   libgnunetgns.la \
401   $(top_builddir)/src/testing/libgnunettesting.la
402
403
404 test_gns_ns_lookup_SOURCES = \
405   test_gns_ns_lookup.c
406 test_gns_ns_lookup_LDADD = \
407   $(top_builddir)/src/util/libgnunetutil.la \
408   $(top_builddir)/src/namestore/libgnunetnamestore.la \
409   $(top_builddir)/src/gns/libgnunetgns.la \
410   $(top_builddir)/src/testing/libgnunettesting.la
411 test_gns_ns_lookup_DEPENDENCIES = \
412   $(top_builddir)/src/util/libgnunetutil.la \
413   $(top_builddir)/src/namestore/libgnunetnamestore.la \
414   libgnunetgns.la \
415   $(top_builddir)/src/testing/libgnunettesting.la
416
417
418 test_gns_revocation_SOURCES = \
419   test_gns_revocation.c
420 test_gns_revocation_LDADD = \
421   $(top_builddir)/src/util/libgnunetutil.la \
422   $(top_builddir)/src/namestore/libgnunetnamestore.la \
423   $(top_builddir)/src/gns/libgnunetgns.la \
424   $(top_builddir)/src/testing/libgnunettesting.la
425 test_gns_revocation_DEPENDENCIES = \
426   $(top_builddir)/src/util/libgnunetutil.la \
427   $(top_builddir)/src/namestore/libgnunetnamestore.la \
428   libgnunetgns.la \
429   $(top_builddir)/src/testing/libgnunettesting.la
430
431
432
433 #Build stub api
434 #libgnunetnamestore_la_SOURCES = \
435 # namestore_stub_api.c
436 #libgnunetnamestore_la_LIBADD = \
437 # $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
438 #libgnunetnamestore_la_LDFLAGS = \
439 #  $(GN_LIB_LDFLAGS)
440 #libgnunetnamestore_la_DEPENDENCIES = \
441 # $(top_builddir)/src/util/libgnunetutil.la
442
443
444