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