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