718257bfd719f704c8a678322f838dbe1e8f503b
[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 endif
12
13 if USE_COVERAGE
14   AM_CFLAGS = --coverage -O0
15 endif
16
17 pkgcfgdir= $(pkgdatadir)/config.d/
18
19 plugindir = $(libdir)/gnunet
20
21 pkgcfg_DATA = \
22   gns.conf
23
24 lib_LTLIBRARIES = \
25   libgnunetgns.la
26
27 if HAVE_MHD
28  DO_FCFSD=gnunet-gns-fcfsd
29 if HAVE_GNUTLS
30  DO_PROXY=gnunet-gns-proxy
31 endif
32 endif
33
34 bin_PROGRAMS = \
35   gnunet-service-gns \
36   $(DO_FCFSD) \
37         $(DO_PROXY) \
38   gnunet-gns
39
40 bin_SCRIPTS=gnunet-gns-proxy-setup-ca
41
42 check_PROGRAMS = \
43   test_gns_simple_shorten \
44   test_gns_simple_get_authority \
45   test_gns_simple_lookup \
46   test_gns_simple_delegated_lookup \
47   test_gns_simple_mx_lookup \
48   test_gns_simple_zkey_lookup \
49   test_gns_dht_delegated_lookup \
50   test_gns_pseu_shorten \
51   test_gns_max_queries \
52   test_gns_dht_threepeer \
53         test_gns_cname_lookup \
54         test_gns_ns_lookup
55
56
57 #  test_gns_simple_lookup
58 #  test_gns_simple_delegated_lookup
59 #  test_gns_dht_delegated_lookup
60
61
62 plugin_LTLIBRARIES = \
63   libgnunet_plugin_block_gns.la
64
65 test_gns_dht_threepeer_SOURCES = \
66   test_gns_dht_threepeer.c
67 test_gns_dht_threepeer_LDADD = \
68   $(top_builddir)/src/util/libgnunetutil.la \
69   $(top_builddir)/src/namestore/libgnunetnamestore.la \
70   $(top_builddir)/src/gns/libgnunetgns.la \
71   $(top_builddir)/src/testing_old/libgnunettesting_old.la
72 test_gns_dht_threepeer_DEPENDENCIES = \
73   $(top_builddir)/src/util/libgnunetutil.la \
74   $(top_builddir)/src/namestore/libgnunetnamestore.la \
75   $(top_builddir)/src/gns/libgnunetgns.la \
76   $(top_builddir)/src/testing_old/libgnunettesting_old.la
77
78 test_gns_simple_lookup_SOURCES = \
79   test_gns_simple_lookup.c
80 test_gns_simple_lookup_LDADD = \
81   $(top_builddir)/src/util/libgnunetutil.la \
82   $(top_builddir)/src/namestore/libgnunetnamestore.la \
83   $(top_builddir)/src/gns/libgnunetgns.la \
84   $(top_builddir)/src/testing_old/libgnunettesting_old.la
85 test_gns_simple_lookup_DEPENDENCIES = \
86   $(top_builddir)/src/util/libgnunetutil.la \
87   $(top_builddir)/src/namestore/libgnunetnamestore.la \
88   $(top_builddir)/src/gns/libgnunetgns.la \
89   $(top_builddir)/src/testing_old/libgnunettesting_old.la
90
91 test_gns_simple_delegated_lookup_SOURCES = \
92   test_gns_simple_delegated_lookup.c
93 test_gns_simple_delegated_lookup_LDADD = \
94   $(top_builddir)/src/util/libgnunetutil.la \
95   $(top_builddir)/src/namestore/libgnunetnamestore.la \
96   $(top_builddir)/src/gns/libgnunetgns.la \
97   $(top_builddir)/src/testing_old/libgnunettesting_old.la
98 test_gns_simple_delegated_lookup_DEPENDENCIES = \
99   $(top_builddir)/src/util/libgnunetutil.la \
100   $(top_builddir)/src/namestore/libgnunetnamestore.la \
101   $(top_builddir)/src/gns/libgnunetgns.la \
102   $(top_builddir)/src/testing_old/libgnunettesting_old.la
103
104 test_gns_simple_mx_lookup_SOURCES = \
105   test_gns_simple_mx_lookup.c
106 test_gns_simple_mx_lookup_LDADD = \
107   $(top_builddir)/src/util/libgnunetutil.la \
108   $(top_builddir)/src/namestore/libgnunetnamestore.la \
109   $(top_builddir)/src/gns/libgnunetgns.la \
110   $(top_builddir)/src/testing_old/libgnunettesting_old.la
111 test_gns_simple_mx_lookup_DEPENDENCIES = \
112   $(top_builddir)/src/util/libgnunetutil.la \
113   $(top_builddir)/src/namestore/libgnunetnamestore.la \
114   $(top_builddir)/src/gns/libgnunetgns.la \
115   $(top_builddir)/src/testing_old/libgnunettesting_old.la
116
117 test_gns_simple_zkey_lookup_SOURCES = \
118   test_gns_simple_zkey_lookup.c
119 test_gns_simple_zkey_lookup_LDADD = \
120   $(top_builddir)/src/util/libgnunetutil.la \
121   $(top_builddir)/src/namestore/libgnunetnamestore.la \
122   $(top_builddir)/src/gns/libgnunetgns.la \
123   $(top_builddir)/src/testing_old/libgnunettesting_old.la
124 test_gns_simple_zkey_lookup_DEPENDENCIES = \
125   $(top_builddir)/src/util/libgnunetutil.la \
126   $(top_builddir)/src/namestore/libgnunetnamestore.la \
127   $(top_builddir)/src/gns/libgnunetgns.la \
128   $(top_builddir)/src/testing_old/libgnunettesting_old.la
129
130 test_gns_dht_delegated_lookup_SOURCES = \
131   test_gns_dht_delegated_lookup.c
132 test_gns_dht_delegated_lookup_LDADD = \
133   $(top_builddir)/src/util/libgnunetutil.la \
134   $(top_builddir)/src/namestore/libgnunetnamestore.la \
135   $(top_builddir)/src/dht/libgnunetdht.la \
136   $(top_builddir)/src/gns/libgnunetgns.la \
137   $(top_builddir)/src/testing_old/libgnunettesting_old.la
138 test_gns_dht_delegated_lookup_DEPENDENCIES = \
139   $(top_builddir)/src/util/libgnunetutil.la \
140   $(top_builddir)/src/namestore/libgnunetnamestore.la \
141   $(top_builddir)/src/dht/libgnunetdht.la \
142   $(top_builddir)/src/gns/libgnunetgns.la \
143   $(top_builddir)/src/testing_old/libgnunettesting_old.la
144
145 test_gns_simple_shorten_SOURCES = \
146   test_gns_simple_shorten.c
147 test_gns_simple_shorten_LDADD = \
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 test_gns_simple_shorten_DEPENDENCIES = \
153   $(top_builddir)/src/util/libgnunetutil.la \
154   $(top_builddir)/src/namestore/libgnunetnamestore.la \
155   $(top_builddir)/src/gns/libgnunetgns.la \
156   $(top_builddir)/src/testing_old/libgnunettesting_old.la
157
158 test_gns_simple_get_authority_SOURCES = \
159   test_gns_simple_get_authority.c
160 test_gns_simple_get_authority_LDADD = \
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 test_gns_simple_get_authority_DEPENDENCIES = \
166   $(top_builddir)/src/util/libgnunetutil.la \
167   $(top_builddir)/src/namestore/libgnunetnamestore.la \
168   $(top_builddir)/src/gns/libgnunetgns.la \
169   $(top_builddir)/src/testing_old/libgnunettesting_old.la
170
171
172 test_gns_pseu_shorten_SOURCES = \
173   test_gns_pseu_shorten.c
174 test_gns_pseu_shorten_LDADD = \
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 test_gns_pseu_shorten_DEPENDENCIES = \
181   $(top_builddir)/src/util/libgnunetutil.la \
182   $(top_builddir)/src/namestore/libgnunetnamestore.la \
183   $(top_builddir)/src/dht/libgnunetdht.la \
184   $(top_builddir)/src/gns/libgnunetgns.la \
185   $(top_builddir)/src/testing_old/libgnunettesting_old.la
186
187
188 test_gns_max_queries_SOURCES = \
189   test_gns_max_queries.c
190 test_gns_max_queries_LDADD = \
191   $(top_builddir)/src/util/libgnunetutil.la \
192   $(top_builddir)/src/namestore/libgnunetnamestore.la \
193   $(top_builddir)/src/gns/libgnunetgns.la \
194   $(top_builddir)/src/testing_old/libgnunettesting_old.la
195 test_gns_max_queries_DEPENDENCIES = \
196   $(top_builddir)/src/util/libgnunetutil.la \
197   $(top_builddir)/src/namestore/libgnunetnamestore.la \
198   $(top_builddir)/src/gns/libgnunetgns.la \
199   $(top_builddir)/src/testing_old/libgnunettesting_old.la
200
201 test_gns_cname_lookup_SOURCES = \
202   test_gns_cname_lookup.c
203 test_gns_cname_lookup_LDADD = \
204   $(top_builddir)/src/util/libgnunetutil.la \
205   $(top_builddir)/src/namestore/libgnunetnamestore.la \
206   $(top_builddir)/src/gns/libgnunetgns.la \
207   $(top_builddir)/src/testing_old/libgnunettesting_old.la
208 test_gns_cname_lookup_DEPENDENCIES = \
209   $(top_builddir)/src/util/libgnunetutil.la \
210   $(top_builddir)/src/namestore/libgnunetnamestore.la \
211   $(top_builddir)/src/gns/libgnunetgns.la \
212   $(top_builddir)/src/testing_old/libgnunettesting_old.la
213
214
215 test_gns_ns_lookup_SOURCES = \
216   test_gns_ns_lookup.c
217 test_gns_ns_lookup_LDADD = \
218   $(top_builddir)/src/util/libgnunetutil.la \
219   $(top_builddir)/src/namestore/libgnunetnamestore.la \
220   $(top_builddir)/src/gns/libgnunetgns.la \
221   $(top_builddir)/src/testing_old/libgnunettesting_old.la
222 test_gns_ns_lookup_DEPENDENCIES = \
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_old/libgnunettesting_old.la
227
228 gnunet_gns_SOURCES = \
229  gnunet-gns.c
230 gnunet_gns_LDADD = \
231   $(top_builddir)/src/gns/libgnunetgns.la \
232   $(top_builddir)/src/util/libgnunetutil.la \
233   $(top_builddir)/src/namestore/libgnunetnamestore.la \
234   $(GN_LIBINTL)
235 gnunet_gns_DEPENDENCIES = \
236   libgnunetgns.la
237
238 gnunet_gns_proxy_SOURCES = \
239  gnunet-gns-proxy.c gns_proxy_proto.h 
240 gnunet_gns_proxy_LDADD = -lmicrohttpd -lcurl -lgnutls \
241   $(top_builddir)/src/gns/libgnunetgns.la \
242   $(top_builddir)/src/util/libgnunetutil.la \
243   $(GN_LIBINTL)
244 gnunet_gns_proxy_DEPENDENCIES = \
245   libgnunetgns.la
246
247 gnunet_service_gns_SOURCES = \
248  gnunet-service-gns.c \
249  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
250  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h 
251 gnunet_service_gns_LDADD = \
252   $(top_builddir)/src/statistics/libgnunetstatistics.la \
253   $(top_builddir)/src/util/libgnunetutil.la \
254         $(top_builddir)/src/dns/libgnunetdns.la \
255         $(top_builddir)/src/dns/libgnunetdnsparser.la \
256         $(top_builddir)/src/dht/libgnunetdht.la \
257         $(top_builddir)/src/namestore/libgnunetnamestore.la \
258         $(top_builddir)/src/vpn/libgnunetvpn.la \
259   $(GN_LIBINTL)
260 gnunet_service_gns_DEPENDENCIES = \
261   $(top_builddir)/src/statistics/libgnunetstatistics.la \
262   $(top_builddir)/src/util/libgnunetutil.la \
263         $(top_builddir)/src/dns/libgnunetdns.la \
264         $(top_builddir)/src/dns/libgnunetdnsparser.la \
265         $(top_builddir)/src/dht/libgnunetdht.la \
266         $(top_builddir)/src/namestore/libgnunetnamestore.la \
267         $(top_builddir)/src/vpn/libgnunetvpn.la
268
269
270 gnunet_gns_fcfsd_SOURCES = \
271  gnunet-gns-fcfsd.c 
272 gnunet_gns_fcfsd_LDADD = -lmicrohttpd \
273   $(top_builddir)/src/util/libgnunetutil.la \
274   $(top_builddir)/src/namestore/libgnunetnamestore.la \
275   $(GN_LIBINTL)
276 gnunet_gns_fcfsd_DEPENDENCIES = \
277   $(top_builddir)/src/util/libgnunetutil.la \
278   $(top_builddir)/src/namestore/libgnunetnamestore.la
279
280
281 libgnunetgns_la_SOURCES = \
282  gns_api.c gns.h
283 libgnunetgns_la_LIBADD = \
284  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
285  $(top_builddir)/src/namestore/libgnunetnamestore.la
286 libgnunetgns_la_LDFLAGS = \
287   $(GN_LIB_LDFLAGS)
288 libgnunetgns_la_DEPENDENCIES = \
289  $(top_builddir)/src/util/libgnunetutil.la \
290  $(top_builddir)/src/namestore/libgnunetnamestore.la
291
292 libgnunet_plugin_block_gns_la_SOURCES = \
293   plugin_block_gns.c
294 libgnunet_plugin_block_gns_la_LIBADD = \
295   $(top_builddir)/src/util/libgnunetutil.la \
296   $(top_builddir)/src/block/libgnunetblock.la \
297   $(top_builddir)/src/namestore/libgnunetnamestore.la
298 libgnunet_plugin_block_gns_la_LDFLAGS = \
299   $(GN_PLUGIN_LDFLAGS)
300 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
301   $(top_builddir)/src/util/libgnunetutil.la \
302   $(top_builddir)/src/block/libgnunetblock.la \
303   $(top_builddir)/src/namestore/libgnunetnamestore.la
304
305 #Build stub api
306 #libgnunetnamestore_la_SOURCES = \
307 # namestore_stub_api.c
308 #libgnunetnamestore_la_LIBADD = \
309 # $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
310 #libgnunetnamestore_la_LDFLAGS = \
311 #  $(GN_LIB_LDFLAGS)
312 #libgnunetnamestore_la_DEPENDENCIES = \
313 # $(top_builddir)/src/util/libgnunetutil.la
314
315 if ENABLE_TEST_RUN
316 if LINUX
317 TESTS = $(check_PROGRAMS)
318 endif
319 endif
320
321 EXTRA_DIST = \
322   test_gns_defaults.conf \
323   test_gns_simple_lookup.conf \
324   test_gns_dht_default.conf \
325         zonefiles/188JSUMKEF25GVU8TTV0PBNNN8JVCPUEDFV1UHJJU884JD25V0T0.zkey \
326         zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey
327