- replace deprecated INCLUDES with AM_CPPFLAGS
[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 # 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/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 gns_proxy_proto.h 
105 #gnunet_gns_proxy_LDADD = -lmicrohttpd -lcurl -lgnutls \
106 #  $(top_builddir)/src/gns/libgnunetgns.la \
107 #  $(top_builddir)/src/util/libgnunetutil.la \
108 #  $(GN_LIBINTL)
109 #gnunet_gns_proxy_DEPENDENCIES = \
110 #  libgnunetgns.la
111
112 gnunet_gns_helper_service_w32_SOURCES = \
113   gnunet-gns-helper-service-w32.c
114 gnunet_gns_helper_service_w32_LDADD = \
115   $(top_builddir)/src/gns/libgnunetgns.la \
116   $(top_builddir)/src/util/libgnunetutil.la \
117   $(GN_LIBINTL)
118 gnunet_gns_helper_service_w32_DEPENDENCIES = \
119   libgnunetgns.la
120
121 w32nsp_install_SOURCES = \
122   w32nsp-install.c
123 w32nsp_install_LDADD = -lws2_32
124
125 w32nsp_uninstall_SOURCES = \
126   w32nsp-uninstall.c
127 w32nsp_uninstall_LDADD = -lws2_32
128
129 w32nsp_resolve_SOURCES = \
130   w32nsp-resolve.c
131 w32nsp_resolve_LDADD = -lws2_32
132
133 gnunet_service_gns_SOURCES = \
134  gnunet-service-gns.c \
135  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
136  gnunet-service-gns_shorten.c gnunet-service-gns_shorten.h \
137  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h 
138 gnunet_service_gns_LDADD = \
139   -lm \
140   $(top_builddir)/src/statistics/libgnunetstatistics.la \
141   $(top_builddir)/src/util/libgnunetutil.la \
142   $(top_builddir)/src/dns/libgnunetdns.la \
143   $(top_builddir)/src/dns/libgnunetdnsparser.la \
144   $(top_builddir)/src/dns/libgnunetdnsstub.la \
145   $(top_builddir)/src/dht/libgnunetdht.la \
146   $(top_builddir)/src/namestore/libgnunetnamestore.la \
147   $(USE_VPN) \
148   $(GN_LIBINTL)
149 gnunet_service_gns_DEPENDENCIES = \
150   $(top_builddir)/src/statistics/libgnunetstatistics.la \
151   $(top_builddir)/src/util/libgnunetutil.la \
152   $(top_builddir)/src/dns/libgnunetdns.la \
153   $(top_builddir)/src/dns/libgnunetdnsparser.la \
154   $(top_builddir)/src/dht/libgnunetdht.la \
155   $(top_builddir)/src/namestore/libgnunetnamestore.la \
156   $(USE_VPN)
157
158
159
160 libw32nsp_la_SOURCES = \
161   w32nsp.c
162 libw32nsp_la_LIBADD = \
163   -lole32 -lws2_32
164 libw32nsp_la_LDFLAGS = \
165   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
166   $(GN_LIB_LDFLAGS)
167
168 libgnunetgns_la_SOURCES = \
169  gns_api.c gns.h
170 libgnunetgns_la_LIBADD = \
171  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
172  $(top_builddir)/src/namestore/libgnunetnamestore.la
173 libgnunetgns_la_LDFLAGS = \
174   $(GN_LIB_LDFLAGS)
175 libgnunetgns_la_DEPENDENCIES = \
176  $(top_builddir)/src/util/libgnunetutil.la \
177  $(top_builddir)/src/namestore/libgnunetnamestore.la
178
179
180 libgnunet_plugin_block_gns_la_SOURCES = \
181   plugin_block_gns.c
182 libgnunet_plugin_block_gns_la_LIBADD = \
183   $(top_builddir)/src/util/libgnunetutil.la \
184   $(top_builddir)/src/block/libgnunetblock.la \
185   $(top_builddir)/src/namestore/libgnunetnamestore.la
186 libgnunet_plugin_block_gns_la_LDFLAGS = \
187   $(GN_PLUGIN_LDFLAGS)
188 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
189   $(top_builddir)/src/util/libgnunetutil.la \
190   $(top_builddir)/src/block/libgnunetblock.la \
191   $(top_builddir)/src/namestore/libgnunetnamestore.la
192
193 if HAVE_TESTING
194 #check_PROGRAMS = 
195 #  test_gns_simple_shorten 
196 #  test_gns_simple_lookup 
197 #  test_gns_simple_delegated_lookup 
198 #  test_gns_simple_mx_lookup 
199 #  test_gns_simple_srv_lookup 
200 #  test_gns_simple_zkey_lookup 
201 #  test_gns_dht_delegated_lookup 
202 #  test_gns_pseu_shorten 
203 #  test_gns_max_queries 
204 #  test_gns_cname_lookup 
205 #  test_gns_ns_lookup 
206 #  test_gns_revocation 
207 #  test_gns_dht_three_peers
208 # test_gns_proxy
209 endif
210
211 if ENABLE_TEST_RUN
212 if LINUX
213 if HAVE_SQLITE
214 # TESTS = $(check_PROGRAMS)
215 endif
216 endif
217 endif
218
219
220 #test_gns_proxy_SOURCES = \
221 #  test_gns_proxy.c
222 #test_gns_proxy_LDADD = -lmicrohttpd @LIBCURL@ \
223 #  $(top_builddir)/src/util/libgnunetutil.la \
224 #  $(top_builddir)/src/namestore/libgnunetnamestore.la \
225 #  $(top_builddir)/src/gns/libgnunetgns.la \
226 #  $(top_builddir)/src/testing/libgnunettesting.la
227 #test_gns_proxy_DEPENDENCIES = \
228 #  $(top_builddir)/src/util/libgnunetutil.la \
229 #  $(top_builddir)/src/namestore/libgnunetnamestore.la \
230 #  libgnunetgns.la \
231 #  $(top_builddir)/src/testing/libgnunettesting.la
232
233 test_gns_dht_three_peers_SOURCES = \
234   test_gns_dht_three_peers.c
235 test_gns_dht_three_peers_LDADD = \
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   $(top_builddir)/src/testbed/libgnunettestbed.la
241 test_gns_dht_three_peers_DEPENDENCIES = \
242   $(top_builddir)/src/util/libgnunetutil.la \
243   $(top_builddir)/src/namestore/libgnunetnamestore.la \
244   libgnunetgns.la \
245   $(top_builddir)/src/testing/libgnunettesting.la \
246   $(top_builddir)/src/testbed/libgnunettestbed.la
247
248 test_gns_simple_lookup_SOURCES = \
249   test_gns_simple_lookup.c
250 test_gns_simple_lookup_LDADD = \
251   $(top_builddir)/src/util/libgnunetutil.la \
252   $(top_builddir)/src/namestore/libgnunetnamestore.la \
253   $(top_builddir)/src/gns/libgnunetgns.la \
254   $(top_builddir)/src/testing/libgnunettesting.la
255 test_gns_simple_lookup_DEPENDENCIES = \
256   $(top_builddir)/src/util/libgnunetutil.la \
257   $(top_builddir)/src/namestore/libgnunetnamestore.la \
258   libgnunetgns.la \
259   $(top_builddir)/src/testing/libgnunettesting.la
260
261 test_gns_simple_delegated_lookup_SOURCES = \
262   test_gns_simple_delegated_lookup.c
263 test_gns_simple_delegated_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_delegated_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_mx_lookup_SOURCES = \
275   test_gns_simple_mx_lookup.c
276 test_gns_simple_mx_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_mx_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_srv_lookup_SOURCES = \
288   test_gns_simple_srv_lookup.c
289 test_gns_simple_srv_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_srv_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_zkey_lookup_SOURCES = \
301   test_gns_simple_zkey_lookup.c
302 test_gns_simple_zkey_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_zkey_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_dht_delegated_lookup_SOURCES = \
314   test_gns_dht_delegated_lookup.c
315 test_gns_dht_delegated_lookup_LDADD = \
316   $(top_builddir)/src/util/libgnunetutil.la \
317   $(top_builddir)/src/namestore/libgnunetnamestore.la \
318   $(top_builddir)/src/dht/libgnunetdht.la \
319   $(top_builddir)/src/gns/libgnunetgns.la \
320   $(top_builddir)/src/testing/libgnunettesting.la
321 test_gns_dht_delegated_lookup_DEPENDENCIES = \
322   $(top_builddir)/src/util/libgnunetutil.la \
323   $(top_builddir)/src/namestore/libgnunetnamestore.la \
324   $(top_builddir)/src/dht/libgnunetdht.la \
325   libgnunetgns.la \
326   $(top_builddir)/src/testing/libgnunettesting.la
327
328 test_gns_simple_shorten_SOURCES = \
329   test_gns_simple_shorten.c
330 test_gns_simple_shorten_LDADD = \
331   $(top_builddir)/src/util/libgnunetutil.la \
332   $(top_builddir)/src/namestore/libgnunetnamestore.la \
333   $(top_builddir)/src/gns/libgnunetgns.la \
334   $(top_builddir)/src/testing/libgnunettesting.la
335 test_gns_simple_shorten_DEPENDENCIES = \
336   $(top_builddir)/src/util/libgnunetutil.la \
337   $(top_builddir)/src/namestore/libgnunetnamestore.la \
338   libgnunetgns.la \
339   $(top_builddir)/src/testing/libgnunettesting.la
340
341
342 test_gns_pseu_shorten_SOURCES = \
343   test_gns_pseu_shorten.c
344 test_gns_pseu_shorten_LDADD = \
345   $(top_builddir)/src/util/libgnunetutil.la \
346   $(top_builddir)/src/namestore/libgnunetnamestore.la \
347   $(top_builddir)/src/dht/libgnunetdht.la \
348   $(top_builddir)/src/gns/libgnunetgns.la \
349   $(top_builddir)/src/testing/libgnunettesting.la
350 test_gns_pseu_shorten_DEPENDENCIES = \
351   $(top_builddir)/src/util/libgnunetutil.la \
352   $(top_builddir)/src/namestore/libgnunetnamestore.la \
353   $(top_builddir)/src/dht/libgnunetdht.la \
354   libgnunetgns.la \
355   $(top_builddir)/src/testing/libgnunettesting.la
356
357
358 test_gns_max_queries_SOURCES = \
359   test_gns_max_queries.c
360 test_gns_max_queries_LDADD = \
361   $(top_builddir)/src/util/libgnunetutil.la \
362   $(top_builddir)/src/namestore/libgnunetnamestore.la \
363   $(top_builddir)/src/gns/libgnunetgns.la \
364   $(top_builddir)/src/testing/libgnunettesting.la
365 test_gns_max_queries_DEPENDENCIES = \
366   $(top_builddir)/src/util/libgnunetutil.la \
367   $(top_builddir)/src/namestore/libgnunetnamestore.la \
368   libgnunetgns.la \
369   $(top_builddir)/src/testing/libgnunettesting.la
370
371 test_gns_cname_lookup_SOURCES = \
372   test_gns_cname_lookup.c
373 test_gns_cname_lookup_LDADD = \
374   $(top_builddir)/src/util/libgnunetutil.la \
375   $(top_builddir)/src/namestore/libgnunetnamestore.la \
376   $(top_builddir)/src/gns/libgnunetgns.la \
377   $(top_builddir)/src/testing/libgnunettesting.la
378 test_gns_cname_lookup_DEPENDENCIES = \
379   $(top_builddir)/src/util/libgnunetutil.la \
380   $(top_builddir)/src/namestore/libgnunetnamestore.la \
381   libgnunetgns.la \
382   $(top_builddir)/src/testing/libgnunettesting.la
383
384
385 test_gns_ns_lookup_SOURCES = \
386   test_gns_ns_lookup.c
387 test_gns_ns_lookup_LDADD = \
388   $(top_builddir)/src/util/libgnunetutil.la \
389   $(top_builddir)/src/namestore/libgnunetnamestore.la \
390   $(top_builddir)/src/gns/libgnunetgns.la \
391   $(top_builddir)/src/testing/libgnunettesting.la
392 test_gns_ns_lookup_DEPENDENCIES = \
393   $(top_builddir)/src/util/libgnunetutil.la \
394   $(top_builddir)/src/namestore/libgnunetnamestore.la \
395   libgnunetgns.la \
396   $(top_builddir)/src/testing/libgnunettesting.la
397
398
399 test_gns_revocation_SOURCES = \
400   test_gns_revocation.c
401 test_gns_revocation_LDADD = \
402   $(top_builddir)/src/util/libgnunetutil.la \
403   $(top_builddir)/src/namestore/libgnunetnamestore.la \
404   $(top_builddir)/src/gns/libgnunetgns.la \
405   $(top_builddir)/src/testing/libgnunettesting.la
406 test_gns_revocation_DEPENDENCIES = \
407   $(top_builddir)/src/util/libgnunetutil.la \
408   $(top_builddir)/src/namestore/libgnunetnamestore.la \
409   libgnunetgns.la \
410   $(top_builddir)/src/testing/libgnunettesting.la
411
412
413
414 #Build stub api
415 #libgnunetnamestore_la_SOURCES = \
416 # namestore_stub_api.c
417 #libgnunetnamestore_la_LIBADD = \
418 # $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
419 #libgnunetnamestore_la_LDFLAGS = \
420 #  $(GN_LIB_LDFLAGS)
421 #libgnunetnamestore_la_DEPENDENCIES = \
422 # $(top_builddir)/src/util/libgnunetutil.la
423
424
425