2e28a6a905c0dbd35220a544aa73f93aabba67e9
[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 endif
30
31 bin_PROGRAMS = \
32   gnunet-service-gns \
33   $(DO_FCFSD) \
34   gnunet-gns
35
36 #noinst_PROGRAMS = \
37 #  gnunet-gns-lookup
38
39 check_PROGRAMS = \
40   test_gns_simple_shorten \
41   test_gns_simple_get_authority \
42   test_gns_simple_lookup \
43   test_gns_simple_delegated_lookup \
44   test_gns_simple_mx_lookup \
45   test_gns_simple_zkey_lookup \
46   test_gns_dht_delegated_lookup \
47   test_gns_pseu_shorten \
48   test_gns_max_queries \
49   test_gns_dht_threepeer
50
51
52 #  test_gns_simple_lookup
53 #  test_gns_simple_delegated_lookup
54 #  test_gns_dht_delegated_lookup
55
56
57 plugin_LTLIBRARIES = \
58   libgnunet_plugin_block_gns.la
59
60 test_gns_dht_threepeer_SOURCES = \
61   test_gns_dht_threepeer.c
62 test_gns_dht_threepeer_LDADD = \
63   $(top_builddir)/src/util/libgnunetutil.la \
64   $(top_builddir)/src/namestore/libgnunetnamestore.la \
65   $(top_builddir)/src/gns/libgnunetgns.la \
66   $(top_builddir)/src/testing/libgnunettesting.la
67 test_gns_dht_threepeer_DEPENDENCIES = \
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/libgnunettesting.la
72
73 test_gns_simple_lookup_SOURCES = \
74   test_gns_simple_lookup.c
75 test_gns_simple_lookup_LDADD = \
76   $(top_builddir)/src/util/libgnunetutil.la \
77   $(top_builddir)/src/namestore/libgnunetnamestore.la \
78   $(top_builddir)/src/gns/libgnunetgns.la \
79   $(top_builddir)/src/testing/libgnunettesting.la
80 test_gns_simple_lookup_DEPENDENCIES = \
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/libgnunettesting.la
85
86 test_gns_simple_delegated_lookup_SOURCES = \
87   test_gns_simple_delegated_lookup.c
88 test_gns_simple_delegated_lookup_LDADD = \
89   $(top_builddir)/src/util/libgnunetutil.la \
90   $(top_builddir)/src/namestore/libgnunetnamestore.la \
91   $(top_builddir)/src/gns/libgnunetgns.la \
92   $(top_builddir)/src/testing/libgnunettesting.la
93 test_gns_simple_delegated_lookup_DEPENDENCIES = \
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/libgnunettesting.la
98
99 test_gns_simple_mx_lookup_SOURCES = \
100   test_gns_simple_mx_lookup.c
101 test_gns_simple_mx_lookup_LDADD = \
102   $(top_builddir)/src/util/libgnunetutil.la \
103   $(top_builddir)/src/namestore/libgnunetnamestore.la \
104   $(top_builddir)/src/gns/libgnunetgns.la \
105   $(top_builddir)/src/testing/libgnunettesting.la
106 test_gns_simple_mx_lookup_DEPENDENCIES = \
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/libgnunettesting.la
111
112 test_gns_simple_zkey_lookup_SOURCES = \
113   test_gns_simple_zkey_lookup.c
114 test_gns_simple_zkey_lookup_LDADD = \
115   $(top_builddir)/src/util/libgnunetutil.la \
116   $(top_builddir)/src/namestore/libgnunetnamestore.la \
117   $(top_builddir)/src/gns/libgnunetgns.la \
118   $(top_builddir)/src/testing/libgnunettesting.la
119 test_gns_simple_zkey_lookup_DEPENDENCIES = \
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/libgnunettesting.la
124
125 test_gns_dht_delegated_lookup_SOURCES = \
126   test_gns_dht_delegated_lookup.c
127 test_gns_dht_delegated_lookup_LDADD = \
128   $(top_builddir)/src/util/libgnunetutil.la \
129   $(top_builddir)/src/namestore/libgnunetnamestore.la \
130   $(top_builddir)/src/dht/libgnunetdht.la \
131   $(top_builddir)/src/gns/libgnunetgns.la \
132   $(top_builddir)/src/testing/libgnunettesting.la
133 test_gns_dht_delegated_lookup_DEPENDENCIES = \
134   $(top_builddir)/src/util/libgnunetutil.la \
135   $(top_builddir)/src/namestore/libgnunetnamestore.la \
136   $(top_builddir)/src/dht/libgnunetdht.la \
137   $(top_builddir)/src/gns/libgnunetgns.la \
138   $(top_builddir)/src/testing/libgnunettesting.la
139
140 test_gns_simple_shorten_SOURCES = \
141   test_gns_simple_shorten.c
142 test_gns_simple_shorten_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/libgnunettesting.la
147 test_gns_simple_shorten_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/libgnunettesting.la
152
153 test_gns_simple_get_authority_SOURCES = \
154   test_gns_simple_get_authority.c
155 test_gns_simple_get_authority_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/libgnunettesting.la
160 test_gns_simple_get_authority_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/libgnunettesting.la
165
166
167 test_gns_pseu_shorten_SOURCES = \
168   test_gns_pseu_shorten.c
169 test_gns_pseu_shorten_LDADD = \
170   $(top_builddir)/src/util/libgnunetutil.la \
171   $(top_builddir)/src/namestore/libgnunetnamestore.la \
172   $(top_builddir)/src/dht/libgnunetdht.la \
173   $(top_builddir)/src/gns/libgnunetgns.la \
174   $(top_builddir)/src/testing/libgnunettesting.la
175 test_gns_pseu_shorten_DEPENDENCIES = \
176   $(top_builddir)/src/util/libgnunetutil.la \
177   $(top_builddir)/src/namestore/libgnunetnamestore.la \
178   $(top_builddir)/src/dht/libgnunetdht.la \
179   $(top_builddir)/src/gns/libgnunetgns.la \
180   $(top_builddir)/src/testing/libgnunettesting.la
181
182
183 test_gns_max_queries_SOURCES = \
184   test_gns_max_queries.c
185 test_gns_max_queries_LDADD = \
186   $(top_builddir)/src/util/libgnunetutil.la \
187   $(top_builddir)/src/namestore/libgnunetnamestore.la \
188   $(top_builddir)/src/gns/libgnunetgns.la \
189   $(top_builddir)/src/testing/libgnunettesting.la
190 test_gns_max_queries_DEPENDENCIES = \
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/libgnunettesting.la
195
196 gnunet_gns_SOURCES = \
197  gnunet-gns.c
198 gnunet_gns_LDADD = \
199   $(top_builddir)/src/gns/libgnunetgns.la \
200   $(top_builddir)/src/util/libgnunetutil.la \
201   $(top_builddir)/src/namestore/libgnunetnamestore.la \
202   $(GN_LIBINTL)
203 gnunet_gns_DEPENDENCIES = \
204   libgnunetgns.la
205
206 gnunet_service_gns_SOURCES = \
207  gnunet-service-gns.c \
208  gnunet-service-gns_resolver.c \
209  gnunet-service-gns_interceptor.c
210 gnunet_service_gns_LDADD = \
211   $(top_builddir)/src/statistics/libgnunetstatistics.la \
212   $(top_builddir)/src/util/libgnunetutil.la \
213         $(top_builddir)/src/dns/libgnunetdns.la \
214         $(top_builddir)/src/dns/libgnunetdnsparser.la \
215         $(top_builddir)/src/dht/libgnunetdht.la \
216         $(top_builddir)/src/namestore/libgnunetnamestore.la \
217   $(GN_LIBINTL)
218 gnunet_service_gns_DEPENDENCIES = \
219   $(top_builddir)/src/statistics/libgnunetstatistics.la \
220   $(top_builddir)/src/util/libgnunetutil.la \
221         $(top_builddir)/src/dns/libgnunetdns.la \
222         $(top_builddir)/src/dns/libgnunetdnsparser.la \
223         $(top_builddir)/src/dht/libgnunetdht.la \
224         $(top_builddir)/src/namestore/libgnunetnamestore.la
225
226
227 gnunet_gns_fcfsd_SOURCES = \
228  gnunet-gns-fcfsd.c 
229 gnunet_gns_fcfsd_LDADD = -lmicrohttpd \
230   $(top_builddir)/src/util/libgnunetutil.la \
231   $(top_builddir)/src/namestore/libgnunetnamestore.la \
232   $(GN_LIBINTL)
233 gnunet_gns_fcfsd_DEPENDENCIES = \
234   $(top_builddir)/src/util/libgnunetutil.la \
235   $(top_builddir)/src/namestore/libgnunetnamestore.la
236
237
238 libgnunetgns_la_SOURCES = \
239  gns_api.c gns.h
240 libgnunetgns_la_LIBADD = \
241  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
242  $(top_builddir)/src/namestore/libgnunetnamestore.la
243 libgnunetgns_la_LDFLAGS = \
244   $(GN_LIB_LDFLAGS)
245 libgnunetgns_la_DEPENDENCIES = \
246  $(top_builddir)/src/util/libgnunetutil.la \
247  $(top_builddir)/src/namestore/libgnunetnamestore.la
248
249 libgnunet_plugin_block_gns_la_SOURCES = \
250   plugin_block_gns.c
251 libgnunet_plugin_block_gns_la_LIBADD = \
252   $(top_builddir)/src/util/libgnunetutil.la \
253   $(top_builddir)/src/block/libgnunetblock.la \
254   $(top_builddir)/src/namestore/libgnunetnamestore.la
255 libgnunet_plugin_block_gns_la_LDFLAGS = \
256   $(GN_PLUGIN_LDFLAGS)
257 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
258   $(top_builddir)/src/util/libgnunetutil.la \
259   $(top_builddir)/src/block/libgnunetblock.la \
260   $(top_builddir)/src/namestore/libgnunetnamestore.la
261
262 #Build stub api
263 #libgnunetnamestore_la_SOURCES = \
264 # namestore_stub_api.c
265 #libgnunetnamestore_la_LIBADD = \
266 # $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
267 #libgnunetnamestore_la_LDFLAGS = \
268 #  $(GN_LIB_LDFLAGS)
269 #libgnunetnamestore_la_DEPENDENCIES = \
270 # $(top_builddir)/src/util/libgnunetutil.la
271
272 if ENABLE_TEST_RUN
273 if LINUX
274 TESTS = $(check_PROGRAMS)
275 endif
276 endif
277
278 EXTRA_DIST = \
279   test_gns_simple_lookup.conf