]>
Commit | Line | Data |
---|---|---|
23448838 | 1 | JSON11_LIBS = $(top_srcdir)/ext/json11/libjson11.la |
0c6f6275 | 2 | |
6b6720de | 3 | AM_CPPFLAGS = $(LUA_CFLAGS) $(YAHTTP_CFLAGS) $(BOOST_CPPFLAGS) $(BOTAN110_CFLAGS) $(SANITIZER_FLAGS) -O3 -Wall -pthread -DSYSCONFDIR=\"${sysconfdir}\" $(SYSTEMD_CFLAGS) |
0c6f6275 PL |
4 | |
5 | AM_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 | |
11 | AM_CXXFLAGS = \ | |
12 | -DSYSCONFDIR=\"$(sysconfdir)\" \ | |
13 | -DPKGLIBDIR=\"$(pkglibdir)\" \ | |
14 | -DLOCALSTATEDIR=\"$(socketdir)\" | |
15 | ||
16 | AM_LDFLAGS = \ | |
17 | $(PROGRAM_LDFLAGS) \ | |
18 | $(THREADFLAGS) | |
19 | ||
20 | ACLOCAL_AMFLAGS = -I m4 | |
21 | ||
642339d8 | 22 | BUILT_SOURCES=htmlfiles.h |
48a44e8b PL |
23 | CLEANFILES = htmlfiles.h \ |
24 | dnsmessage.pb.cc \ | |
25 | dnsmessage.pb.h | |
642339d8 | 26 | |
27 | htmlfiles.h: html/* | |
28 | ./incfiles > $@ | |
29 | ||
0c6f6275 PL |
30 | SUBDIRS=ext |
31 | ||
32 | if LUA | |
33 | AM_CPPFLAGS +=$(LUA_CFLAGS) | |
34 | endif | |
35 | ||
36 | EXTRA_DIST = \ | |
4554ba6e | 37 | NOTICE \ |
0c6f6275 | 38 | .version \ |
0e9cbfc2 | 39 | botan110signers.cc \ |
10f702ce | 40 | build-aux/gen-version \ |
7676c316 | 41 | contrib/* \ |
0c6f6275 PL |
42 | devpollmplexer.cc \ |
43 | dnslabeltext.cc \ | |
44 | dnslabeltext.rl \ | |
aa7929a3 | 45 | dnsmessage.proto \ |
0c6f6275 PL |
46 | effective_tld_names.dat \ |
47 | epollmplexer.cc \ | |
48 | kqueuemplexer.cc \ | |
e10b6528 | 49 | lua_hpp.mk \ |
0c6f6275 | 50 | malloctrace.cc malloctrace.hh \ |
0c6f6275 | 51 | mtasker.cc \ |
a7303306 | 52 | mtasker_fcontext.cc mtasker_ucontext.cc \ |
0c6f6275 PL |
53 | opensslsigners.hh opensslsigners.cc \ |
54 | pdns_recursor.1.md \ | |
55 | portsmplexer.cc \ | |
7496549d | 56 | rec_control.1.md \ |
218feb9d | 57 | rrd/* \ |
4ff58b75 PL |
58 | html incfiles \ |
59 | pdns-recursor.service.in | |
0c6f6275 PL |
60 | |
61 | sbin_PROGRAMS = pdns_recursor | |
62 | bin_PROGRAMS = rec_control | |
63 | ||
64 | pdns_recursor_SOURCES = \ | |
65 | arguments.cc \ | |
66 | base32.cc base32.hh \ | |
67 | base64.cc base64.hh \ | |
68 | cachecleaner.hh \ | |
69 | comment.hh \ | |
70 | dns.hh dns.cc \ | |
71 | dns_random.hh dns_random.cc \ | |
72 | dnsbackend.hh \ | |
73 | dnslabeltext.cc \ | |
74 | dnsname.cc dnsname.hh \ | |
75 | dnspacket.hh \ | |
76 | dnsparser.hh dnsparser.cc \ | |
77 | dnsrecords.cc dnsrecords.hh \ | |
78 | dnssecinfra.hh dnssecinfra.cc \ | |
79 | dnsseckeeper.hh \ | |
80 | dnswriter.cc dnswriter.hh \ | |
5c3b5e7f | 81 | ednsoptions.cc ednsoptions.hh \ |
0c6f6275 PL |
82 | ednssubnet.cc ednssubnet.hh \ |
83 | filterpo.cc filterpo.hh \ | |
85c7ca75 | 84 | gettime.cc gettime.hh \ |
0c6f6275 PL |
85 | gss_context.cc gss_context.hh \ |
86 | iputils.hh iputils.cc \ | |
87 | ixfr.cc ixfr.hh \ | |
88 | json.cc json.hh \ | |
5cf909f3 | 89 | lazy_allocator.hh \ |
0c6f6275 PL |
90 | lock.hh \ |
91 | logger.hh logger.cc \ | |
92 | lua-recursor4.cc lua-recursor4.hh \ | |
93 | lwres.cc lwres.hh \ | |
94 | misc.hh misc.cc \ | |
95 | mplexer.hh \ | |
96 | mtasker.hh \ | |
5ab14378 | 97 | mtasker_context.cc mtasker_context.hh \ |
0c6f6275 PL |
98 | namespaces.hh \ |
99 | nsecrecords.cc \ | |
04c74848 | 100 | opensslsigners.cc opensslsigners.hh \ |
0c6f6275 PL |
101 | pdns_recursor.cc \ |
102 | pdnsexception.hh \ | |
d9d3f9c1 | 103 | protobuf.cc protobuf.hh \ |
0c6f6275 PL |
104 | pubsuffix.hh pubsuffix.cc \ |
105 | qtype.hh qtype.cc \ | |
106 | randomhelper.cc \ | |
107 | rcpgenerator.cc rcpgenerator.hh \ | |
108 | rec-carbon.cc \ | |
109 | rec-lua-conf.hh rec-lua-conf.cc \ | |
d9d3f9c1 | 110 | rec-protobuf.cc rec-protobuf.hh \ |
0c6f6275 PL |
111 | rec_channel.cc rec_channel.hh \ |
112 | rec_channel_rec.cc \ | |
113 | recpacketcache.cc recpacketcache.hh \ | |
114 | recursor_cache.cc recursor_cache.hh \ | |
115 | reczones.cc \ | |
aa7929a3 | 116 | remote_logger.cc remote_logger.hh \ |
0c6f6275 | 117 | resolver.hh resolver.cc \ |
4898a348 | 118 | resolve-context.hh \ |
0c6f6275 | 119 | responsestats.hh responsestats.cc \ |
10c96475 | 120 | root-addresses.hh \ |
f2234140 | 121 | root-dnssec.hh \ |
0c6f6275 PL |
122 | rpzloader.cc rpzloader.hh \ |
123 | secpoll-recursor.cc \ | |
124 | secpoll-recursor.hh \ | |
125 | selectmplexer.cc \ | |
126 | sholder.hh \ | |
127 | sillyrecords.cc \ | |
128 | sortlist.cc sortlist.hh \ | |
129 | sstuff.hh \ | |
0c6f6275 PL |
130 | syncres.cc syncres.hh \ |
131 | ueberbackend.hh \ | |
132 | unix_utility.cc \ | |
133 | utility.hh \ | |
134 | validate.cc validate.hh validate-recursor.cc validate-recursor.hh \ | |
135 | version.cc version.hh \ | |
136 | webserver.cc webserver.hh \ | |
137 | ws-api.cc ws-api.hh \ | |
138 | ws-recursor.cc ws-recursor.hh \ | |
139 | zoneparser-tng.cc zoneparser-tng.hh | |
140 | ||
e10b6528 PL |
141 | if !HAVE_LUA_HPP |
142 | BUILT_SOURCES += lua.hpp | |
143 | nodist_pdns_recursor_SOURCES = lua.hpp | |
144 | CLEANFILES += lua.hpp | |
145 | endif | |
146 | ||
0c6f6275 PL |
147 | pdns_recursor_LDADD = \ |
148 | $(YAHTTP_LIBS) \ | |
04c74848 | 149 | $(JSON11_LIBS) \ |
74d83458 | 150 | $(LIBCRYPTO_LIBS) \ |
6b6720de | 151 | $(BOOST_CONTEXT_LIBS) \ |
21b338e8 PD |
152 | $(SYSTEMD_LIBS) \ |
153 | $(RT_LIBS) | |
0c6f6275 | 154 | |
04c74848 | 155 | pdns_recursor_LDFLAGS = $(AM_LDFLAGS) \ |
01f097e4 | 156 | $(LIBCRYPTO_LDFLAGS) $(BOOST_CONTEXT_LDFLAGS) |
0c6f6275 PL |
157 | |
158 | if BOTAN110 | |
159 | pdns_recursor_SOURCES += \ | |
0e9cbfc2 | 160 | botan110signers.cc |
0c6f6275 PL |
161 | pdns_recursor_LDADD += $(BOTAN110_LIBS) |
162 | endif | |
163 | ||
164 | if MALLOC_TRACE | |
165 | pdns_recursor_SOURCES += \ | |
166 | malloctrace.cc \ | |
167 | malloctrace.hh | |
168 | pdns_recursor_LDFLAGS += -rdynamic | |
169 | endif | |
170 | ||
171 | if LUA | |
172 | pdns_recursor_LDADD += $(LUA_LIBS) | |
173 | endif | |
174 | ||
175 | if HAVE_FREEBSD | |
176 | pdns_recursor_SOURCES += kqueuemplexer.cc | |
177 | endif | |
178 | ||
179 | if HAVE_LINUX | |
180 | pdns_recursor_SOURCES += epollmplexer.cc | |
181 | endif | |
182 | ||
183 | if HAVE_SOLARIS | |
184 | pdns_recursor_SOURCES += \ | |
185 | devpollmplexer.cc \ | |
186 | portsmplexer.cc | |
187 | endif | |
188 | ||
48a44e8b PL |
189 | if HAVE_PROTOBUF |
190 | if HAVE_PROTOC | |
aa7929a3 | 191 | dnsmessage.pb.cc: dnsmessage.proto |
48a44e8b | 192 | $(AM_V_GEN)$(PROTOC) --cpp_out=./ $< |
aa7929a3 | 193 | |
aa7929a3 RG |
194 | BUILT_SOURCES += dnsmessage.pb.cc |
195 | pdns_recursor_LDADD += $(PROTOBUF_LIBS) | |
196 | nodist_pdns_recursor_SOURCES = dnsmessage.pb.cc dnsmessage.pb.h | |
48a44e8b PL |
197 | pdns_recursor.$(OBJEXT): dnsmessage.pb.cc |
198 | endif | |
aa7929a3 RG |
199 | endif |
200 | ||
0c6f6275 PL |
201 | rec_control_SOURCES = \ |
202 | arguments.cc arguments.hh \ | |
203 | dnsname.hh dnsname.cc \ | |
204 | dnslabeltext.cc \ | |
205 | logger.cc \ | |
206 | misc.cc \ | |
207 | qtype.cc \ | |
208 | rec_channel.cc rec_channel.hh \ | |
209 | rec_control.cc \ | |
0c6f6275 PL |
210 | unix_utility.cc |
211 | ||
212 | dnslabeltext.cc: dnslabeltext.rl | |
213 | $(AM_V_GEN)$(RAGEL) $< -o dnslabeltext.cc | |
214 | ||
215 | curl_verbose = $(curl_verbose_$(V)) | |
216 | curl_verbose_ = $(curl_verbose_$(AM_DEFAULT_VERBOSITY)) | |
217 | curl_verbose_0 = @echo " CURL " $@; | |
218 | $(srcdir)/effective_tld_names.dat: | |
2603a63d | 219 | $(curl_verbose)if ! curl -s -S https://publicsuffix.org/list/public_suffix_list.dat > $@; then rm -f $@; exit 1; fi |
0c6f6275 PL |
220 | |
221 | pubsuffix.cc: $(srcdir)/effective_tld_names.dat | |
222 | $(AM_V_GEN)./mkpubsuffixcc | |
223 | ||
2f0d6d58 PL |
224 | ## Config file |
225 | sysconf_DATA = recursor.conf-dist | |
226 | ||
227 | recursor.conf-dist: pdns_recursor | |
228 | $(AM_V_GEN)./pdns_recursor --config > $@ | |
229 | ||
230 | ## Manpages | |
0c6f6275 PL |
231 | MANPAGES=pdns_recursor.1 \ |
232 | rec_control.1 | |
233 | ||
66cc0eec KM |
234 | if HAVE_PANDOC |
235 | dist_man_MANS=$(MANPAGES) | |
236 | endif | |
237 | if HAVE_MANPAGES | |
238 | dist_man_MANS=$(MANPAGES) | |
239 | endif | |
0c6f6275 PL |
240 | |
241 | if HAVE_PANDOC | |
242 | $(MANPAGES): %: %.md | |
243 | $(AM_V_GEN)$(PANDOC) -s -t man $< -o $@ | |
244 | else | |
0c6f6275 PL |
245 | $(MANPAGES): |
246 | echo "You need pandoc to generate the manpages" | |
247 | exit 1 | |
248 | endif | |
4ff58b75 PL |
249 | |
250 | if HAVE_SYSTEMD | |
251 | pdns-recursor.service: pdns-recursor.service.in | |
252 | $(AM_V_GEN)sed -e 's![@]sbindir[@]!$(sbindir)!' < $< > $@ | |
253 | ||
a67f98c2 PL |
254 | pdns-recursor@.service: pdns-recursor.service |
255 | $(AM_V_GEN)sed -e 's!/pdns_recursor!& --config-name=%i!' \ | |
256 | -e 's!Recursor!& %i!' \ | |
257 | < $< > $@ | |
258 | ||
4ff58b75 PL |
259 | systemdsystemunitdir = $(SYSTEMD_DIR) |
260 | ||
261 | systemdsystemunit_DATA = \ | |
a67f98c2 PL |
262 | pdns-recursor.service \ |
263 | pdns-recursor@.service | |
4ff58b75 | 264 | endif |
e10b6528 PL |
265 | |
266 | if !HAVE_LUA_HPP | |
267 | include lua_hpp.mk | |
268 | endif |