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