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