]>
Commit | Line | Data |
---|---|---|
4649d67b | 1 | AM_CPPFLAGS += $(LUA_CFLAGS) $(LIBEDIT_CFLAGS) $(YAHTTP_CFLAGS) $(SANITIZER_FLAGS) -DSYSCONFDIR=\"${sysconfdir}\" |
50bed881 | 2 | |
91487eb9 PL |
3 | ACLOCAL_AMFLAGS = -I m4 |
4 | ||
f8204e9e | 5 | SUBDIRS=ext/yahttp |
bbfefc98 | 6 | |
37a2da85 PL |
7 | CLEANFILES = dnsmessage.pb.cc dnsmessage.pb.h |
8 | ||
bbfefc98 | 9 | dnslabeltext.cc: dnslabeltext.rl |
30bfe7f6 | 10 | $(AM_V_GEN)$(RAGEL) $< -o dnslabeltext.cc |
4676400a | 11 | |
a1f81e3b | 12 | BUILT_SOURCES=htmlfiles.h |
13 | ||
50bed881 | 14 | htmlfiles.h: html/* |
15 | ./incfiles > $@ | |
bbfefc98 | 16 | |
7cc65f8a SH |
17 | SRC_JS_FILES := $(wildcard src_js/*.js) |
18 | MIN_JS_FILES := $(patsubst src_js/%.js,html/js/%.min.js,$(SRC_JS_FILES)) | |
19 | ||
20 | html/js/%.min.js: src_js/%.js | |
21 | uglifyjs $< > $@ | |
22 | ||
23 | min_js: $(MIN_JS_FILES) | |
24 | ||
4ed8dfeb | 25 | if HAVE_RE2 |
26 | AM_CPPFLAGS += $(RE2_CFLAGS) | |
27 | endif | |
28 | ||
29 | ||
994c0ab3 PL |
30 | EXTRA_DIST=dnslabeltext.rl \ |
31 | dnsdistconf.lua \ | |
59c83cf6 | 32 | dnsmessage.proto \ |
994c0ab3 | 33 | README.md \ |
25553371 | 34 | delaypipe.cc delaypipe.hh \ |
994c0ab3 | 35 | html \ |
b8681462 | 36 | dnsdist.1.md \ |
5242cc51 | 37 | .version \ |
b3bcfb63 | 38 | contrib \ |
1caf101b | 39 | build-aux/gen-version \ |
babc4bab SH |
40 | ext/incbin/UNLICENSE \ |
41 | incfiles \ | |
42 | src_js | |
bbfefc98 | 43 | |
44 | bin_PROGRAMS = dnsdist | |
d2143283 PL |
45 | |
46 | if UNIT_TESTS | |
47 | noinst_PROGRAMS = testrunner | |
ca404e94 RG |
48 | endif |
49 | ||
ca9836cb PL |
50 | dnsdist-web.$(OBJEXT): htmlfiles.h |
51 | ||
bbfefc98 | 52 | dnsdist_SOURCES = \ |
1489accc | 53 | base64.hh \ |
77f8ae1a | 54 | dns.cc dns.hh \ |
11e1e08b | 55 | dnscrypt.cc dnscrypt.hh \ |
bbfefc98 | 56 | dnsdist.cc dnsdist.hh \ |
886e2cf2 | 57 | dnsdist-cache.cc dnsdist-cache.hh \ |
96b092a7 | 58 | dnsdist-carbon.cc \ |
ffb07158 | 59 | dnsdist-console.cc \ |
11e1e08b | 60 | dnsdist-dnscrypt.cc \ |
ca404e94 | 61 | dnsdist-ecs.cc dnsdist-ecs.hh \ |
bbfefc98 | 62 | dnsdist-lua.cc \ |
80a216c9 | 63 | dnsdist-lua2.cc \ |
d8c19b98 | 64 | dnsdist-remotelogger.cc dnsdist-remotelogger.hh \ |
f092a5c7 | 65 | dnsdist-rings.cc \ |
8a5d5053 | 66 | dnsdist-tcp.cc \ |
50bed881 | 67 | dnsdist-web.cc \ |
bbfefc98 | 68 | dnslabeltext.cc \ |
69 | dnsname.cc dnsname.hh \ | |
ca404e94 | 70 | dnsparser.hh dnsparser.cc \ |
0940e4eb | 71 | dnsrulactions.hh \ |
bbfefc98 | 72 | dnswriter.cc dnswriter.hh \ |
73 | dolog.hh \ | |
5c3b5e7f | 74 | ednsoptions.cc ednsoptions.hh \ |
ff73f02b | 75 | ednscookies.cc ednscookies.hh \ |
ca404e94 | 76 | ednssubnet.cc ednssubnet.hh \ |
bbfefc98 | 77 | iputils.cc iputils.hh \ |
0e41337b | 78 | lock.hh \ |
bbfefc98 | 79 | misc.cc misc.hh \ |
ed1f29ef | 80 | htmlfiles.h \ |
bbfefc98 | 81 | namespaces.hh \ |
82 | pdnsexception.hh \ | |
83 | qtype.cc qtype.hh \ | |
ecbe9133 | 84 | sholder.hh \ |
bbfefc98 | 85 | sodcrypto.cc sodcrypto.hh \ |
f8204e9e PL |
86 | sstuff.hh \ |
87 | ext/luawrapper/include/LuaContext.hpp \ | |
88 | ext/json11/json11.cpp \ | |
89 | ext/json11/json11.hpp \ | |
6a699049 | 90 | ext/incbin/incbin.h |
bbfefc98 | 91 | |
92 | dnsdist_LDFLAGS = \ | |
93 | $(AM_LDFLAGS) \ | |
bfb7cc84 | 94 | $(PROGRAM_LDFLAGS) \ |
50bed881 | 95 | -pthread |
bbfefc98 | 96 | |
97 | dnsdist_LDADD = \ | |
a6158e7a | 98 | $(LUA_LIBS) \ |
d9de8b61 | 99 | $(LIBEDIT_LIBS) \ |
a6158e7a RK |
100 | $(RT_LIBS) \ |
101 | $(YAHTTP_LIBS) \ | |
e85e4d88 RG |
102 | $(LIBSODIUM_LIBS) \ |
103 | $(SANITIZER_FLAGS) | |
bbfefc98 | 104 | |
4ed8dfeb | 105 | if HAVE_RE2 |
106 | dnsdist_LDADD += $(RE2_LIBS) | |
107 | endif | |
108 | ||
b2eccf5f | 109 | |
37a2da85 PL |
110 | if HAVE_PROTOBUF |
111 | if HAVE_PROTOC | |
b2eccf5f | 112 | dnsmessage.pb.cc: dnsmessage.proto |
37a2da85 | 113 | $(AM_V_GEN)$(PROTOC) --cpp_out=./ $< |
b2eccf5f | 114 | |
b2eccf5f | 115 | BUILT_SOURCES += dnsmessage.pb.cc |
37a2da85 PL |
116 | |
117 | nodist_dnsdist_SOURCES = dnsmessage.pb.cc dnsmessage.pb.h | |
d8c19b98 | 118 | dnsdist_LDADD += $(PROTOBUF_LIBS) |
37a2da85 PL |
119 | |
120 | dnsdist.$(OBJEXT): dnsmessage.pb.cc | |
121 | endif | |
d8c19b98 | 122 | endif |
ca404e94 RG |
123 | |
124 | testrunner_SOURCES = \ | |
11e1e08b RG |
125 | base64.hh \ |
126 | dns.hh \ | |
e27e17c3 | 127 | test-base64_cc.cc \ |
11e1e08b | 128 | test-dnsdist_cc.cc \ |
886e2cf2 | 129 | test-dnsdistpacketcache_cc.cc \ |
11e1e08b RG |
130 | test-dnscrypt_cc.cc \ |
131 | dnsdist.hh \ | |
886e2cf2 | 132 | dnsdist-cache.cc dnsdist-cache.hh \ |
ca404e94 | 133 | dnsdist-ecs.cc dnsdist-ecs.hh \ |
11e1e08b | 134 | dnscrypt.cc dnscrypt.hh \ |
ca404e94 RG |
135 | dnslabeltext.cc \ |
136 | dnsname.cc dnsname.hh \ | |
137 | dnsparser.hh dnsparser.cc \ | |
138 | dnswriter.cc dnswriter.hh \ | |
139 | dolog.hh \ | |
5c3b5e7f | 140 | ednsoptions.cc ednsoptions.hh \ |
ff73f02b | 141 | ednscookies.cc ednscookies.hh \ |
ca404e94 RG |
142 | ednssubnet.cc ednssubnet.hh \ |
143 | iputils.cc iputils.hh \ | |
144 | misc.cc misc.hh \ | |
145 | namespaces.hh \ | |
146 | pdnsexception.hh \ | |
147 | qtype.cc qtype.hh \ | |
148 | sholder.hh \ | |
e27e17c3 | 149 | sodcrypto.cc \ |
ca404e94 RG |
150 | sstuff.hh \ |
151 | testrunner.cc | |
152 | ||
153 | testrunner_LDFLAGS = \ | |
154 | $(AM_LDFLAGS) \ | |
155 | $(PROGRAM_LDFLAGS) \ | |
156 | $(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) \ | |
157 | -pthread | |
158 | ||
159 | testrunner_LDADD = \ | |
160 | $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) \ | |
11e1e08b | 161 | $(LIBSODIUM_LIBS) \ |
8d06661a RG |
162 | $(RT_LIBS) \ |
163 | $(SANITIZER_FLAGS) | |
ca404e94 | 164 | |
f68a9074 PL |
165 | MANPAGES=dnsdist.1 |
166 | ||
167 | dist_man_MANS=$(MANPAGES) | |
168 | ||
169 | if HAVE_PANDOC | |
170 | $(MANPAGES): %: %.md | |
171 | $(AM_V_GEN)$(PANDOC) -s -t man $< -o $@ | |
172 | else | |
173 | if HAVE_MANPAGES | |
174 | #nothing | |
175 | else | |
176 | $(MANPAGES): | |
177 | echo "You need pandoc to generate the manpages" | |
178 | exit 1 | |
179 | endif | |
180 | endif |