93eed3ae9e9c99985bbba3b4158eafc4e58fb1d4
[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 #noinst_PROGRAMS = \
41 #  gnunet-gns-lookup
42
43 check_PROGRAMS = \
44   test_gns_simple_shorten \
45   test_gns_simple_get_authority \
46   test_gns_simple_lookup \
47   test_gns_simple_delegated_lookup \
48   test_gns_simple_mx_lookup \
49   test_gns_simple_zkey_lookup \
50   test_gns_dht_delegated_lookup \
51   test_gns_pseu_shorten \
52   test_gns_max_queries \
53   test_gns_dht_threepeer
54
55
56 #  test_gns_simple_lookup
57 #  test_gns_simple_delegated_lookup
58 #  test_gns_dht_delegated_lookup
59
60
61 plugin_LTLIBRARIES = \
62   libgnunet_plugin_block_gns.la
63
64 test_gns_dht_threepeer_SOURCES = \
65   test_gns_dht_threepeer.c
66 test_gns_dht_threepeer_LDADD = \
67   $(top_builddir)/src/util/libgnunetutil.la \
68   $(top_builddir)/src/namestore/libgnunetnamestore.la \
69   $(top_builddir)/src/gns/libgnunetgns.la \
70   $(top_builddir)/src/testing_old/libgnunettesting_old.la
71 test_gns_dht_threepeer_DEPENDENCIES = \
72   $(top_builddir)/src/util/libgnunetutil.la \
73   $(top_builddir)/src/namestore/libgnunetnamestore.la \
74   $(top_builddir)/src/gns/libgnunetgns.la \
75   $(top_builddir)/src/testing_old/libgnunettesting_old.la
76
77 test_gns_simple_lookup_SOURCES = \
78   test_gns_simple_lookup.c
79 test_gns_simple_lookup_LDADD = \
80   $(top_builddir)/src/util/libgnunetutil.la \
81   $(top_builddir)/src/namestore/libgnunetnamestore.la \
82   $(top_builddir)/src/gns/libgnunetgns.la \
83   $(top_builddir)/src/testing_old/libgnunettesting_old.la
84 test_gns_simple_lookup_DEPENDENCIES = \
85   $(top_builddir)/src/util/libgnunetutil.la \
86   $(top_builddir)/src/namestore/libgnunetnamestore.la \
87   $(top_builddir)/src/gns/libgnunetgns.la \
88   $(top_builddir)/src/testing_old/libgnunettesting_old.la
89
90 test_gns_simple_delegated_lookup_SOURCES = \
91   test_gns_simple_delegated_lookup.c
92 test_gns_simple_delegated_lookup_LDADD = \
93   $(top_builddir)/src/util/libgnunetutil.la \
94   $(top_builddir)/src/namestore/libgnunetnamestore.la \
95   $(top_builddir)/src/gns/libgnunetgns.la \
96   $(top_builddir)/src/testing_old/libgnunettesting_old.la
97 test_gns_simple_delegated_lookup_DEPENDENCIES = \
98   $(top_builddir)/src/util/libgnunetutil.la \
99   $(top_builddir)/src/namestore/libgnunetnamestore.la \
100   $(top_builddir)/src/gns/libgnunetgns.la \
101   $(top_builddir)/src/testing_old/libgnunettesting_old.la
102
103 test_gns_simple_mx_lookup_SOURCES = \
104   test_gns_simple_mx_lookup.c
105 test_gns_simple_mx_lookup_LDADD = \
106   $(top_builddir)/src/util/libgnunetutil.la \
107   $(top_builddir)/src/namestore/libgnunetnamestore.la \
108   $(top_builddir)/src/gns/libgnunetgns.la \
109   $(top_builddir)/src/testing_old/libgnunettesting_old.la
110 test_gns_simple_mx_lookup_DEPENDENCIES = \
111   $(top_builddir)/src/util/libgnunetutil.la \
112   $(top_builddir)/src/namestore/libgnunetnamestore.la \
113   $(top_builddir)/src/gns/libgnunetgns.la \
114   $(top_builddir)/src/testing_old/libgnunettesting_old.la
115
116 test_gns_simple_zkey_lookup_SOURCES = \
117   test_gns_simple_zkey_lookup.c
118 test_gns_simple_zkey_lookup_LDADD = \
119   $(top_builddir)/src/util/libgnunetutil.la \
120   $(top_builddir)/src/namestore/libgnunetnamestore.la \
121   $(top_builddir)/src/gns/libgnunetgns.la \
122   $(top_builddir)/src/testing_old/libgnunettesting_old.la
123 test_gns_simple_zkey_lookup_DEPENDENCIES = \
124   $(top_builddir)/src/util/libgnunetutil.la \
125   $(top_builddir)/src/namestore/libgnunetnamestore.la \
126   $(top_builddir)/src/gns/libgnunetgns.la \
127   $(top_builddir)/src/testing_old/libgnunettesting_old.la
128
129 test_gns_dht_delegated_lookup_SOURCES = \
130   test_gns_dht_delegated_lookup.c
131 test_gns_dht_delegated_lookup_LDADD = \
132   $(top_builddir)/src/util/libgnunetutil.la \
133   $(top_builddir)/src/namestore/libgnunetnamestore.la \
134   $(top_builddir)/src/dht/libgnunetdht.la \
135   $(top_builddir)/src/gns/libgnunetgns.la \
136   $(top_builddir)/src/testing_old/libgnunettesting_old.la
137 test_gns_dht_delegated_lookup_DEPENDENCIES = \
138   $(top_builddir)/src/util/libgnunetutil.la \
139   $(top_builddir)/src/namestore/libgnunetnamestore.la \
140   $(top_builddir)/src/dht/libgnunetdht.la \
141   $(top_builddir)/src/gns/libgnunetgns.la \
142   $(top_builddir)/src/testing_old/libgnunettesting_old.la
143
144 test_gns_simple_shorten_SOURCES = \
145   test_gns_simple_shorten.c
146 test_gns_simple_shorten_LDADD = \
147   $(top_builddir)/src/util/libgnunetutil.la \
148   $(top_builddir)/src/namestore/libgnunetnamestore.la \
149   $(top_builddir)/src/gns/libgnunetgns.la \
150   $(top_builddir)/src/testing_old/libgnunettesting_old.la
151 test_gns_simple_shorten_DEPENDENCIES = \
152   $(top_builddir)/src/util/libgnunetutil.la \
153   $(top_builddir)/src/namestore/libgnunetnamestore.la \
154   $(top_builddir)/src/gns/libgnunetgns.la \
155   $(top_builddir)/src/testing_old/libgnunettesting_old.la
156
157 test_gns_simple_get_authority_SOURCES = \
158   test_gns_simple_get_authority.c
159 test_gns_simple_get_authority_LDADD = \
160   $(top_builddir)/src/util/libgnunetutil.la \
161   $(top_builddir)/src/namestore/libgnunetnamestore.la \
162   $(top_builddir)/src/gns/libgnunetgns.la \
163   $(top_builddir)/src/testing_old/libgnunettesting_old.la
164 test_gns_simple_get_authority_DEPENDENCIES = \
165   $(top_builddir)/src/util/libgnunetutil.la \
166   $(top_builddir)/src/namestore/libgnunetnamestore.la \
167   $(top_builddir)/src/gns/libgnunetgns.la \
168   $(top_builddir)/src/testing_old/libgnunettesting_old.la
169
170
171 test_gns_pseu_shorten_SOURCES = \
172   test_gns_pseu_shorten.c
173 test_gns_pseu_shorten_LDADD = \
174   $(top_builddir)/src/util/libgnunetutil.la \
175   $(top_builddir)/src/namestore/libgnunetnamestore.la \
176   $(top_builddir)/src/dht/libgnunetdht.la \
177   $(top_builddir)/src/gns/libgnunetgns.la \
178   $(top_builddir)/src/testing_old/libgnunettesting_old.la
179 test_gns_pseu_shorten_DEPENDENCIES = \
180   $(top_builddir)/src/util/libgnunetutil.la \
181   $(top_builddir)/src/namestore/libgnunetnamestore.la \
182   $(top_builddir)/src/dht/libgnunetdht.la \
183   $(top_builddir)/src/gns/libgnunetgns.la \
184   $(top_builddir)/src/testing_old/libgnunettesting_old.la
185
186
187 test_gns_max_queries_SOURCES = \
188   test_gns_max_queries.c
189 test_gns_max_queries_LDADD = \
190   $(top_builddir)/src/util/libgnunetutil.la \
191   $(top_builddir)/src/namestore/libgnunetnamestore.la \
192   $(top_builddir)/src/gns/libgnunetgns.la \
193   $(top_builddir)/src/testing_old/libgnunettesting_old.la
194 test_gns_max_queries_DEPENDENCIES = \
195   $(top_builddir)/src/util/libgnunetutil.la \
196   $(top_builddir)/src/namestore/libgnunetnamestore.la \
197   $(top_builddir)/src/gns/libgnunetgns.la \
198   $(top_builddir)/src/testing_old/libgnunettesting_old.la
199
200 gnunet_gns_SOURCES = \
201  gnunet-gns.c
202 gnunet_gns_LDADD = \
203   $(top_builddir)/src/gns/libgnunetgns.la \
204   $(top_builddir)/src/util/libgnunetutil.la \
205   $(top_builddir)/src/namestore/libgnunetnamestore.la \
206   $(GN_LIBINTL)
207 gnunet_gns_DEPENDENCIES = \
208   libgnunetgns.la
209
210 gnunet_gns_proxy_SOURCES = \
211  gnunet-gns-proxy.c gns_proxy_proto.h 
212 gnunet_gns_proxy_LDADD = -lmicrohttpd -lcurl -lgnutls \
213   $(top_builddir)/src/gns/libgnunetgns.la \
214   $(top_builddir)/src/util/libgnunetutil.la \
215   $(GN_LIBINTL)
216 gnunet_gns_proxy_DEPENDENCIES = \
217   libgnunetgns.la
218
219 gnunet_service_gns_SOURCES = \
220  gnunet-service-gns.c \
221  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
222  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h 
223 gnunet_service_gns_LDADD = \
224   $(top_builddir)/src/statistics/libgnunetstatistics.la \
225   $(top_builddir)/src/util/libgnunetutil.la \
226         $(top_builddir)/src/dns/libgnunetdns.la \
227         $(top_builddir)/src/dns/libgnunetdnsparser.la \
228         $(top_builddir)/src/dht/libgnunetdht.la \
229         $(top_builddir)/src/namestore/libgnunetnamestore.la \
230   $(GN_LIBINTL)
231 gnunet_service_gns_DEPENDENCIES = \
232   $(top_builddir)/src/statistics/libgnunetstatistics.la \
233   $(top_builddir)/src/util/libgnunetutil.la \
234         $(top_builddir)/src/dns/libgnunetdns.la \
235         $(top_builddir)/src/dns/libgnunetdnsparser.la \
236         $(top_builddir)/src/dht/libgnunetdht.la \
237         $(top_builddir)/src/namestore/libgnunetnamestore.la
238
239
240 gnunet_gns_fcfsd_SOURCES = \
241  gnunet-gns-fcfsd.c 
242 gnunet_gns_fcfsd_LDADD = -lmicrohttpd \
243   $(top_builddir)/src/util/libgnunetutil.la \
244   $(top_builddir)/src/namestore/libgnunetnamestore.la \
245   $(GN_LIBINTL)
246 gnunet_gns_fcfsd_DEPENDENCIES = \
247   $(top_builddir)/src/util/libgnunetutil.la \
248   $(top_builddir)/src/namestore/libgnunetnamestore.la
249
250
251 libgnunetgns_la_SOURCES = \
252  gns_api.c gns.h
253 libgnunetgns_la_LIBADD = \
254  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
255  $(top_builddir)/src/namestore/libgnunetnamestore.la
256 libgnunetgns_la_LDFLAGS = \
257   $(GN_LIB_LDFLAGS)
258 libgnunetgns_la_DEPENDENCIES = \
259  $(top_builddir)/src/util/libgnunetutil.la \
260  $(top_builddir)/src/namestore/libgnunetnamestore.la
261
262 libgnunet_plugin_block_gns_la_SOURCES = \
263   plugin_block_gns.c
264 libgnunet_plugin_block_gns_la_LIBADD = \
265   $(top_builddir)/src/util/libgnunetutil.la \
266   $(top_builddir)/src/block/libgnunetblock.la \
267   $(top_builddir)/src/namestore/libgnunetnamestore.la
268 libgnunet_plugin_block_gns_la_LDFLAGS = \
269   $(GN_PLUGIN_LDFLAGS)
270 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
271   $(top_builddir)/src/util/libgnunetutil.la \
272   $(top_builddir)/src/block/libgnunetblock.la \
273   $(top_builddir)/src/namestore/libgnunetnamestore.la
274
275 #Build stub api
276 #libgnunetnamestore_la_SOURCES = \
277 # namestore_stub_api.c
278 #libgnunetnamestore_la_LIBADD = \
279 # $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
280 #libgnunetnamestore_la_LDFLAGS = \
281 #  $(GN_LIB_LDFLAGS)
282 #libgnunetnamestore_la_DEPENDENCIES = \
283 # $(top_builddir)/src/util/libgnunetutil.la
284
285 if ENABLE_TEST_RUN
286 if LINUX
287 TESTS = $(check_PROGRAMS)
288 endif
289 endif
290
291 EXTRA_DIST = \
292   test_gns_defaults.conf \
293   test_gns_simple_lookup.conf \
294   test_gns_dht_default.conf
295