- rename
[oweals/gnunet.git] / src / gns / Makefile.am
1 AM_CPPFLAGS = -I$(top_srcdir)/src/include
2
3 if HAVE_GLIBCNSS
4 if INSTALL_NSS
5 NSS_SUBDIR = nss
6 endif
7 endif
8
9 SUBDIRS = . $(NSS_SUBDIR)
10
11 EXTRA_DIST = \
12   test_gns_defaults.conf \
13   test_gns_lookup.conf \
14   test_gns_nick_shorten.conf \
15   test_gns_proxy.conf \
16   test_gns_simple_lookup.conf \
17   gns-helper-service-w32.conf \
18   w32nsp.def \
19   gnunet-gns-proxy-setup-ca \
20   zonefiles/J7POEUT41A8PBFS7KVVDRF88GBOU4HK8PSU5QKVLVE3R9T91E99G.zkey \
21   zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \
22   zonefiles/test_zonekey \
23   $(check_SCRIPTS)
24
25 if MINGW
26   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
27   DO_W32_HELPER = gnunet-gns-helper-service-w32
28   DO_W32_NSP = libw32nsp.la
29   DO_W32_NSPTOOLS = w32nsp-install w32nsp-uninstall w32nsp-resolve
30   DO_W32_HS_CONF = gns-helper-service-w32.conf
31   DO_NONPOSIX_GNSIMPORT = gnunet-gns-import
32 endif
33 USE_VPN = $(top_builddir)/src/vpn/libgnunetvpn.la
34
35 if USE_COVERAGE
36   AM_CFLAGS = --coverage -O0
37 endif
38
39 pkgcfgdir = $(pkgdatadir)/config.d/
40
41 libexecdir= $(pkglibdir)/libexec/
42
43 plugindir = $(libdir)/gnunet
44
45 pkgcfg_DATA = \
46   gns.conf \
47   $(DO_W32_HS_CONF)
48
49 lib_LTLIBRARIES = \
50   $(DO_W32_NSP) \
51   libgnunetgns.la
52
53
54 if HAVE_MHD
55 if HAVE_GNUTLS
56 if HAVE_LIBGNURL
57   DO_PROXY=gnunet-gns-proxy
58 endif
59 endif
60 endif
61
62 libexec_PROGRAMS = \
63   gnunet-service-gns \
64   $(DO_W32_HELPER) \
65   gnunet-dns2gns \
66   $(DO_PROXY)
67
68 bin_PROGRAMS = \
69   $(DO_W32_NSPTOOLS) \
70   $(DO_NONPOSIX_GNSIMPORT) \
71   gnunet-gns
72
73 if HAVE_MHD
74 if LINUX
75 bin_PROGRAMS += gnunet-bcd
76 endif
77 endif
78
79 bin_SCRIPTS = gnunet-gns-proxy-setup-ca
80
81 plugin_LTLIBRARIES = \
82   libgnunet_plugin_block_gns.la \
83   libgnunet_plugin_gnsrecord_gns.la
84
85
86 libgnunet_plugin_gnsrecord_gns_la_SOURCES = \
87   plugin_gnsrecord_gns.c
88 libgnunet_plugin_gnsrecord_gns_la_LIBADD = \
89   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
90   $(top_builddir)/src/dns/libgnunetdnsparser.la \
91   $(top_builddir)/src/util/libgnunetutil.la \
92   $(LTLIBINTL)
93 libgnunet_plugin_gnsrecord_gns_la_LDFLAGS = \
94  $(GN_PLUGIN_LDFLAGS)
95
96
97 gnunet_gns_SOURCES = \
98  gnunet-gns.c
99 gnunet_gns_LDADD = \
100   $(top_builddir)/src/gns/libgnunetgns.la \
101   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
102   $(top_builddir)/src/namestore/libgnunetnamestore.la \
103   $(top_builddir)/src/identity/libgnunetidentity.la \
104   $(top_builddir)/src/util/libgnunetutil.la \
105   $(GN_LIBINTL)
106 gnunet_gns_DEPENDENCIES = \
107   $(top_builddir)/src/namestore/libgnunetnamestore.la \
108   $(top_builddir)/src/identity/libgnunetidentity.la \
109   $(top_builddir)/src/util/libgnunetutil.la \
110   libgnunetgns.la
111
112
113 gnunet_bcd_SOURCES = \
114  gnunet-bcd.c
115 gnunet_bcd_LDADD = \
116   $(top_builddir)/src/util/libgnunetutil.la \
117   $(GN_LIBINTL) -lmicrohttpd
118 gnunet_bcd_DEPENDENCIES = \
119   $(top_builddir)/src/util/libgnunetutil.la
120
121
122 gnunet_dns2gns_SOURCES = \
123  gnunet-dns2gns.c
124 gnunet_dns2gns_LDADD = \
125   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
126   $(top_builddir)/src/gns/libgnunetgns.la \
127   $(top_builddir)/src/util/libgnunetutil.la \
128   $(top_builddir)/src/identity/libgnunetidentity.la \
129   $(top_builddir)/src/namestore/libgnunetnamestore.la \
130   $(top_builddir)/src/dns/libgnunetdnsparser.la \
131   $(top_builddir)/src/dns/libgnunetdnsstub.la \
132   $(GN_LIBINTL)
133 gnunet_dns2gns_DEPENDENCIES = \
134   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
135   $(top_builddir)/src/util/libgnunetutil.la \
136   $(top_builddir)/src/identity/libgnunetidentity.la \
137   $(top_builddir)/src/namestore/libgnunetnamestore.la \
138   $(top_builddir)/src/dns/libgnunetdnsparser.la \
139   $(top_builddir)/src/dns/libgnunetdnsstub.la \
140   libgnunetgns.la
141
142 gnunet_gns_proxy_SOURCES = \
143  gnunet-gns-proxy.c
144 gnunet_gns_proxy_CPPFLAGS = $(AM_CPPFLAGS) $(LIBGNURL_CPPFLAGS)
145 gnunet_gns_proxy_LDADD = -lmicrohttpd $(LIBGNURL) -lgnutls \
146   $(top_builddir)/src/gns/libgnunetgns.la \
147   $(top_builddir)/src/identity/libgnunetidentity.la \
148   $(top_builddir)/src/util/libgnunetutil.la \
149   $(GN_LIBINTL)
150 if HAVE_GNUTLS_DANE
151 gnunet_gns_proxy_LDADD += -lgnutls-dane
152 endif
153 gnunet_gns_proxy_DEPENDENCIES = \
154   $(top_builddir)/src/identity/libgnunetidentity.la \
155   $(top_builddir)/src/util/libgnunetutil.la \
156   libgnunetgns.la
157
158 gnunet_gns_helper_service_w32_SOURCES = \
159   gnunet-gns-helper-service-w32.c
160 gnunet_gns_helper_service_w32_LDADD = \
161   $(top_builddir)/src/gns/libgnunetgns.la \
162   $(top_builddir)/src/identity/libgnunetidentity.la \
163   $(top_builddir)/src/util/libgnunetutil.la \
164   $(GN_LIBINTL)
165 gnunet_gns_helper_service_w32_DEPENDENCIES = \
166   $(top_builddir)/src/util/libgnunetutil.la \
167   $(top_builddir)/src/identity/libgnunetidentity.la \
168   libgnunetgns.la
169
170 gnunet_gns_import_SOURCES = \
171   gnunet-gns-import.c
172 gnunet_gns_import_LDADD = \
173   $(top_builddir)/src/identity/libgnunetidentity.la \
174   $(top_builddir)/src/namestore/libgnunetnamestore.la \
175   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
176   $(top_builddir)/src/util/libgnunetutil.la \
177   $(GN_LIBINTL)
178 gnunet_gns_import_DEPENDENCIES = \
179   $(top_builddir)/src/util/libgnunetutil.la \
180   $(top_builddir)/src/namestore/libgnunetnamestore.la \
181   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
182   $(top_builddir)/src/identity/libgnunetidentity.la
183
184 w32nsp_install_SOURCES = \
185   w32nsp-install.c
186 w32nsp_install_LDADD = -lws2_32
187
188 w32nsp_uninstall_SOURCES = \
189   w32nsp-uninstall.c
190 w32nsp_uninstall_LDADD = -lws2_32
191
192 w32nsp_resolve_SOURCES = \
193   w32nsp-resolve.c
194 w32nsp_resolve_LDADD = -lws2_32
195
196 gnunet_service_gns_SOURCES = \
197  gnunet-service-gns.c \
198  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
199  gnunet-service-gns_shorten.c gnunet-service-gns_shorten.h \
200  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h
201 gnunet_service_gns_LDADD = \
202   -lm \
203   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
204   $(top_builddir)/src/revocation/libgnunetrevocation.la \
205   $(top_builddir)/src/statistics/libgnunetstatistics.la \
206   $(top_builddir)/src/util/libgnunetutil.la \
207   $(top_builddir)/src/dns/libgnunetdns.la \
208   $(top_builddir)/src/dns/libgnunetdnsparser.la \
209   $(top_builddir)/src/dns/libgnunetdnsstub.la \
210   $(top_builddir)/src/dht/libgnunetdht.la \
211   $(top_builddir)/src/tun/libgnunettun.la \
212   $(top_builddir)/src/namecache/libgnunetnamecache.la \
213   $(top_builddir)/src/namestore/libgnunetnamestore.la \
214   $(USE_VPN) \
215   $(GN_LIBINTL)
216 gnunet_service_gns_DEPENDENCIES = \
217   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
218   $(top_builddir)/src/revocation/libgnunetrevocation.la \
219   $(top_builddir)/src/statistics/libgnunetstatistics.la \
220   $(top_builddir)/src/util/libgnunetutil.la \
221   $(top_builddir)/src/tun/libgnunettun.la \
222   $(top_builddir)/src/dns/libgnunetdns.la \
223   $(top_builddir)/src/dns/libgnunetdnsparser.la \
224   $(top_builddir)/src/dht/libgnunetdht.la \
225   $(top_builddir)/src/namestore/libgnunetnamestore.la \
226   $(USE_VPN)
227
228
229
230 libw32nsp_la_SOURCES = \
231   w32nsp.c
232 libw32nsp_la_LIBADD = \
233   -lole32 -lws2_32
234 libw32nsp_la_LDFLAGS = \
235   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
236   -no-undefined -static-libgcc
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/gnsrecord/libgnunetgnsrecord.la
243 libgnunetgns_la_LDFLAGS = \
244   $(GN_LIB_LDFLAGS)
245 libgnunetgns_la_DEPENDENCIES = \
246  $(top_builddir)/src/util/libgnunetutil.la \
247  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
248
249
250 libgnunet_plugin_block_gns_la_SOURCES = \
251   plugin_block_gns.c
252 libgnunet_plugin_block_gns_la_LIBADD = \
253   $(top_builddir)/src/util/libgnunetutil.la \
254   $(top_builddir)/src/block/libgnunetblock.la \
255   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
256 libgnunet_plugin_block_gns_la_LDFLAGS = \
257   $(GN_PLUGIN_LDFLAGS)
258 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
259   $(top_builddir)/src/util/libgnunetutil.la \
260   $(top_builddir)/src/block/libgnunetblock.la \
261   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
262
263
264 check_SCRIPTS = \
265   test_gns_lookup.sh \
266   test_gns_ipv6_lookup.sh\
267   test_gns_txt_lookup.sh\
268   test_gns_mx_lookup.sh \
269   test_gns_gns2dns_lookup.sh \
270   test_gns_dht_lookup.sh\
271   test_gns_delegated_lookup.sh \
272   test_gns_nick_shorten.sh\
273   test_gns_plus_lookup.sh\
274   test_gns_zkey_lookup.sh\
275   test_gns_rel_expiration.sh\
276   test_gns_soa_lookup.sh\
277   test_gns_revocation.sh\
278   test_gns_cname_lookup.sh
279
280 if ENABLE_TEST_RUN
281 if HAVE_SQLITE
282  AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
283  TESTS = $(check_SCRIPTS)
284 endif
285 endif
286