]> git.ipfire.org Git - thirdparty/pdns.git/blame - pdns/recursordist/Makefile.am
Merge pull request #5236 from rgacogne/rec-doresolveat-refactor
[thirdparty/pdns.git] / pdns / recursordist / Makefile.am
CommitLineData
23448838 1JSON11_LIBS = $(top_srcdir)/ext/json11/libjson11.la
0c6f6275 2
d705aad9 3AM_CPPFLAGS = $(LUA_CFLAGS) $(YAHTTP_CFLAGS) $(BOOST_CPPFLAGS) $(BOTAN110_CFLAGS) $(NET_SNMP_CFLAGS) $(SANITIZER_FLAGS) -O3 -Wall -pthread -DSYSCONFDIR=\"${sysconfdir}\" $(SYSTEMD_CFLAGS)
0c6f6275
PL
4
5AM_CPPFLAGS += \
6 -I$(top_srcdir)/ext/json11 \
7 -I$(top_srcdir)/ext/rapidjson/include \
aac75773 8 $(YAHTTP_CFLAGS) \
74d83458 9 $(LIBCRYPTO_INCLUDES)
0c6f6275
PL
10
11AM_CXXFLAGS = \
12 -DSYSCONFDIR=\"$(sysconfdir)\" \
13 -DPKGLIBDIR=\"$(pkglibdir)\" \
14 -DLOCALSTATEDIR=\"$(socketdir)\"
15
16AM_LDFLAGS = \
17 $(PROGRAM_LDFLAGS) \
18 $(THREADFLAGS)
19
20ACLOCAL_AMFLAGS = -I m4
21
56872c22
PL
22BUILT_SOURCES=htmlfiles.h \
23 dnslabeltext.cc
24
48a44e8b
PL
25CLEANFILES = htmlfiles.h \
26 dnsmessage.pb.cc \
27 dnsmessage.pb.h
642339d8 28
29htmlfiles.h: html/*
30 ./incfiles > $@
31
0c6f6275
PL
32SUBDIRS=ext
33
34if LUA
35AM_CPPFLAGS +=$(LUA_CFLAGS)
36endif
37
38EXTRA_DIST = \
4554ba6e 39 NOTICE \
0c6f6275 40 .version \
0e9cbfc2 41 botan110signers.cc \
10f702ce 42 build-aux/gen-version \
7676c316 43 contrib/* \
0c6f6275
PL
44 devpollmplexer.cc \
45 dnslabeltext.cc \
46 dnslabeltext.rl \
aa7929a3 47 dnsmessage.proto \
0c6f6275
PL
48 effective_tld_names.dat \
49 epollmplexer.cc \
50 kqueuemplexer.cc \
e10b6528 51 lua_hpp.mk \
0c6f6275 52 malloctrace.cc malloctrace.hh \
265ff1c3 53 mkpubsuffixcc \
0c6f6275 54 mtasker.cc \
a7303306 55 mtasker_fcontext.cc mtasker_ucontext.cc \
0c6f6275
PL
56 opensslsigners.hh opensslsigners.cc \
57 pdns_recursor.1.md \
58 portsmplexer.cc \
7496549d 59 rec_control.1.md \
218feb9d 60 rrd/* \
4ff58b75
PL
61 html incfiles \
62 pdns-recursor.service.in
0c6f6275
PL
63
64sbin_PROGRAMS = pdns_recursor
65bin_PROGRAMS = rec_control
66
35d883a8
RG
67if UNIT_TESTS
68noinst_PROGRAMS = testrunner
69TESTS_ENVIRONMENT = env BOOST_TEST_LOG_LEVEL=message SRCDIR='$(srcdir)'
70TESTS=testrunner
71else
72check-local:
73 @echo "Unit tests are not enabled"
74 @echo "Run ./configure --enable-unit-tests"
75endif
76
0c6f6275
PL
77pdns_recursor_SOURCES = \
78 arguments.cc \
6ee9a5a2 79 ascii.hh \
0c6f6275
PL
80 base32.cc base32.hh \
81 base64.cc base64.hh \
82 cachecleaner.hh \
83 comment.hh \
84 dns.hh dns.cc \
85 dns_random.hh dns_random.cc \
86 dnsbackend.hh \
87 dnslabeltext.cc \
88 dnsname.cc dnsname.hh \
89 dnspacket.hh \
90 dnsparser.hh dnsparser.cc \
91 dnsrecords.cc dnsrecords.hh \
92 dnssecinfra.hh dnssecinfra.cc \
93 dnsseckeeper.hh \
94 dnswriter.cc dnswriter.hh \
5c3b5e7f 95 ednsoptions.cc ednsoptions.hh \
0c6f6275
PL
96 ednssubnet.cc ednssubnet.hh \
97 filterpo.cc filterpo.hh \
85c7ca75 98 gettime.cc gettime.hh \
0c6f6275
PL
99 gss_context.cc gss_context.hh \
100 iputils.hh iputils.cc \
101 ixfr.cc ixfr.hh \
102 json.cc json.hh \
5cf909f3 103 lazy_allocator.hh \
0c6f6275
PL
104 lock.hh \
105 logger.hh logger.cc \
106 lua-recursor4.cc lua-recursor4.hh \
107 lwres.cc lwres.hh \
108 misc.hh misc.cc \
109 mplexer.hh \
110 mtasker.hh \
5ab14378 111 mtasker_context.cc mtasker_context.hh \
0c6f6275 112 namespaces.hh \
39ce10b2 113 negcache.hh negcache.cc \
0c6f6275 114 nsecrecords.cc \
04c74848 115 opensslsigners.cc opensslsigners.hh \
bf269e28 116 packetcache.hh \
0c6f6275
PL
117 pdns_recursor.cc \
118 pdnsexception.hh \
d9d3f9c1 119 protobuf.cc protobuf.hh \
0c6f6275
PL
120 pubsuffix.hh pubsuffix.cc \
121 qtype.hh qtype.cc \
122 randomhelper.cc \
123 rcpgenerator.cc rcpgenerator.hh \
124 rec-carbon.cc \
125 rec-lua-conf.hh rec-lua-conf.cc \
d9d3f9c1 126 rec-protobuf.cc rec-protobuf.hh \
d705aad9 127 rec-snmp.hh rec-snmp.cc \
0c6f6275
PL
128 rec_channel.cc rec_channel.hh \
129 rec_channel_rec.cc \
130 recpacketcache.cc recpacketcache.hh \
131 recursor_cache.cc recursor_cache.hh \
132 reczones.cc \
aa7929a3 133 remote_logger.cc remote_logger.hh \
0c6f6275 134 resolver.hh resolver.cc \
4898a348 135 resolve-context.hh \
0c6f6275 136 responsestats.hh responsestats.cc \
10c96475 137 root-addresses.hh \
f2234140 138 root-dnssec.hh \
0c6f6275
PL
139 rpzloader.cc rpzloader.hh \
140 secpoll-recursor.cc \
141 secpoll-recursor.hh \
142 selectmplexer.cc \
143 sholder.hh \
144 sillyrecords.cc \
d705aad9 145 snmp-agent.hh snmp-agent.cc \
0c6f6275
PL
146 sortlist.cc sortlist.hh \
147 sstuff.hh \
0c6f6275 148 syncres.cc syncres.hh \
60a1c204 149 tsigverifier.cc tsigverifier.hh \
0c6f6275
PL
150 ueberbackend.hh \
151 unix_utility.cc \
152 utility.hh \
153 validate.cc validate.hh validate-recursor.cc validate-recursor.hh \
154 version.cc version.hh \
155 webserver.cc webserver.hh \
156 ws-api.cc ws-api.hh \
157 ws-recursor.cc ws-recursor.hh \
158 zoneparser-tng.cc zoneparser-tng.hh
159
e10b6528
PL
160if !HAVE_LUA_HPP
161BUILT_SOURCES += lua.hpp
162nodist_pdns_recursor_SOURCES = lua.hpp
163CLEANFILES += lua.hpp
164endif
165
0c6f6275
PL
166pdns_recursor_LDADD = \
167 $(YAHTTP_LIBS) \
04c74848 168 $(JSON11_LIBS) \
74d83458 169 $(LIBCRYPTO_LIBS) \
6b6720de 170 $(BOOST_CONTEXT_LIBS) \
d705aad9 171 $(NET_SNMP_LIBS) \
21b338e8
PD
172 $(SYSTEMD_LIBS) \
173 $(RT_LIBS)
0c6f6275 174
04c74848 175pdns_recursor_LDFLAGS = $(AM_LDFLAGS) \
01f097e4 176 $(LIBCRYPTO_LDFLAGS) $(BOOST_CONTEXT_LDFLAGS)
0c6f6275 177
35d883a8
RG
178testrunner_SOURCES = \
179 arguments.cc \
180 base32.cc \
181 base64.cc base64.hh \
182 dns.cc dns.hh \
30ee601a 183 dns_random.cc dns_random.hh \
35d883a8
RG
184 dnslabeltext.cc \
185 dnsname.cc dnsname.hh \
186 dnsparser.hh dnsparser.cc \
187 dnsrecords.cc \
188 dnssecinfra.cc \
189 dnswriter.cc dnswriter.hh \
00b8cadc 190 ednscookies.cc ednscookies.hh \
35d883a8
RG
191 ednsoptions.cc ednsoptions.hh \
192 ednssubnet.cc ednssubnet.hh \
30ee601a 193 filterpo.cc filterpo.hh \
35d883a8
RG
194 gettime.cc gettime.hh \
195 gss_context.cc gss_context.hh \
196 iputils.cc iputils.hh \
197 logger.cc logger.hh \
198 misc.cc misc.hh \
39ce10b2 199 negcache.hh negcache.cc \
35d883a8
RG
200 namespaces.hh \
201 nsecrecords.cc \
202 pdnsexception.hh \
203 protobuf.cc protobuf.hh \
204 qtype.cc qtype.hh \
30ee601a 205 randomhelper.cc \
35d883a8 206 rcpgenerator.cc \
35d883a8 207 rec-protobuf.cc rec-protobuf.hh \
30ee601a
RG
208 recpacketcache.cc recpacketcache.hh \
209 recursor_cache.cc recursor_cache.hh \
35d883a8 210 responsestats.cc \
30ee601a 211 root-dnssec.hh \
35d883a8
RG
212 sillyrecords.cc \
213 sholder.hh \
214 sstuff.hh \
30ee601a 215 syncres.cc syncres.hh \
35d883a8
RG
216 test-arguments_cc.cc \
217 test-base32_cc.cc \
218 test-base64_cc.cc \
219 test-dnsrecordcontent.cc \
220 test-dns_random_hh.cc \
221 test-dnsname_cc.cc \
222 test-dnsparser_hh.cc \
223 test-dnsrecords_cc.cc \
00b8cadc 224 test-ednsoptions_cc.cc \
35d883a8
RG
225 test-iputils_hh.cc \
226 test-misc_hh.cc \
227 test-nmtree.cc \
c8cb955a 228 test-negcache_cc.cc \
35d883a8
RG
229 test-rcpgenerator_cc.cc \
230 test-recpacketcache_cc.cc \
941db220 231 test-recursorcache_cc.cc \
30ee601a 232 test-syncres_cc.cc \
35d883a8
RG
233 test-tsig.cc \
234 testrunner.cc \
235 unix_utility.cc \
30ee601a
RG
236 validate.cc validate.hh \
237 validate-recursor.cc validate-recursor.hh \
35d883a8
RG
238 zoneparser-tng.cc zoneparser-tng.hh
239
240testrunner_LDFLAGS = \
241 $(AM_LDFLAGS) \
242 $(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) \
243 $(LIBCRYPTO_LDFLAGS)
244
245testrunner_LDADD = \
246 $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) \
247 $(LIBCRYPTO_LIBS) \
248 $(RT_LIBS)
249
0c6f6275
PL
250if BOTAN110
251pdns_recursor_SOURCES += \
0e9cbfc2 252 botan110signers.cc
0c6f6275
PL
253pdns_recursor_LDADD += $(BOTAN110_LIBS)
254endif
255
d1b28475
KM
256if LIBSODIUM
257pdns_recursor_SOURCES += \
258 sodiumsigners.cc
259pdns_recursor_LDADD += $(LIBSODIUM_LIBS)
260endif
261
0c6f6275
PL
262if MALLOC_TRACE
263pdns_recursor_SOURCES += \
264 malloctrace.cc \
265 malloctrace.hh
266pdns_recursor_LDFLAGS += -rdynamic
267endif
268
269if LUA
270pdns_recursor_LDADD += $(LUA_LIBS)
271endif
272
273if HAVE_FREEBSD
274pdns_recursor_SOURCES += kqueuemplexer.cc
275endif
276
277if HAVE_LINUX
278pdns_recursor_SOURCES += epollmplexer.cc
279endif
280
281if HAVE_SOLARIS
282pdns_recursor_SOURCES += \
283 devpollmplexer.cc \
284 portsmplexer.cc
285endif
286
48a44e8b
PL
287if HAVE_PROTOBUF
288if HAVE_PROTOC
aa7929a3 289dnsmessage.pb.cc: dnsmessage.proto
48a44e8b 290 $(AM_V_GEN)$(PROTOC) --cpp_out=./ $<
aa7929a3 291
aa7929a3
RG
292BUILT_SOURCES += dnsmessage.pb.cc
293pdns_recursor_LDADD += $(PROTOBUF_LIBS)
294nodist_pdns_recursor_SOURCES = dnsmessage.pb.cc dnsmessage.pb.h
48a44e8b 295pdns_recursor.$(OBJEXT): dnsmessage.pb.cc
35d883a8
RG
296
297nodist_testrunner_SOURCES = dnsmessage.pb.cc dnsmessage.pb.h
298testrunner_LDADD += $(PROTOBUF_LIBS)
299testrunner$(OBJEXT): dnsmessage.pb.cc
300
48a44e8b 301endif
aa7929a3
RG
302endif
303
0c6f6275
PL
304rec_control_SOURCES = \
305 arguments.cc arguments.hh \
306 dnsname.hh dnsname.cc \
307 dnslabeltext.cc \
308 logger.cc \
309 misc.cc \
310 qtype.cc \
311 rec_channel.cc rec_channel.hh \
312 rec_control.cc \
0c6f6275
PL
313 unix_utility.cc
314
315dnslabeltext.cc: dnslabeltext.rl
316 $(AM_V_GEN)$(RAGEL) $< -o dnslabeltext.cc
317
318curl_verbose = $(curl_verbose_$(V))
319curl_verbose_ = $(curl_verbose_$(AM_DEFAULT_VERBOSITY))
320curl_verbose_0 = @echo " CURL " $@;
321$(srcdir)/effective_tld_names.dat:
2603a63d 322 $(curl_verbose)if ! curl -s -S https://publicsuffix.org/list/public_suffix_list.dat > $@; then rm -f $@; exit 1; fi
0c6f6275
PL
323
324pubsuffix.cc: $(srcdir)/effective_tld_names.dat
325 $(AM_V_GEN)./mkpubsuffixcc
326
2f0d6d58
PL
327## Config file
328sysconf_DATA = recursor.conf-dist
329
330recursor.conf-dist: pdns_recursor
331 $(AM_V_GEN)./pdns_recursor --config > $@
332
333## Manpages
0c6f6275
PL
334MANPAGES=pdns_recursor.1 \
335 rec_control.1
336
66cc0eec
KM
337if HAVE_PANDOC
338 dist_man_MANS=$(MANPAGES)
339endif
340if HAVE_MANPAGES
341 dist_man_MANS=$(MANPAGES)
342endif
0c6f6275
PL
343
344if HAVE_PANDOC
345$(MANPAGES): %: %.md
346 $(AM_V_GEN)$(PANDOC) -s -t man $< -o $@
347else
0c6f6275
PL
348$(MANPAGES):
349 echo "You need pandoc to generate the manpages"
350 exit 1
351endif
4ff58b75
PL
352
353if HAVE_SYSTEMD
354pdns-recursor.service: pdns-recursor.service.in
355 $(AM_V_GEN)sed -e 's![@]sbindir[@]!$(sbindir)!' < $< > $@
356
a67f98c2
PL
357pdns-recursor@.service: pdns-recursor.service
358 $(AM_V_GEN)sed -e 's!/pdns_recursor!& --config-name=%i!' \
359 -e 's!Recursor!& %i!' \
360 < $< > $@
361
4ff58b75
PL
362systemdsystemunitdir = $(SYSTEMD_DIR)
363
364systemdsystemunit_DATA = \
a67f98c2
PL
365 pdns-recursor.service \
366 pdns-recursor@.service
4ff58b75 367endif
e10b6528
PL
368
369if !HAVE_LUA_HPP
370include lua_hpp.mk
371endif