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