73898da307a71f830f7a6e05d0f83b179751e5c5
[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_simple_lookup.conf \
14   test_gns_nick_shorten.conf \
15   test_gns_dht_default.conf \
16   gns-helper-service-w32.conf \
17   gnunet-gns-proxy-setup-ca \
18   zonefiles/J7POEUT41A8PBFS7KVVDRF88GBOU4HK8PSU5QKVLVE3R9T91E99G.zkey \
19   zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \
20   zonefiles/test_zonekey \
21   $(check_SCRIPTS)
22
23 if MINGW
24   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
25   DO_W32_HELPER = gnunet-gns-helper-service-w32
26   DO_W32_NSP = libw32nsp.la
27   DO_W32_NSPTOOLS = w32nsp-install w32nsp-uninstall w32nsp-resolve
28   DO_W32_HS_CONF = gns-helper-service-w32.conf
29 endif
30 USE_VPN = $(top_builddir)/src/vpn/libgnunetvpn.la
31
32 if USE_COVERAGE
33   AM_CFLAGS = --coverage -O0
34 endif
35
36 pkgcfgdir = $(pkgdatadir)/config.d/
37
38 libexecdir= $(pkglibdir)/libexec/
39
40 plugindir = $(libdir)/gnunet
41
42 pkgcfg_DATA = \
43   gns.conf \
44   $(DO_W32_HS_CONF)
45
46 lib_LTLIBRARIES = \
47   $(DO_W32_NSP) \
48   libgnunetgns.la
49
50
51 if HAVE_MHD
52 if HAVE_GNUTLS
53 if HAVE_LIBGNURL
54   DO_PROXY=gnunet-gns-proxy
55 endif
56 endif
57 endif
58
59 libexec_PROGRAMS = \
60   gnunet-service-gns \
61   $(DO_W32_HELPER) \
62   gnunet-dns2gns \
63   $(DO_PROXY)
64
65 bin_PROGRAMS = \
66   $(DO_W32_NSPTOOLS) \
67   gnunet-gns
68
69 bin_SCRIPTS = gnunet-gns-proxy-setup-ca
70
71 plugin_LTLIBRARIES = \
72   libgnunet_plugin_block_gns.la \
73   libgnunet_plugin_gnsrecord_gns.la
74
75
76 libgnunet_plugin_gnsrecord_gns_la_SOURCES = \
77   plugin_gnsrecord_gns.c
78 libgnunet_plugin_gnsrecord_gns_la_LIBADD = \
79   $(top_builddir)/src/dns/libgnunetdnsparser.la \
80   $(top_builddir)/src/util/libgnunetutil.la \
81   $(LTLIBINTL)
82 libgnunet_plugin_gnsrecord_gns_la_LDFLAGS = \
83  $(GN_PLUGIN_LDFLAGS)
84
85
86 gnunet_gns_SOURCES = \
87  gnunet-gns.c
88 gnunet_gns_LDADD = \
89   $(top_builddir)/src/gns/libgnunetgns.la \
90   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
91   $(top_builddir)/src/namestore/libgnunetnamestore.la \
92   $(top_builddir)/src/identity/libgnunetidentity.la \
93   $(top_builddir)/src/util/libgnunetutil.la \
94   $(GN_LIBINTL)
95 gnunet_gns_DEPENDENCIES = \
96   $(top_builddir)/src/namestore/libgnunetnamestore.la \
97   $(top_builddir)/src/identity/libgnunetidentity.la \
98   $(top_builddir)/src/util/libgnunetutil.la \
99   libgnunetgns.la
100
101 gnunet_dns2gns_SOURCES = \
102  gnunet-dns2gns.c
103 gnunet_dns2gns_LDADD = \
104   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
105   $(top_builddir)/src/gns/libgnunetgns.la \
106   $(top_builddir)/src/util/libgnunetutil.la \
107   $(top_builddir)/src/identity/libgnunetidentity.la \
108   $(top_builddir)/src/namestore/libgnunetnamestore.la \
109   $(top_builddir)/src/dns/libgnunetdnsparser.la \
110   $(top_builddir)/src/dns/libgnunetdnsstub.la \
111   $(GN_LIBINTL)
112 gnunet_dns2gns_DEPENDENCIES = \
113   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
114   $(top_builddir)/src/util/libgnunetutil.la \
115   $(top_builddir)/src/identity/libgnunetidentity.la \
116   $(top_builddir)/src/namestore/libgnunetnamestore.la \
117   $(top_builddir)/src/dns/libgnunetdnsparser.la \
118   $(top_builddir)/src/dns/libgnunetdnsstub.la \
119   libgnunetgns.la
120
121 gnunet_gns_proxy_SOURCES = \
122  gnunet-gns-proxy.c
123 gnunet_gns_proxy_LDADD = -lmicrohttpd -lgnurl -lgnutls \
124   $(top_builddir)/src/gns/libgnunetgns.la \
125   $(top_builddir)/src/identity/libgnunetidentity.la \
126   $(top_builddir)/src/util/libgnunetutil.la \
127   $(GN_LIBINTL)
128 if HAVE_GNUTLS_DANE
129 gnunet_gns_proxy_LDADD += -lgnutls-dane
130 endif
131 gnunet_gns_proxy_DEPENDENCIES = \
132   $(top_builddir)/src/identity/libgnunetidentity.la \
133   $(top_builddir)/src/util/libgnunetutil.la \
134   libgnunetgns.la
135
136 gnunet_gns_helper_service_w32_SOURCES = \
137   gnunet-gns-helper-service-w32.c
138 gnunet_gns_helper_service_w32_LDADD = \
139   $(top_builddir)/src/gns/libgnunetgns.la \
140   $(top_builddir)/src/util/libgnunetutil.la \
141   $(GN_LIBINTL)
142 gnunet_gns_helper_service_w32_DEPENDENCIES = \
143   $(top_builddir)/src/util/libgnunetutil.la \
144   libgnunetgns.la
145
146 w32nsp_install_SOURCES = \
147   w32nsp-install.c
148 w32nsp_install_LDADD = -lws2_32
149
150 w32nsp_uninstall_SOURCES = \
151   w32nsp-uninstall.c
152 w32nsp_uninstall_LDADD = -lws2_32
153
154 w32nsp_resolve_SOURCES = \
155   w32nsp-resolve.c
156 w32nsp_resolve_LDADD = -lws2_32
157
158 gnunet_service_gns_SOURCES = \
159  gnunet-service-gns.c \
160  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
161  gnunet-service-gns_shorten.c gnunet-service-gns_shorten.h \
162  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h
163 gnunet_service_gns_LDADD = \
164   -lm \
165   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
166   $(top_builddir)/src/revocation/libgnunetrevocation.la \
167   $(top_builddir)/src/statistics/libgnunetstatistics.la \
168   $(top_builddir)/src/util/libgnunetutil.la \
169   $(top_builddir)/src/dns/libgnunetdns.la \
170   $(top_builddir)/src/dns/libgnunetdnsparser.la \
171   $(top_builddir)/src/dns/libgnunetdnsstub.la \
172   $(top_builddir)/src/dht/libgnunetdht.la \
173   $(top_builddir)/src/namecache/libgnunetnamecache.la \
174   $(top_builddir)/src/namestore/libgnunetnamestore.la \
175   $(USE_VPN) \
176   $(GN_LIBINTL)
177 gnunet_service_gns_DEPENDENCIES = \
178   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
179   $(top_builddir)/src/revocation/libgnunetrevocation.la \
180   $(top_builddir)/src/statistics/libgnunetstatistics.la \
181   $(top_builddir)/src/util/libgnunetutil.la \
182   $(top_builddir)/src/dns/libgnunetdns.la \
183   $(top_builddir)/src/dns/libgnunetdnsparser.la \
184   $(top_builddir)/src/dht/libgnunetdht.la \
185   $(top_builddir)/src/namestore/libgnunetnamestore.la \
186   $(USE_VPN)
187
188
189
190 libw32nsp_la_SOURCES = \
191   w32nsp.c
192 libw32nsp_la_LIBADD = \
193   -lole32 -lws2_32
194 libw32nsp_la_LDFLAGS = \
195   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
196   $(GN_LIB_LDFLAGS)
197
198 libgnunetgns_la_SOURCES = \
199  gns_api.c gns.h
200 libgnunetgns_la_LIBADD = \
201  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
202  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
203 libgnunetgns_la_LDFLAGS = \
204   $(GN_LIB_LDFLAGS)
205 libgnunetgns_la_DEPENDENCIES = \
206  $(top_builddir)/src/util/libgnunetutil.la \
207  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
208
209
210 libgnunet_plugin_block_gns_la_SOURCES = \
211   plugin_block_gns.c
212 libgnunet_plugin_block_gns_la_LIBADD = \
213   $(top_builddir)/src/util/libgnunetutil.la \
214   $(top_builddir)/src/block/libgnunetblock.la \
215   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
216 libgnunet_plugin_block_gns_la_LDFLAGS = \
217   $(GN_PLUGIN_LDFLAGS)
218 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
219   $(top_builddir)/src/util/libgnunetutil.la \
220   $(top_builddir)/src/block/libgnunetblock.la \
221   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
222
223
224 check_SCRIPTS = \
225   test_gns_lookup.sh \
226   test_gns_ipv6_lookup.sh\
227   test_gns_txt_lookup.sh\
228   test_gns_mx_lookup.sh \
229   test_gns_gns2dns_lookup.sh \
230   test_gns_dht_lookup.sh\
231   test_gns_delegated_lookup.sh \
232   test_gns_nick_shorten.sh\
233   test_gns_plus_lookup.sh\
234   test_gns_zkey_lookup.sh\
235   test_gns_rel_expiration.sh\
236   test_gns_soa_lookup.sh\
237   test_gns_revocation.sh\
238   test_gns_cname_lookup.sh
239
240 if ENABLE_TEST_RUN
241 if HAVE_SQLITE
242  TESTS = $(check_SCRIPTS)
243 endif
244 endif
245