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