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