-fix
[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 if MINGW
10   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
11   DO_W32_HELPER = gnunet-gns-helper-service-w32
12   DO_W32_NSP = libw32nsp.la
13   DO_W32_NSPTOOLS = w32nsp-install w32nsp-uninstall w32nsp-resolve
14 endif
15
16 if USE_COVERAGE
17   AM_CFLAGS = --coverage -O0
18 endif
19
20 pkgcfgdir= $(pkgdatadir)/config.d/
21
22 plugindir = $(libdir)/gnunet
23
24 pkgcfg_DATA = \
25   gns.conf \
26   gns-helper-service-w32.conf
27
28 lib_LTLIBRARIES = \
29   $(DO_W32_NSP) \
30   libgnunetgns.la
31
32 if HAVE_MHD
33  DO_FCFSD=gnunet-gns-fcfsd
34 if HAVE_GNUTLS
35  DO_PROXY=gnunet-gns-proxy
36 endif
37 endif
38
39 bin_PROGRAMS = \
40   gnunet-service-gns \
41   $(DO_FCFSD) \
42         $(DO_PROXY) \
43   $(DO_W32_HELPER) \
44   $(DO_W32_NSPTOOLS) \
45   gnunet-gns
46
47 bin_SCRIPTS=gnunet-gns-proxy-setup-ca
48
49 check_PROGRAMS = \
50   test_gns_simple_shorten \
51   test_gns_simple_get_authority \
52   test_gns_simple_lookup \
53   test_gns_simple_delegated_lookup \
54   test_gns_simple_mx_lookup \
55         test_gns_simple_srv_lookup \
56   test_gns_simple_zkey_lookup \
57   test_gns_dht_delegated_lookup \
58   test_gns_pseu_shorten \
59   test_gns_max_queries \
60   test_gns_dht_threepeer \
61         test_gns_cname_lookup \
62         test_gns_ns_lookup \
63         test_gns_revocation \
64         test_gns_proxy
65
66
67 #  test_gns_simple_lookup
68 #  test_gns_simple_delegated_lookup
69 #  test_gns_dht_delegated_lookup
70
71
72 plugin_LTLIBRARIES = \
73   libgnunet_plugin_block_gns.la
74
75 test_gns_proxy_SOURCES = \
76   test_gns_proxy.c
77 test_gns_proxy_LDADD = -lmicrohttpd @LIBCURL@ \
78   $(top_builddir)/src/util/libgnunetutil.la \
79   $(top_builddir)/src/namestore/libgnunetnamestore.la \
80   $(top_builddir)/src/gns/libgnunetgns.la \
81   $(top_builddir)/src/testing/libgnunettesting.la
82 test_gns_proxy_DEPENDENCIES = \
83   $(top_builddir)/src/util/libgnunetutil.la \
84   $(top_builddir)/src/namestore/libgnunetnamestore.la \
85   $(top_builddir)/src/gns/libgnunetgns.la \
86   $(top_builddir)/src/testing/libgnunettesting.la
87
88 test_gns_dht_threepeer_SOURCES = \
89   test_gns_dht_threepeer.c
90 test_gns_dht_threepeer_LDADD = \
91   $(top_builddir)/src/util/libgnunetutil.la \
92   $(top_builddir)/src/namestore/libgnunetnamestore.la \
93   $(top_builddir)/src/gns/libgnunetgns.la \
94   $(top_builddir)/src/testing_old/libgnunettesting_old.la
95 test_gns_dht_threepeer_DEPENDENCIES = \
96   $(top_builddir)/src/util/libgnunetutil.la \
97   $(top_builddir)/src/namestore/libgnunetnamestore.la \
98   $(top_builddir)/src/gns/libgnunetgns.la \
99   $(top_builddir)/src/testing_old/libgnunettesting_old.la
100
101 test_gns_simple_lookup_SOURCES = \
102   test_gns_simple_lookup.c
103 test_gns_simple_lookup_LDADD = \
104   $(top_builddir)/src/util/libgnunetutil.la \
105   $(top_builddir)/src/namestore/libgnunetnamestore.la \
106   $(top_builddir)/src/gns/libgnunetgns.la \
107   $(top_builddir)/src/testing_old/libgnunettesting_old.la
108 test_gns_simple_lookup_DEPENDENCIES = \
109   $(top_builddir)/src/util/libgnunetutil.la \
110   $(top_builddir)/src/namestore/libgnunetnamestore.la \
111   $(top_builddir)/src/gns/libgnunetgns.la \
112   $(top_builddir)/src/testing_old/libgnunettesting_old.la
113
114 test_gns_simple_delegated_lookup_SOURCES = \
115   test_gns_simple_delegated_lookup.c
116 test_gns_simple_delegated_lookup_LDADD = \
117   $(top_builddir)/src/util/libgnunetutil.la \
118   $(top_builddir)/src/namestore/libgnunetnamestore.la \
119   $(top_builddir)/src/gns/libgnunetgns.la \
120   $(top_builddir)/src/testing_old/libgnunettesting_old.la
121 test_gns_simple_delegated_lookup_DEPENDENCIES = \
122   $(top_builddir)/src/util/libgnunetutil.la \
123   $(top_builddir)/src/namestore/libgnunetnamestore.la \
124   $(top_builddir)/src/gns/libgnunetgns.la \
125   $(top_builddir)/src/testing_old/libgnunettesting_old.la
126
127 test_gns_simple_mx_lookup_SOURCES = \
128   test_gns_simple_mx_lookup.c
129 test_gns_simple_mx_lookup_LDADD = \
130   $(top_builddir)/src/util/libgnunetutil.la \
131   $(top_builddir)/src/namestore/libgnunetnamestore.la \
132   $(top_builddir)/src/gns/libgnunetgns.la \
133   $(top_builddir)/src/testing_old/libgnunettesting_old.la
134 test_gns_simple_mx_lookup_DEPENDENCIES = \
135   $(top_builddir)/src/util/libgnunetutil.la \
136   $(top_builddir)/src/namestore/libgnunetnamestore.la \
137   $(top_builddir)/src/gns/libgnunetgns.la \
138   $(top_builddir)/src/testing_old/libgnunettesting_old.la
139
140 test_gns_simple_srv_lookup_SOURCES = \
141   test_gns_simple_srv_lookup.c
142 test_gns_simple_srv_lookup_LDADD = \
143   $(top_builddir)/src/util/libgnunetutil.la \
144   $(top_builddir)/src/namestore/libgnunetnamestore.la \
145   $(top_builddir)/src/gns/libgnunetgns.la \
146   $(top_builddir)/src/testing_old/libgnunettesting_old.la
147 test_gns_simple_srv_lookup_DEPENDENCIES = \
148   $(top_builddir)/src/util/libgnunetutil.la \
149   $(top_builddir)/src/namestore/libgnunetnamestore.la \
150   $(top_builddir)/src/gns/libgnunetgns.la \
151   $(top_builddir)/src/testing_old/libgnunettesting_old.la
152
153 test_gns_simple_zkey_lookup_SOURCES = \
154   test_gns_simple_zkey_lookup.c
155 test_gns_simple_zkey_lookup_LDADD = \
156   $(top_builddir)/src/util/libgnunetutil.la \
157   $(top_builddir)/src/namestore/libgnunetnamestore.la \
158   $(top_builddir)/src/gns/libgnunetgns.la \
159   $(top_builddir)/src/testing_old/libgnunettesting_old.la
160 test_gns_simple_zkey_lookup_DEPENDENCIES = \
161   $(top_builddir)/src/util/libgnunetutil.la \
162   $(top_builddir)/src/namestore/libgnunetnamestore.la \
163   $(top_builddir)/src/gns/libgnunetgns.la \
164   $(top_builddir)/src/testing_old/libgnunettesting_old.la
165
166 test_gns_dht_delegated_lookup_SOURCES = \
167   test_gns_dht_delegated_lookup.c
168 test_gns_dht_delegated_lookup_LDADD = \
169   $(top_builddir)/src/util/libgnunetutil.la \
170   $(top_builddir)/src/namestore/libgnunetnamestore.la \
171   $(top_builddir)/src/dht/libgnunetdht.la \
172   $(top_builddir)/src/gns/libgnunetgns.la \
173   $(top_builddir)/src/testing_old/libgnunettesting_old.la
174 test_gns_dht_delegated_lookup_DEPENDENCIES = \
175   $(top_builddir)/src/util/libgnunetutil.la \
176   $(top_builddir)/src/namestore/libgnunetnamestore.la \
177   $(top_builddir)/src/dht/libgnunetdht.la \
178   $(top_builddir)/src/gns/libgnunetgns.la \
179   $(top_builddir)/src/testing_old/libgnunettesting_old.la
180
181 test_gns_simple_shorten_SOURCES = \
182   test_gns_simple_shorten.c
183 test_gns_simple_shorten_LDADD = \
184   $(top_builddir)/src/util/libgnunetutil.la \
185   $(top_builddir)/src/namestore/libgnunetnamestore.la \
186   $(top_builddir)/src/gns/libgnunetgns.la \
187   $(top_builddir)/src/testing_old/libgnunettesting_old.la
188 test_gns_simple_shorten_DEPENDENCIES = \
189   $(top_builddir)/src/util/libgnunetutil.la \
190   $(top_builddir)/src/namestore/libgnunetnamestore.la \
191   $(top_builddir)/src/gns/libgnunetgns.la \
192   $(top_builddir)/src/testing_old/libgnunettesting_old.la
193
194 test_gns_simple_get_authority_SOURCES = \
195   test_gns_simple_get_authority.c
196 test_gns_simple_get_authority_LDADD = \
197   $(top_builddir)/src/util/libgnunetutil.la \
198   $(top_builddir)/src/namestore/libgnunetnamestore.la \
199   $(top_builddir)/src/gns/libgnunetgns.la \
200   $(top_builddir)/src/testing_old/libgnunettesting_old.la
201 test_gns_simple_get_authority_DEPENDENCIES = \
202   $(top_builddir)/src/util/libgnunetutil.la \
203   $(top_builddir)/src/namestore/libgnunetnamestore.la \
204   $(top_builddir)/src/gns/libgnunetgns.la \
205   $(top_builddir)/src/testing_old/libgnunettesting_old.la
206
207
208 test_gns_pseu_shorten_SOURCES = \
209   test_gns_pseu_shorten.c
210 test_gns_pseu_shorten_LDADD = \
211   $(top_builddir)/src/util/libgnunetutil.la \
212   $(top_builddir)/src/namestore/libgnunetnamestore.la \
213   $(top_builddir)/src/dht/libgnunetdht.la \
214   $(top_builddir)/src/gns/libgnunetgns.la \
215   $(top_builddir)/src/testing_old/libgnunettesting_old.la
216 test_gns_pseu_shorten_DEPENDENCIES = \
217   $(top_builddir)/src/util/libgnunetutil.la \
218   $(top_builddir)/src/namestore/libgnunetnamestore.la \
219   $(top_builddir)/src/dht/libgnunetdht.la \
220   $(top_builddir)/src/gns/libgnunetgns.la \
221   $(top_builddir)/src/testing_old/libgnunettesting_old.la
222
223
224 test_gns_max_queries_SOURCES = \
225   test_gns_max_queries.c
226 test_gns_max_queries_LDADD = \
227   $(top_builddir)/src/util/libgnunetutil.la \
228   $(top_builddir)/src/namestore/libgnunetnamestore.la \
229   $(top_builddir)/src/gns/libgnunetgns.la \
230   $(top_builddir)/src/testing_old/libgnunettesting_old.la
231 test_gns_max_queries_DEPENDENCIES = \
232   $(top_builddir)/src/util/libgnunetutil.la \
233   $(top_builddir)/src/namestore/libgnunetnamestore.la \
234   $(top_builddir)/src/gns/libgnunetgns.la \
235   $(top_builddir)/src/testing_old/libgnunettesting_old.la
236
237 test_gns_cname_lookup_SOURCES = \
238   test_gns_cname_lookup.c
239 test_gns_cname_lookup_LDADD = \
240   $(top_builddir)/src/util/libgnunetutil.la \
241   $(top_builddir)/src/namestore/libgnunetnamestore.la \
242   $(top_builddir)/src/gns/libgnunetgns.la \
243   $(top_builddir)/src/testing_old/libgnunettesting_old.la
244 test_gns_cname_lookup_DEPENDENCIES = \
245   $(top_builddir)/src/util/libgnunetutil.la \
246   $(top_builddir)/src/namestore/libgnunetnamestore.la \
247   $(top_builddir)/src/gns/libgnunetgns.la \
248   $(top_builddir)/src/testing_old/libgnunettesting_old.la
249
250
251 test_gns_ns_lookup_SOURCES = \
252   test_gns_ns_lookup.c
253 test_gns_ns_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_old/libgnunettesting_old.la
258 test_gns_ns_lookup_DEPENDENCIES = \
259   $(top_builddir)/src/util/libgnunetutil.la \
260   $(top_builddir)/src/namestore/libgnunetnamestore.la \
261   $(top_builddir)/src/gns/libgnunetgns.la \
262   $(top_builddir)/src/testing_old/libgnunettesting_old.la
263
264
265 test_gns_revocation_SOURCES = \
266   test_gns_revocation.c
267 test_gns_revocation_LDADD = \
268   $(top_builddir)/src/util/libgnunetutil.la \
269   $(top_builddir)/src/namestore/libgnunetnamestore.la \
270   $(top_builddir)/src/gns/libgnunetgns.la \
271   $(top_builddir)/src/testing_old/libgnunettesting_old.la
272 test_gns_revocation_DEPENDENCIES = \
273   $(top_builddir)/src/util/libgnunetutil.la \
274   $(top_builddir)/src/namestore/libgnunetnamestore.la \
275   $(top_builddir)/src/gns/libgnunetgns.la \
276   $(top_builddir)/src/testing_old/libgnunettesting_old.la
277
278
279 gnunet_gns_SOURCES = \
280  gnunet-gns.c
281 gnunet_gns_LDADD = \
282   $(top_builddir)/src/gns/libgnunetgns.la \
283   $(top_builddir)/src/util/libgnunetutil.la \
284   $(top_builddir)/src/namestore/libgnunetnamestore.la \
285   $(GN_LIBINTL)
286 gnunet_gns_DEPENDENCIES = \
287   libgnunetgns.la
288
289 gnunet_gns_proxy_SOURCES = \
290  gnunet-gns-proxy.c gns_proxy_proto.h 
291 gnunet_gns_proxy_LDADD = -lmicrohttpd -lcurl -lgnutls \
292   $(top_builddir)/src/gns/libgnunetgns.la \
293   $(top_builddir)/src/util/libgnunetutil.la \
294   $(GN_LIBINTL)
295 gnunet_gns_proxy_DEPENDENCIES = \
296   libgnunetgns.la
297
298 gnunet_gns_helper_service_w32_SOURCES = \
299   gnunet-gns-helper-service-w32.c
300 gnunet_gns_helper_service_w32_LDADD = \
301   $(top_builddir)/src/gns/libgnunetgns.la \
302   $(top_builddir)/src/util/libgnunetutil.la \
303   $(GN_LIBINTL)
304 gnunet_gns_helper_service_w32_DEPENDENCIES = \
305   libgnunetgns.la
306
307 w32nsp_install_SOURCES = \
308   w32nsp-install.c
309 w32nsp_install_LDADD = -lws2_32
310
311 w32nsp_uninstall_SOURCES = \
312   w32nsp-uninstall.c
313 w32nsp_uninstall_LDADD = -lws2_32
314
315 w32nsp_resolve_SOURCES = \
316   w32nsp-resolve.c
317 w32nsp_resolve_LDADD = -lws2_32
318
319 gnunet_service_gns_SOURCES = \
320  gnunet-service-gns.c \
321  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
322  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h 
323 gnunet_service_gns_LDADD = \
324   -lm \
325   $(top_builddir)/src/statistics/libgnunetstatistics.la \
326   $(top_builddir)/src/util/libgnunetutil.la \
327         $(top_builddir)/src/dns/libgnunetdns.la \
328         $(top_builddir)/src/dns/libgnunetdnsparser.la \
329         $(top_builddir)/src/dht/libgnunetdht.la \
330         $(top_builddir)/src/namestore/libgnunetnamestore.la \
331         $(top_builddir)/src/vpn/libgnunetvpn.la \
332   $(GN_LIBINTL)
333 gnunet_service_gns_DEPENDENCIES = \
334   $(top_builddir)/src/statistics/libgnunetstatistics.la \
335   $(top_builddir)/src/util/libgnunetutil.la \
336         $(top_builddir)/src/dns/libgnunetdns.la \
337         $(top_builddir)/src/dns/libgnunetdnsparser.la \
338         $(top_builddir)/src/dht/libgnunetdht.la \
339         $(top_builddir)/src/namestore/libgnunetnamestore.la \
340         $(top_builddir)/src/vpn/libgnunetvpn.la
341
342
343 gnunet_gns_fcfsd_SOURCES = \
344  gnunet-gns-fcfsd.c 
345 gnunet_gns_fcfsd_LDADD = -lmicrohttpd \
346   $(top_builddir)/src/util/libgnunetutil.la \
347   $(top_builddir)/src/namestore/libgnunetnamestore.la \
348   $(GN_LIBINTL)
349 gnunet_gns_fcfsd_DEPENDENCIES = \
350   $(top_builddir)/src/util/libgnunetutil.la \
351   $(top_builddir)/src/namestore/libgnunetnamestore.la
352
353 libw32nsp_la_SOURCES = \
354   w32nsp.c
355 libw32nsp_la_LIBADD = \
356   -lole32 -lws2_32
357 libw32nsp_la_LDFLAGS = \
358   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
359   $(GN_LIB_LDFLAGS)
360
361 libgnunetgns_la_SOURCES = \
362  gns_api.c gns.h
363 libgnunetgns_la_LIBADD = \
364  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
365  $(top_builddir)/src/namestore/libgnunetnamestore.la
366 libgnunetgns_la_LDFLAGS = \
367   $(GN_LIB_LDFLAGS)
368 libgnunetgns_la_DEPENDENCIES = \
369  $(top_builddir)/src/util/libgnunetutil.la \
370  $(top_builddir)/src/namestore/libgnunetnamestore.la
371
372 libgnunet_plugin_block_gns_la_SOURCES = \
373   plugin_block_gns.c
374 libgnunet_plugin_block_gns_la_LIBADD = \
375   $(top_builddir)/src/util/libgnunetutil.la \
376   $(top_builddir)/src/block/libgnunetblock.la \
377   $(top_builddir)/src/namestore/libgnunetnamestore.la
378 libgnunet_plugin_block_gns_la_LDFLAGS = \
379   $(GN_PLUGIN_LDFLAGS)
380 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
381   $(top_builddir)/src/util/libgnunetutil.la \
382   $(top_builddir)/src/block/libgnunetblock.la \
383   $(top_builddir)/src/namestore/libgnunetnamestore.la
384
385 #Build stub api
386 #libgnunetnamestore_la_SOURCES = \
387 # namestore_stub_api.c
388 #libgnunetnamestore_la_LIBADD = \
389 # $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
390 #libgnunetnamestore_la_LDFLAGS = \
391 #  $(GN_LIB_LDFLAGS)
392 #libgnunetnamestore_la_DEPENDENCIES = \
393 # $(top_builddir)/src/util/libgnunetutil.la
394
395 if ENABLE_TEST_RUN
396 if LINUX
397 TESTS = $(check_PROGRAMS)
398 endif
399 endif
400
401 EXTRA_DIST = \
402   test_gns_defaults.conf \
403   test_gns_simple_lookup.conf \
404   test_gns_dht_default.conf \
405         zonefiles/188JSUMKEF25GVU8TTV0PBNNN8JVCPUEDFV1UHJJU884JD25V0T0.zkey \
406         zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \
407         zonefiles/test_zonekey
408