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