-cleanup
[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/188JSUMKEF25GVU8TTV0PBNNN8JVCPUEDFV1UHJJU884JD25V0T0.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   libgnunetgns.la
94
95 gnunet_gns_proxy_SOURCES = \
96  gnunet-gns-proxy.c gns_proxy_proto.h 
97 gnunet_gns_proxy_LDADD = -lmicrohttpd -lcurl -lgnutls \
98   $(top_builddir)/src/gns/libgnunetgns.la \
99   $(top_builddir)/src/util/libgnunetutil.la \
100   $(GN_LIBINTL)
101 gnunet_gns_proxy_DEPENDENCIES = \
102   libgnunetgns.la
103
104 gnunet_gns_helper_service_w32_SOURCES = \
105   gnunet-gns-helper-service-w32.c
106 gnunet_gns_helper_service_w32_LDADD = \
107   $(top_builddir)/src/gns/libgnunetgns.la \
108   $(top_builddir)/src/util/libgnunetutil.la \
109   $(GN_LIBINTL)
110 gnunet_gns_helper_service_w32_DEPENDENCIES = \
111   libgnunetgns.la
112
113 w32nsp_install_SOURCES = \
114   w32nsp-install.c
115 w32nsp_install_LDADD = -lws2_32
116
117 w32nsp_uninstall_SOURCES = \
118   w32nsp-uninstall.c
119 w32nsp_uninstall_LDADD = -lws2_32
120
121 w32nsp_resolve_SOURCES = \
122   w32nsp-resolve.c
123 w32nsp_resolve_LDADD = -lws2_32
124
125 gnunet_service_gns_SOURCES = \
126  gnunet-service-gns.c \
127  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
128  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h 
129 gnunet_service_gns_LDADD = \
130   -lm \
131   $(top_builddir)/src/statistics/libgnunetstatistics.la \
132   $(top_builddir)/src/util/libgnunetutil.la \
133   libgnunetgns_common.la \
134         $(top_builddir)/src/dns/libgnunetdns.la \
135         $(top_builddir)/src/dns/libgnunetdnsparser.la \
136         $(top_builddir)/src/dht/libgnunetdht.la \
137         $(top_builddir)/src/namestore/libgnunetnamestore.la \
138         $(USE_VPN) \
139   $(GN_LIBINTL)
140 gnunet_service_gns_DEPENDENCIES = \
141   $(top_builddir)/src/statistics/libgnunetstatistics.la \
142   $(top_builddir)/src/util/libgnunetutil.la \
143   libgnunetgns_common.la \
144         $(top_builddir)/src/dns/libgnunetdns.la \
145         $(top_builddir)/src/dns/libgnunetdnsparser.la \
146         $(top_builddir)/src/dht/libgnunetdht.la \
147         $(top_builddir)/src/namestore/libgnunetnamestore.la \
148         $(USE_VPN)
149
150
151
152 gnunet_gns_fcfsd_SOURCES = \
153  gnunet-gns-fcfsd.c 
154 gnunet_gns_fcfsd_LDADD = -lmicrohttpd \
155   $(top_builddir)/src/util/libgnunetutil.la \
156   $(top_builddir)/src/namestore/libgnunetnamestore.la \
157   $(GN_LIBINTL)
158 gnunet_gns_fcfsd_DEPENDENCIES = \
159   $(top_builddir)/src/util/libgnunetutil.la \
160   $(top_builddir)/src/namestore/libgnunetnamestore.la
161
162 libw32nsp_la_SOURCES = \
163   w32nsp.c
164 libw32nsp_la_LIBADD = \
165   -lole32 -lws2_32
166 libw32nsp_la_LDFLAGS = \
167   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
168   $(GN_LIB_LDFLAGS)
169
170 libgnunetgns_la_SOURCES = \
171  gns_api.c gns.h
172 libgnunetgns_la_LIBADD = \
173  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
174  $(top_builddir)/src/namestore/libgnunetnamestore.la
175 libgnunetgns_la_LDFLAGS = \
176   $(GN_LIB_LDFLAGS)
177 libgnunetgns_la_DEPENDENCIES = \
178  $(top_builddir)/src/util/libgnunetutil.la \
179  $(top_builddir)/src/namestore/libgnunetnamestore.la
180
181
182 libgnunetgns_common_la_SOURCES = \
183  gns_common.c gns_common.h
184 libgnunetgns_common_la_LDFLAGS = \
185   $(GN_LIB_LDFLAGS)
186 libgnunetgns_common_la_LIBADD = \
187  $(top_builddir)/src/util/libgnunetutil.la 
188 libgnunetgns_common_la_DEPENDENCIES = \
189  $(top_builddir)/src/util/libgnunetutil.la 
190
191
192 libgnunet_plugin_block_gns_la_SOURCES = \
193   plugin_block_gns.c
194 libgnunet_plugin_block_gns_la_LIBADD = \
195   $(top_builddir)/src/util/libgnunetutil.la \
196   $(top_builddir)/src/block/libgnunetblock.la \
197   $(top_builddir)/src/gns/libgnunetgns_common.la \
198   $(top_builddir)/src/namestore/libgnunetnamestore.la
199 libgnunet_plugin_block_gns_la_LDFLAGS = \
200   $(GN_PLUGIN_LDFLAGS)
201 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
202   $(top_builddir)/src/util/libgnunetutil.la \
203   libgnunetgns_common.la \
204   $(top_builddir)/src/block/libgnunetblock.la \
205   $(top_builddir)/src/namestore/libgnunetnamestore.la
206
207
208 check_PROGRAMS = \
209   test_gns_simple_shorten \
210   test_gns_simple_get_authority \
211   test_gns_simple_lookup \
212   test_gns_simple_delegated_lookup \
213   test_gns_simple_mx_lookup \
214   test_gns_simple_srv_lookup \
215   test_gns_simple_zkey_lookup \
216   test_gns_dht_delegated_lookup \
217   test_gns_pseu_shorten \
218   test_gns_max_queries \
219   test_gns_cname_lookup \
220   test_gns_ns_lookup \
221   test_gns_revocation \
222   test_gns_dht_three_peers
223  #test_gns_proxy
224
225 if ENABLE_TEST_RUN
226 if LINUX
227 TESTS = $(check_PROGRAMS)
228 endif
229 endif
230
231
232 #test_gns_proxy_SOURCES = \
233 #  test_gns_proxy.c
234 #test_gns_proxy_LDADD = -lmicrohttpd @LIBCURL@ \
235 #  $(top_builddir)/src/util/libgnunetutil.la \
236 #  $(top_builddir)/src/namestore/libgnunetnamestore.la \
237 #  $(top_builddir)/src/gns/libgnunetgns.la \
238 #  $(top_builddir)/src/testing/libgnunettesting.la
239 #test_gns_proxy_DEPENDENCIES = \
240 #  $(top_builddir)/src/util/libgnunetutil.la \
241 #  $(top_builddir)/src/namestore/libgnunetnamestore.la \
242 #  libgnunetgns.la \
243 #  $(top_builddir)/src/testing/libgnunettesting.la
244
245 test_gns_dht_three_peers_SOURCES = \
246   test_gns_dht_three_peers.c
247 test_gns_dht_three_peers_LDADD = \
248   $(top_builddir)/src/util/libgnunetutil.la \
249   $(top_builddir)/src/namestore/libgnunetnamestore.la \
250   $(top_builddir)/src/gns/libgnunetgns.la \
251   $(top_builddir)/src/testing/libgnunettesting.la \
252   $(top_builddir)/src/testbed/libgnunettestbed.la
253 test_gns_dht_three_peers_DEPENDENCIES = \
254   $(top_builddir)/src/util/libgnunetutil.la \
255   $(top_builddir)/src/namestore/libgnunetnamestore.la \
256   libgnunetgns.la \
257   $(top_builddir)/src/testing/libgnunettesting.la \
258   $(top_builddir)/src/testbed/libgnunettestbed.la
259
260 test_gns_simple_lookup_SOURCES = \
261   test_gns_simple_lookup.c
262 test_gns_simple_lookup_LDADD = \
263   $(top_builddir)/src/util/libgnunetutil.la \
264   $(top_builddir)/src/namestore/libgnunetnamestore.la \
265   $(top_builddir)/src/gns/libgnunetgns.la \
266   $(top_builddir)/src/testing/libgnunettesting.la
267 test_gns_simple_lookup_DEPENDENCIES = \
268   $(top_builddir)/src/util/libgnunetutil.la \
269   $(top_builddir)/src/namestore/libgnunetnamestore.la \
270   libgnunetgns.la \
271   $(top_builddir)/src/testing/libgnunettesting.la
272
273 test_gns_simple_delegated_lookup_SOURCES = \
274   test_gns_simple_delegated_lookup.c
275 test_gns_simple_delegated_lookup_LDADD = \
276   $(top_builddir)/src/util/libgnunetutil.la \
277   $(top_builddir)/src/namestore/libgnunetnamestore.la \
278   $(top_builddir)/src/gns/libgnunetgns.la \
279   $(top_builddir)/src/testing/libgnunettesting.la
280 test_gns_simple_delegated_lookup_DEPENDENCIES = \
281   $(top_builddir)/src/util/libgnunetutil.la \
282   $(top_builddir)/src/namestore/libgnunetnamestore.la \
283   libgnunetgns.la \
284   $(top_builddir)/src/testing/libgnunettesting.la
285
286 test_gns_simple_mx_lookup_SOURCES = \
287   test_gns_simple_mx_lookup.c
288 test_gns_simple_mx_lookup_LDADD = \
289   $(top_builddir)/src/util/libgnunetutil.la \
290   $(top_builddir)/src/namestore/libgnunetnamestore.la \
291   $(top_builddir)/src/gns/libgnunetgns.la \
292   $(top_builddir)/src/testing/libgnunettesting.la
293 test_gns_simple_mx_lookup_DEPENDENCIES = \
294   $(top_builddir)/src/util/libgnunetutil.la \
295   $(top_builddir)/src/namestore/libgnunetnamestore.la \
296   libgnunetgns.la \
297   $(top_builddir)/src/testing/libgnunettesting.la
298
299 test_gns_simple_srv_lookup_SOURCES = \
300   test_gns_simple_srv_lookup.c
301 test_gns_simple_srv_lookup_LDADD = \
302   $(top_builddir)/src/util/libgnunetutil.la \
303   $(top_builddir)/src/namestore/libgnunetnamestore.la \
304   $(top_builddir)/src/gns/libgnunetgns.la \
305   $(top_builddir)/src/testing/libgnunettesting.la
306 test_gns_simple_srv_lookup_DEPENDENCIES = \
307   $(top_builddir)/src/util/libgnunetutil.la \
308   $(top_builddir)/src/namestore/libgnunetnamestore.la \
309   libgnunetgns.la \
310   $(top_builddir)/src/testing/libgnunettesting.la
311
312 test_gns_simple_zkey_lookup_SOURCES = \
313   test_gns_simple_zkey_lookup.c
314 test_gns_simple_zkey_lookup_LDADD = \
315   $(top_builddir)/src/util/libgnunetutil.la \
316   $(top_builddir)/src/namestore/libgnunetnamestore.la \
317   $(top_builddir)/src/gns/libgnunetgns.la \
318   $(top_builddir)/src/testing/libgnunettesting.la
319 test_gns_simple_zkey_lookup_DEPENDENCIES = \
320   $(top_builddir)/src/util/libgnunetutil.la \
321   $(top_builddir)/src/namestore/libgnunetnamestore.la \
322   libgnunetgns.la \
323   $(top_builddir)/src/testing/libgnunettesting.la
324
325 test_gns_dht_delegated_lookup_SOURCES = \
326   test_gns_dht_delegated_lookup.c
327 test_gns_dht_delegated_lookup_LDADD = \
328   $(top_builddir)/src/util/libgnunetutil.la \
329   $(top_builddir)/src/namestore/libgnunetnamestore.la \
330   $(top_builddir)/src/dht/libgnunetdht.la \
331   $(top_builddir)/src/gns/libgnunetgns.la \
332   $(top_builddir)/src/testing/libgnunettesting.la
333 test_gns_dht_delegated_lookup_DEPENDENCIES = \
334   $(top_builddir)/src/util/libgnunetutil.la \
335   $(top_builddir)/src/namestore/libgnunetnamestore.la \
336   $(top_builddir)/src/dht/libgnunetdht.la \
337   libgnunetgns.la \
338   $(top_builddir)/src/testing/libgnunettesting.la
339
340 test_gns_simple_shorten_SOURCES = \
341   test_gns_simple_shorten.c
342 test_gns_simple_shorten_LDADD = \
343   $(top_builddir)/src/util/libgnunetutil.la \
344   $(top_builddir)/src/namestore/libgnunetnamestore.la \
345   $(top_builddir)/src/gns/libgnunetgns.la \
346   $(top_builddir)/src/testing/libgnunettesting.la
347 test_gns_simple_shorten_DEPENDENCIES = \
348   $(top_builddir)/src/util/libgnunetutil.la \
349   $(top_builddir)/src/namestore/libgnunetnamestore.la \
350   libgnunetgns.la \
351   $(top_builddir)/src/testing/libgnunettesting.la
352
353 test_gns_simple_get_authority_SOURCES = \
354   test_gns_simple_get_authority.c
355 test_gns_simple_get_authority_LDADD = \
356   $(top_builddir)/src/util/libgnunetutil.la \
357   $(top_builddir)/src/namestore/libgnunetnamestore.la \
358   $(top_builddir)/src/gns/libgnunetgns.la \
359   $(top_builddir)/src/testing/libgnunettesting.la
360 test_gns_simple_get_authority_DEPENDENCIES = \
361   $(top_builddir)/src/util/libgnunetutil.la \
362   $(top_builddir)/src/namestore/libgnunetnamestore.la \
363   libgnunetgns.la \
364   $(top_builddir)/src/testing/libgnunettesting.la
365
366
367 test_gns_pseu_shorten_SOURCES = \
368   test_gns_pseu_shorten.c
369 test_gns_pseu_shorten_LDADD = \
370   $(top_builddir)/src/util/libgnunetutil.la \
371   $(top_builddir)/src/namestore/libgnunetnamestore.la \
372   $(top_builddir)/src/dht/libgnunetdht.la \
373   $(top_builddir)/src/gns/libgnunetgns.la \
374   $(top_builddir)/src/testing/libgnunettesting.la
375 test_gns_pseu_shorten_DEPENDENCIES = \
376   $(top_builddir)/src/util/libgnunetutil.la \
377   $(top_builddir)/src/namestore/libgnunetnamestore.la \
378   $(top_builddir)/src/dht/libgnunetdht.la \
379   libgnunetgns.la \
380   $(top_builddir)/src/testing/libgnunettesting.la
381
382
383 test_gns_max_queries_SOURCES = \
384   test_gns_max_queries.c
385 test_gns_max_queries_LDADD = \
386   $(top_builddir)/src/util/libgnunetutil.la \
387   $(top_builddir)/src/namestore/libgnunetnamestore.la \
388   $(top_builddir)/src/gns/libgnunetgns.la \
389   $(top_builddir)/src/testing/libgnunettesting.la
390 test_gns_max_queries_DEPENDENCIES = \
391   $(top_builddir)/src/util/libgnunetutil.la \
392   $(top_builddir)/src/namestore/libgnunetnamestore.la \
393   libgnunetgns.la \
394   $(top_builddir)/src/testing/libgnunettesting.la
395
396 test_gns_cname_lookup_SOURCES = \
397   test_gns_cname_lookup.c
398 test_gns_cname_lookup_LDADD = \
399   $(top_builddir)/src/util/libgnunetutil.la \
400   $(top_builddir)/src/namestore/libgnunetnamestore.la \
401   $(top_builddir)/src/gns/libgnunetgns.la \
402   $(top_builddir)/src/testing/libgnunettesting.la
403 test_gns_cname_lookup_DEPENDENCIES = \
404   $(top_builddir)/src/util/libgnunetutil.la \
405   $(top_builddir)/src/namestore/libgnunetnamestore.la \
406   libgnunetgns.la \
407   $(top_builddir)/src/testing/libgnunettesting.la
408
409
410 test_gns_ns_lookup_SOURCES = \
411   test_gns_ns_lookup.c
412 test_gns_ns_lookup_LDADD = \
413   $(top_builddir)/src/util/libgnunetutil.la \
414   $(top_builddir)/src/namestore/libgnunetnamestore.la \
415   $(top_builddir)/src/gns/libgnunetgns.la \
416   $(top_builddir)/src/testing/libgnunettesting.la
417 test_gns_ns_lookup_DEPENDENCIES = \
418   $(top_builddir)/src/util/libgnunetutil.la \
419   $(top_builddir)/src/namestore/libgnunetnamestore.la \
420   libgnunetgns.la \
421   $(top_builddir)/src/testing/libgnunettesting.la
422
423
424 test_gns_revocation_SOURCES = \
425   test_gns_revocation.c
426 test_gns_revocation_LDADD = \
427   $(top_builddir)/src/util/libgnunetutil.la \
428   $(top_builddir)/src/namestore/libgnunetnamestore.la \
429   $(top_builddir)/src/gns/libgnunetgns.la \
430   $(top_builddir)/src/testing/libgnunettesting.la
431 test_gns_revocation_DEPENDENCIES = \
432   $(top_builddir)/src/util/libgnunetutil.la \
433   $(top_builddir)/src/namestore/libgnunetnamestore.la \
434   libgnunetgns.la \
435   $(top_builddir)/src/testing/libgnunettesting.la
436
437
438
439 #Build stub api
440 #libgnunetnamestore_la_SOURCES = \
441 # namestore_stub_api.c
442 #libgnunetnamestore_la_LIBADD = \
443 # $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
444 #libgnunetnamestore_la_LDFLAGS = \
445 #  $(GN_LIB_LDFLAGS)
446 #libgnunetnamestore_la_DEPENDENCIES = \
447 # $(top_builddir)/src/util/libgnunetutil.la
448
449
450