7a3bb561690a756818457034c57cafaf0bbd74b5
[oweals/gnunet.git] / src / gns / Makefile.am
1 AM_CPPFLAGS = -I$(top_srcdir)/src/include
2
3 if HAVE_GLIBCNSS
4 NSS_SUBDIR = nss
5 endif
6
7 SUBDIRS = . $(NSS_SUBDIR)
8
9 EXTRA_DIST = \
10   test_gns_defaults.conf \
11   test_gns_simple_lookup.conf \
12   test_gns_dht_default.conf \
13   gns-helper-service-w32.conf \
14   gnunet-gns-proxy-setup-ca \
15   zonefiles/J7POEUT41A8PBFS7KVVDRF88GBOU4HK8PSU5QKVLVE3R9T91E99G.zkey \
16   zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \
17   zonefiles/test_zonekey \
18   $(check_SCRIPTS)
19
20 if MINGW
21   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
22   DO_W32_HELPER = gnunet-gns-helper-service-w32
23   DO_W32_NSP = libw32nsp.la
24   DO_W32_NSPTOOLS = w32nsp-install w32nsp-uninstall w32nsp-resolve
25   DO_W32_HS_CONF = gns-helper-service-w32.conf
26 endif
27 USE_VPN = $(top_builddir)/src/vpn/libgnunetvpn.la
28
29 if USE_COVERAGE
30   AM_CFLAGS = --coverage -O0
31 endif
32
33 pkgcfgdir = $(pkgdatadir)/config.d/
34
35 libexecdir= $(pkglibdir)/libexec/
36
37 plugindir = $(libdir)/gnunet
38
39 pkgcfg_DATA = \
40   gns.conf \
41   $(DO_W32_HS_CONF)
42
43 lib_LTLIBRARIES = \
44   $(DO_W32_NSP) \
45   libgnunetgns.la
46
47
48 if HAVE_MHD
49 if HAVE_GNUTLS
50 if HAVE_LIBCURL
51 # DO_PROXY=gnunet-gns-proxy
52 endif
53 endif
54 endif
55
56 libexec_PROGRAMS = \
57   gnunet-service-gns \
58   $(DO_W32_HELPER) \
59   gnunet-dns2gns 
60 #  $(DO_PROXY) 
61
62 bin_PROGRAMS = \
63   $(DO_W32_NSPTOOLS) \
64   gnunet-gns 
65
66 bin_SCRIPTS = gnunet-gns-proxy-setup-ca
67
68 plugin_LTLIBRARIES = \
69   libgnunet_plugin_block_gns.la
70
71 gnunet_gns_SOURCES = \
72  gnunet-gns.c
73 gnunet_gns_LDADD = \
74   $(top_builddir)/src/gns/libgnunetgns.la \
75   $(top_builddir)/src/namestore/libgnunetnamestore.la \
76   $(top_builddir)/src/identity/libgnunetidentity.la \
77   $(top_builddir)/src/util/libgnunetutil.la \
78   $(GN_LIBINTL)
79 gnunet_gns_DEPENDENCIES = \
80   $(top_builddir)/src/namestore/libgnunetnamestore.la \
81   $(top_builddir)/src/identity/libgnunetidentity.la \
82   $(top_builddir)/src/util/libgnunetutil.la \
83   libgnunetgns.la
84
85 gnunet_dns2gns_SOURCES = \
86  gnunet-dns2gns.c
87 gnunet_dns2gns_LDADD = \
88   $(top_builddir)/src/gns/libgnunetgns.la \
89   $(top_builddir)/src/util/libgnunetutil.la \
90   $(top_builddir)/src/identity/libgnunetidentity.la \
91   $(top_builddir)/src/namestore/libgnunetnamestore.la \
92   $(top_builddir)/src/dns/libgnunetdnsparser.la \
93   $(top_builddir)/src/dns/libgnunetdnsstub.la \
94   $(GN_LIBINTL)
95 gnunet_dns2gns_DEPENDENCIES = \
96   $(top_builddir)/src/util/libgnunetutil.la \
97   $(top_builddir)/src/identity/libgnunetidentity.la \
98   $(top_builddir)/src/namestore/libgnunetnamestore.la \
99   $(top_builddir)/src/dns/libgnunetdnsparser.la \
100   $(top_builddir)/src/dns/libgnunetdnsstub.la \
101   libgnunetgns.la
102
103 gnunet_gns_proxy_SOURCES = \
104  gnunet-gns-proxy.c 
105 gnunet_gns_proxy_LDADD = -lmicrohttpd -lcurl -lgnutls \
106   $(top_builddir)/src/gns/libgnunetgns.la \
107   $(top_builddir)/src/identity/libgnunetidentity.la \
108   $(top_builddir)/src/util/libgnunetutil.la \
109   $(GN_LIBINTL)
110 gnunet_gns_proxy_DEPENDENCIES = \
111   $(top_builddir)/src/identity/libgnunetidentity.la \
112   $(top_builddir)/src/util/libgnunetutil.la \
113   libgnunetgns.la
114
115 gnunet_gns_helper_service_w32_SOURCES = \
116   gnunet-gns-helper-service-w32.c
117 gnunet_gns_helper_service_w32_LDADD = \
118   $(top_builddir)/src/gns/libgnunetgns.la \
119   $(top_builddir)/src/util/libgnunetutil.la \
120   $(GN_LIBINTL)
121 gnunet_gns_helper_service_w32_DEPENDENCIES = \
122   $(top_builddir)/src/util/libgnunetutil.la \
123   libgnunetgns.la
124
125 w32nsp_install_SOURCES = \
126   w32nsp-install.c
127 w32nsp_install_LDADD = -lws2_32
128
129 w32nsp_uninstall_SOURCES = \
130   w32nsp-uninstall.c
131 w32nsp_uninstall_LDADD = -lws2_32
132
133 w32nsp_resolve_SOURCES = \
134   w32nsp-resolve.c
135 w32nsp_resolve_LDADD = -lws2_32
136
137 gnunet_service_gns_SOURCES = \
138  gnunet-service-gns.c \
139  gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
140  gnunet-service-gns_shorten.c gnunet-service-gns_shorten.h \
141  gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h 
142 gnunet_service_gns_LDADD = \
143   -lm \
144   $(top_builddir)/src/statistics/libgnunetstatistics.la \
145   $(top_builddir)/src/util/libgnunetutil.la \
146   $(top_builddir)/src/dns/libgnunetdns.la \
147   $(top_builddir)/src/dns/libgnunetdnsparser.la \
148   $(top_builddir)/src/dns/libgnunetdnsstub.la \
149   $(top_builddir)/src/dht/libgnunetdht.la \
150   $(top_builddir)/src/namestore/libgnunetnamestore.la \
151   $(USE_VPN) \
152   $(GN_LIBINTL)
153 gnunet_service_gns_DEPENDENCIES = \
154   $(top_builddir)/src/statistics/libgnunetstatistics.la \
155   $(top_builddir)/src/util/libgnunetutil.la \
156   $(top_builddir)/src/dns/libgnunetdns.la \
157   $(top_builddir)/src/dns/libgnunetdnsparser.la \
158   $(top_builddir)/src/dht/libgnunetdht.la \
159   $(top_builddir)/src/namestore/libgnunetnamestore.la \
160   $(USE_VPN)
161
162
163
164 libw32nsp_la_SOURCES = \
165   w32nsp.c
166 libw32nsp_la_LIBADD = \
167   -lole32 -lws2_32
168 libw32nsp_la_LDFLAGS = \
169   -export-symbols $(top_srcdir)/src/gns/w32nsp.def \
170   $(GN_LIB_LDFLAGS)
171
172 libgnunetgns_la_SOURCES = \
173  gns_api.c gns.h
174 libgnunetgns_la_LIBADD = \
175  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
176  $(top_builddir)/src/namestore/libgnunetnamestore.la
177 libgnunetgns_la_LDFLAGS = \
178   $(GN_LIB_LDFLAGS)
179 libgnunetgns_la_DEPENDENCIES = \
180  $(top_builddir)/src/util/libgnunetutil.la \
181  $(top_builddir)/src/namestore/libgnunetnamestore.la
182
183
184 libgnunet_plugin_block_gns_la_SOURCES = \
185   plugin_block_gns.c
186 libgnunet_plugin_block_gns_la_LIBADD = \
187   $(top_builddir)/src/util/libgnunetutil.la \
188   $(top_builddir)/src/block/libgnunetblock.la \
189   $(top_builddir)/src/namestore/libgnunetnamestore.la
190 libgnunet_plugin_block_gns_la_LDFLAGS = \
191   $(GN_PLUGIN_LDFLAGS)
192 libgnunet_plugin_block_gns_la_DEPENDENCIES = \
193   $(top_builddir)/src/util/libgnunetutil.la \
194   $(top_builddir)/src/block/libgnunetblock.la \
195   $(top_builddir)/src/namestore/libgnunetnamestore.la
196
197
198 check_SCRIPTS = \
199   test_gns_delegated_lookup.sh \
200   test_gns_lookup.sh \
201   test_gns_ipv6_lookup.sh\
202   test_gns_txt_lookup.sh\
203   test_gns_mx_lookup.sh \
204   test_gns_ns_lookup.sh \
205   test_gns_cname_lookup.sh 
206
207 if ENABLE_TEST_RUN
208 if HAVE_SQLITE
209  TESTS = $(check_SCRIPTS)
210 endif
211 endif
212