1 JSON11_LIBS = $(top_srcdir)/ext/json11/libjson11.la
2 PROBDS_LIBS = $(top_srcdir)/ext/probds/libprobds.la
4 AM_CPPFLAGS = $(LUA_CFLAGS) $(YAHTTP_CFLAGS) $(BOOST_CPPFLAGS) $(LIBSODIUM_CFLAGS) $(NET_SNMP_CFLAGS) $(LIBCAP_CFLAGS) $(SANITIZER_FLAGS) -O3 -Wall -pthread -DSYSCONFDIR=\"${sysconfdir}\" $(SYSTEMD_CFLAGS)
7 -I$(top_srcdir)/ext/json11 \
12 -DSYSCONFDIR=\"$(sysconfdir)\" \
13 -DPKGLIBDIR=\"$(pkglibdir)\" \
14 -DLOCALSTATEDIR=\"$(socketdir)\"
18 -DNODCACHEDIR=\"$(nodcachedir)\"
25 ACLOCAL_AMFLAGS = -I m4
27 BUILT_SOURCES=htmlfiles.h \
30 CLEANFILES = htmlfiles.h \
41 AM_CPPFLAGS +=$(LUA_CFLAGS)
51 effective_tld_names.dat \
55 malloctrace.cc malloctrace.hh \
58 mtasker_fcontext.cc mtasker_ucontext.cc \
60 opensslsigners.hh opensslsigners.cc \
65 pdns-recursor.service.in \
67 builder-support/gen-version
70 for file in $$(find $(distdir)/docs -type l); do \
71 t=`stat -c%N $$file | awk '{print $$NF}' | sed "s/'//g"` ; \
72 ln -fs ../$$t $$file; \
75 sbin_PROGRAMS = pdns_recursor
76 bin_PROGRAMS = rec_control
81 noinst_PROGRAMS = testrunner
82 TESTS_ENVIRONMENT = env BOOST_TEST_LOG_LEVEL=message SRCDIR='$(srcdir)'
86 @echo "Unit tests are not enabled"
87 @echo "Run ./configure --enable-unit-tests"
90 pdns_recursor_SOURCES = \
96 capabilities.cc capabilities.hh \
99 dns_random.hh dns_random.cc \
102 dnsname.cc dnsname.hh \
104 dnsparser.hh dnsparser.cc \
105 dnsrecords.cc dnsrecords.hh \
106 dnssecinfra.hh dnssecinfra.cc \
108 dnswriter.cc dnswriter.hh \
109 ednsoptions.cc ednsoptions.hh \
110 ednssubnet.cc ednssubnet.hh \
111 filterpo.cc filterpo.hh \
112 gettime.cc gettime.hh \
113 gss_context.cc gss_context.hh \
114 iputils.hh iputils.cc \
119 logger.hh logger.cc \
120 lua-base4.cc lua-base4.hh \
121 lua-recursor4.cc lua-recursor4.hh \
122 lua-recursor4-ffi.hh \
127 mtasker_context.cc mtasker_context.hh \
129 negcache.hh negcache.cc \
131 opensslsigners.cc opensslsigners.hh \
136 protobuf.cc protobuf.hh \
137 pubsuffix.hh pubsuffix.cc \
140 rcpgenerator.cc rcpgenerator.hh \
142 rec-lua-conf.hh rec-lua-conf.cc \
143 rec-protobuf.cc rec-protobuf.hh \
144 rec-snmp.hh rec-snmp.cc \
145 rec_channel.cc rec_channel.hh \
147 recpacketcache.cc recpacketcache.hh \
148 recursor_cache.cc recursor_cache.hh \
150 remote_logger.cc remote_logger.hh \
151 resolver.hh resolver.cc \
153 responsestats.hh responsestats.cc \
156 rpzloader.cc rpzloader.hh \
157 secpoll-recursor.cc \
158 secpoll-recursor.hh \
161 snmp-agent.hh snmp-agent.cc \
162 sortlist.cc sortlist.hh \
165 syncres.cc syncres.hh \
166 threadname.hh threadname.cc \
167 tsigverifier.cc tsigverifier.hh \
171 validate.cc validate.hh validate-recursor.cc validate-recursor.hh \
172 version.cc version.hh \
173 webserver.cc webserver.hh \
174 ws-api.cc ws-api.hh \
175 ws-recursor.cc ws-recursor.hh \
177 zoneparser-tng.cc zoneparser-tng.hh
180 BUILT_SOURCES += lua.hpp
181 nodist_pdns_recursor_SOURCES = lua.hpp
182 CLEANFILES += lua.hpp
185 pdns_recursor_LDADD = \
189 $(BOOST_CONTEXT_LIBS) \
193 $(BOOST_SYSTEM_LIBS) \
197 pdns_recursor_LDFLAGS = $(AM_LDFLAGS) \
198 $(LIBCRYPTO_LDFLAGS) $(BOOST_CONTEXT_LDFLAGS) \
199 $(BOOST_SYSTEM_LDFLAGS)
202 pdns_recursor_SOURCES += nod.hh nod.cc
203 pdns_recursor_LDADD += \
204 $(BOOST_FILESYSTEM_LIBS)
205 pdns_recursor_LDFLAGS += \
206 $(BOOST_FILESYSTEM_LDFLAGS)
209 testrunner_SOURCES = \
212 base64.cc base64.hh \
214 dns_random.cc dns_random.hh \
216 dnsname.cc dnsname.hh \
217 dnsparser.hh dnsparser.cc \
221 dnswriter.cc dnswriter.hh \
222 ednscookies.cc ednscookies.hh \
223 ednsoptions.cc ednsoptions.hh \
224 ednssubnet.cc ednssubnet.hh \
225 filterpo.cc filterpo.hh \
226 gettime.cc gettime.hh \
227 gss_context.cc gss_context.hh \
228 iputils.cc iputils.hh \
230 logger.cc logger.hh \
233 negcache.hh negcache.cc \
237 opensslsigners.cc opensslsigners.hh \
238 protobuf.cc protobuf.hh \
241 rec-protobuf.cc rec-protobuf.hh \
242 recpacketcache.cc recpacketcache.hh \
243 recursor_cache.cc recursor_cache.hh \
250 syncres.cc syncres.hh \
251 test-arguments_cc.cc \
255 test-dnsrecordcontent.cc \
256 test-dns_random_hh.cc \
258 test-dnsparser_hh.cc \
259 test-dnsrecords_cc.cc \
260 test-ednsoptions_cc.cc \
261 test-filterpo_cc.cc \
266 test-negcache_cc.cc \
267 test-packetcache_hh.cc \
268 test-rcpgenerator_cc.cc \
269 test-recpacketcache_cc.cc \
270 test-recursorcache_cc.cc \
276 threadname.hh threadname.cc \
277 tsigverifier.cc tsigverifier.hh \
279 validate.cc validate.hh \
280 validate-recursor.cc validate-recursor.hh \
282 zoneparser-tng.cc zoneparser-tng.hh
284 testrunner_LDFLAGS = \
286 $(BOOST_CONTEXT_LDFLAGS) \
287 $(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) \
288 $(LIBCRYPTO_LDFLAGS) \
289 $(BOOST_SYSTEM_LDFLAGS)
292 $(BOOST_CONTEXT_LIBS) \
293 $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) \
296 $(BOOST_SYSTEM_LIBS) \
301 testrunner_SOURCES += nod.hh nod.cc \
304 testrunner_LDADD += \
305 $(BOOST_FILESYSTEM_LIBS)
306 testrunner_LDFLAGS += \
307 $(BOOST_FILESYSTEM_LDFLAGS)
311 pdns_recursor_SOURCES += \
313 pdns_recursor_LDADD += $(LIBSODIUM_LIBS)
314 testrunner_SOURCES += \
316 testrunner_LDADD += $(LIBSODIUM_LIBS)
320 pdns_recursor_SOURCES += \
322 pdns_recursor_LDADD += $(LIBDECAF_LIBS)
326 pdns_recursor_SOURCES += \
329 pdns_recursor_LDFLAGS += -rdynamic
333 pdns_recursor_LDADD += $(LUA_LIBS)
337 pdns_recursor_SOURCES += kqueuemplexer.cc
341 pdns_recursor_SOURCES += epollmplexer.cc
345 pdns_recursor_SOURCES += \
352 dnsmessage.pb.cc: dnsmessage.proto
353 $(AM_V_GEN)$(PROTOC) --cpp_out=./ $<
355 BUILT_SOURCES += dnsmessage.pb.cc
356 pdns_recursor_LDADD += $(PROTOBUF_LIBS)
357 nodist_pdns_recursor_SOURCES = dnsmessage.pb.cc dnsmessage.pb.h
358 pdns_recursor.$(OBJEXT): dnsmessage.pb.cc
360 nodist_testrunner_SOURCES = dnsmessage.pb.cc dnsmessage.pb.h
361 testrunner_LDADD += $(PROTOBUF_LIBS)
362 testrunner$(OBJEXT): dnsmessage.pb.cc
366 pdns_recursor_SOURCES += \
367 uuid-utils.hh uuid-utils.cc
371 rec_control_SOURCES = \
372 arguments.cc arguments.hh \
373 dnsname.hh dnsname.cc \
378 rec_channel.cc rec_channel.hh \
382 dnslabeltext.cc: dnslabeltext.rl
383 $(AM_V_GEN)$(RAGEL) $< -o dnslabeltext.cc
385 curl_verbose = $(curl_verbose_$(V))
386 curl_verbose_ = $(curl_verbose_$(AM_DEFAULT_VERBOSITY))
387 curl_verbose_0 = @echo " CURL " $@;
388 $(srcdir)/effective_tld_names.dat:
389 $(curl_verbose)if ! curl -s -S https://publicsuffix.org/list/public_suffix_list.dat > $@; then rm -f $@; exit 1; fi
391 pubsuffix.cc: $(srcdir)/effective_tld_names.dat
392 $(AM_V_GEN)./mkpubsuffixcc
395 sysconf_DATA = recursor.conf-dist
397 recursor.conf-dist: pdns_recursor
398 $(AM_V_GEN)./pdns_recursor --config > $@
401 MANPAGES=pdns_recursor.1 \
404 dist_man_MANS=$(MANPAGES)
408 $(MANPAGES): %: docs/manpages/%.rst .venv
409 .venv/bin/python -msphinx -b man docs . $<
410 endif # if !HAVE_MANPAGES
412 .venv: docs/requirements.txt
414 .venv/bin/pip install -U pip setuptools setuptools-git
415 .venv/bin/pip install -r docs/requirements.txt
417 html-docs: docs/** .venv
418 .venv/bin/python -msphinx -b html docs html-docs
420 latex/PowerDNS-Recursor.pdf: docs/** .venv
421 .venv/bin/python -msphinx -M latexpdf docs .
423 PowerDNS-Recursor.pdf: latex/PowerDNS-Recursor.pdf
426 html-docs.tar.bz2: html-docs
429 all-docs: PowerDNS-Recursor.pdf html-docs html-docs.tar.bz2
431 upload-docs: all-docs
432 rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' ./html-docs/ web1.powerdns.com:/srv/www/doc.powerdns.com/recursor/
433 rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./html-docs.tar.bz2 web1.powerdns.com:/srv/www/doc.powerdns.com/recursor/
434 rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./PowerDNS-Recursor.pdf web1.powerdns.com:/srv/www/doc.powerdns.com/recursor/
436 else # if HAVE_VIRTUALENV
438 echo "You need virtualenv to generate the manpages"
441 PowerDNS-Recursor.pdf:
442 echo "You need virtualenv to generate the PDF"
446 echo "You need virtualenv to generate the HTML docs"
451 pdns-recursor.service: pdns-recursor.service.in
452 $(AM_V_GEN)sed -e 's![@]sbindir[@]!$(sbindir)!' < $< > $@
454 pdns-recursor@.service: pdns-recursor.service
455 $(AM_V_GEN)sed -e 's!/pdns_recursor!& --config-name=%i!' \
456 -e 's!Recursor!& %i!' \
459 systemdsystemunitdir = $(SYSTEMD_DIR)
461 systemdsystemunit_DATA = \
462 pdns-recursor.service \
463 pdns-recursor@.service
466 pdns-recursor.service \
467 pdns-recursor@.service