reading alpha, beta from .conf
[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 LIB_GNURL=@LIBGNURL@
59 CPP_GNURL=@LIBGNURL_CPPFLAGS@
60 else
61 if HAVE_LIBCURL
62   DO_PROXY=gnunet-gns-proxy
63 LIB_GNURL=@LIBCURL@
64 CPP_GNURL=@LIBCURL_CPPFLAGS@
65 endif
66 endif
67 endif
68 endif
69
70 libexec_PROGRAMS = \
71   gnunet-service-gns \
72   $(DO_W32_HELPER) \
73   gnunet-dns2gns \
74   $(DO_PROXY)
75
76 bin_PROGRAMS = \
77   $(DO_W32_NSPTOOLS) \
78   $(DO_NONPOSIX_GNSIMPORT) \
79   gnunet-gns
80
81 if HAVE_MHD
82 if LINUX
83 bin_PROGRAMS += gnunet-bcd
84 endif
85 endif
86
87 bin_SCRIPTS = gnunet-gns-proxy-setup-ca
88
89 plugin_LTLIBRARIES = \
90   libgnunet_plugin_block_gns.la \
91   libgnunet_plugin_gnsrecord_gns.la
92
93
94 libgnunet_plugin_gnsrecord_gns_la_SOURCES = \
95   plugin_gnsrecord_gns.c
96 libgnunet_plugin_gnsrecord_gns_la_LIBADD = \
97   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
98   $(top_builddir)/src/dns/libgnunetdnsparser.la \
99   $(top_builddir)/src/util/libgnunetutil.la \
100   $(LTLIBINTL)
101 libgnunet_plugin_gnsrecord_gns_la_LDFLAGS = \
102  $(GN_PLUGIN_LDFLAGS)
103
104
105 gnunet_gns_SOURCES = \
106  gnunet-gns.c
107 gnunet_gns_LDADD = \
108   libgnunetgns.la \
109   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
110   $(top_builddir)/src/namestore/libgnunetnamestore.la \
111   $(top_builddir)/src/identity/libgnunetidentity.la \
112   $(top_builddir)/src/util/libgnunetutil.la \
113   $(GN_LIBINTL)
114
115
116 gnunet_bcd_SOURCES = \
117  gnunet-bcd.c
118 gnunet_bcd_LDADD = \
119   $(top_builddir)/src/util/libgnunetutil.la \
120   $(GN_LIBINTL) -lmicrohttpd
121
122
123 gnunet_dns2gns_SOURCES = \
124  gnunet-dns2gns.c
125 gnunet_dns2gns_LDADD = \
126   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
127   libgnunetgns.la \
128   $(top_builddir)/src/util/libgnunetutil.la \
129   $(top_builddir)/src/identity/libgnunetidentity.la \
130   $(top_builddir)/src/namestore/libgnunetnamestore.la \
131   $(top_builddir)/src/dns/libgnunetdnsparser.la \
132   $(top_builddir)/src/dns/libgnunetdnsstub.la \
133   $(GN_LIBINTL)
134
135 gnunet_gns_proxy_SOURCES = \
136  gnunet-gns-proxy.c
137 gnunet_gns_proxy_CPPFLAGS = $(AM_CPPFLAGS) $(CPP_GNURL)
138 gnunet_gns_proxy_LDADD = -lmicrohttpd $(LIB_GNURL) -lgnutls \
139   libgnunetgns.la \
140   $(top_builddir)/src/identity/libgnunetidentity.la \
141   $(top_builddir)/src/util/libgnunetutil.la \
142   $(GN_LIBINTL)
143 if HAVE_GNUTLS_DANE
144 gnunet_gns_proxy_LDADD += -lgnutls-dane
145 endif
146
147 gnunet_gns_helper_service_w32_SOURCES = \
148   gnunet-gns-helper-service-w32.c
149 gnunet_gns_helper_service_w32_LDADD = \
150   libgnunetgns.la \
151   $(top_builddir)/src/identity/libgnunetidentity.la \
152   $(top_builddir)/src/util/libgnunetutil.la \
153   $(GN_LIBINTL)
154
155 gnunet_gns_import_SOURCES = \
156   gnunet-gns-import.c
157 gnunet_gns_import_LDADD = \
158   $(top_builddir)/src/identity/libgnunetidentity.la \
159   $(top_builddir)/src/namestore/libgnunetnamestore.la \
160   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
161   $(top_builddir)/src/util/libgnunetutil.la \
162   $(GN_LIBINTL)
163
164
165 w32nsp_install_SOURCES = \
166   w32nsp-install.c
167 w32nsp_install_LDADD = -lws2_32
168
169 w32nsp_uninstall_SOURCES = \
170   w32nsp-uninstall.c
171 w32nsp_uninstall_LDADD = -lws2_32
172
173 w32nsp_resolve_SOURCES = \
174   w32nsp-resolve.c
175 w32nsp_resolve_LDADD = -lws2_32
176
177 gnunet_service_gns_SOURCES = \
178  gnunet-service-gns.c \
179  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
180  gnunet-service-gns_shorten.c gnunet-service-gns_shorten.h \
181  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h
182 gnunet_service_gns_LDADD = \
183   -lm \
184   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
185   $(top_builddir)/src/revocation/libgnunetrevocation.la \
186   $(top_builddir)/src/statistics/libgnunetstatistics.la \
187   $(top_builddir)/src/util/libgnunetutil.la \
188   $(top_builddir)/src/dns/libgnunetdns.la \
189   $(top_builddir)/src/dns/libgnunetdnsparser.la \
190   $(top_builddir)/src/dns/libgnunetdnsstub.la \
191   $(top_builddir)/src/dht/libgnunetdht.la \
192   $(top_builddir)/src/tun/libgnunettun.la \
193   $(top_builddir)/src/namecache/libgnunetnamecache.la \
194   $(top_builddir)/src/namestore/libgnunetnamestore.la \
195   $(USE_VPN) \
196   $(GN_LIBINTL)
197
198
199 libw32nsp_la_SOURCES = \
200   w32nsp.c
201 libw32nsp_la_LIBADD = \
202   -lole32 -lws2_32
203 libw32nsp_la_LDFLAGS = \
204   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
205   -no-undefined -static-libgcc
206
207 libgnunetgns_la_SOURCES = \
208  gns_api.c gns.h
209 libgnunetgns_la_LIBADD = \
210  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
211  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
212 libgnunetgns_la_LDFLAGS = \
213   $(GN_LIB_LDFLAGS)
214
215
216 libgnunet_plugin_block_gns_la_SOURCES = \
217   plugin_block_gns.c
218 libgnunet_plugin_block_gns_la_LIBADD = \
219   $(top_builddir)/src/util/libgnunetutil.la \
220   $(top_builddir)/src/block/libgnunetblock.la \
221   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
222 libgnunet_plugin_block_gns_la_LDFLAGS = \
223   $(GN_PLUGIN_LDFLAGS)
224
225
226 check_SCRIPTS = \
227   test_gns_lookup.sh \
228   test_gns_ipv6_lookup.sh\
229   test_gns_txt_lookup.sh\
230   test_gns_mx_lookup.sh \
231   test_gns_gns2dns_lookup.sh \
232   test_gns_dht_lookup.sh\
233   test_gns_delegated_lookup.sh \
234   test_gns_nick_shorten.sh\
235   test_gns_plus_lookup.sh\
236   test_gns_zkey_lookup.sh\
237   test_gns_rel_expiration.sh\
238   test_gns_soa_lookup.sh\
239   test_gns_revocation.sh\
240   test_gns_cname_lookup.sh
241
242 if ENABLE_TEST_RUN
243 if HAVE_SQLITE
244  AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
245  TESTS = $(check_SCRIPTS)
246 endif
247 endif
248