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