Makefile.am 8.2 KB
Newer Older
1 2
ACLOCAL_AMFLAGS = -I $(top_srcdir)/m4
SUBDIRS = . tests
3

4 5
sbin_PROGRAMS = knotc knotd
bin_PROGRAMS = kdig khost knsupdate
6
noinst_PROGRAMS = zscanner-tool
7
noinst_LTLIBRARIES = libknot.la libknotd.la libknots.la libzscanner.la
Ondřej Surý's avatar
Ondřej Surý committed
8 9

# $(YACC) will generate header file
10
AM_CPPFLAGS = -I$(top_srcdir)/src/libknot -DSYSCONFDIR='"$(sysconfdir)"' \
11 12
	-DSBINDIR='"$(sbindir)"' -DCONFIG_DIR='"${config_dir}"' \
	-DSTORAGE_DIR='"${storage_dir}"' -DRUN_DIR='"${run_dir}"'
Ondřej Surý's avatar
Ondřej Surý committed
13
AM_YFLAGS = -d
14 15
libknotd_la_YFLAGS = -pcf_ -d
libknotd_la_LFLAGS = # TODO: reentrant parser, prefix
Ondřej Surý's avatar
Ondřej Surý committed
16

17
EXTRA_DIST =					\
18 19 20 21
	zscanner/scanner.rl			\
	zscanner/scanner_body.rl		\
	zscanner/test/run_tests.sh		\
	zscanner/test/cases
22

23
BUILT_SOURCES =					\
24 25
	knot/conf/libknotd_la-cf-lex.c		\
	knot/conf/libknotd_la-cf-parse.c	\
26
	knot/conf/libknotd_la-cf-parse.h
Jan Kadlec's avatar
Jan Kadlec committed
27

28
CLEANFILES =					\
29 30 31
	knot/conf/libknotd_la-cf-lex.c		\
	knot/conf/libknotd_la-cf-parse.c	\
	knot/conf/libknotd_la-cf-parse.h
32

33 34 35 36 37 38 39 40 41
if HAVE_RAGEL
BUILT_SOURCES += zscanner/scanner.c
CLEANFILES += zscanner/scanner.c

zscanner/scanner.c: zscanner/scanner.rl zscanner/scanner_body.rl
	$(RAGEL) $(FSM_TYPE) -s -o $@ $(srcdir)/zscanner/scanner.rl

endif

42 43 44
knotc_SOURCES =					\
	knot/ctl/knotc_main.c

45 46 47
knotd_SOURCES =					\
	knot/main.c

48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
kdig_SOURCES =					\
	utils/common/msg.h			\
	utils/common/msg.c			\
	utils/common/exec.c			\
	utils/common/exec.h			\
	utils/common/params.c			\
	utils/common/params.h			\
	utils/common/resolv.c			\
	utils/common/resolv.h			\
	utils/common/netio.c			\
	utils/common/netio.h			\
	utils/common/token.c			\
	utils/common/token.h			\
	utils/dig/dig_main.c			\
	utils/dig/dig_params.c			\
	utils/dig/dig_params.h			\
	utils/dig/dig_exec.c			\
	utils/dig/dig_exec.h

khost_SOURCES =					\
	utils/common/msg.h			\
	utils/common/msg.c			\
	utils/common/exec.c			\
	utils/common/exec.h			\
	utils/common/params.c			\
	utils/common/params.h			\
	utils/common/resolv.c			\
	utils/common/resolv.h			\
	utils/common/netio.c			\
	utils/common/netio.h			\
	utils/common/token.c			\
	utils/common/token.h			\
	utils/host/host_main.c			\
	utils/dig/dig_params.c			\
	utils/dig/dig_params.h			\
	utils/host/host_params.c		\
	utils/host/host_params.h		\
	utils/dig/dig_exec.c			\
	utils/dig/dig_exec.h

knsupdate_SOURCES =				\
	utils/common/msg.h			\
	utils/common/msg.c			\
	utils/common/params.c			\
	utils/common/params.h			\
	utils/common/resolv.c			\
	utils/common/resolv.h			\
	utils/common/netio.c			\
	utils/common/netio.h			\
	utils/common/token.c			\
	utils/common/token.h			\
	utils/common/exec.c			\
	utils/common/exec.h			\
	utils/nsupdate/nsupdate_main.c		\
	utils/nsupdate/nsupdate_params.h	\
103 104 105
	utils/nsupdate/nsupdate_params.c	\
	utils/nsupdate/nsupdate_exec.h		\
	utils/nsupdate/nsupdate_exec.c
106

107
libknot_la_SOURCES =				\
108
	libknot/common.h			\
109 110
	libknot/consts.h			\
	libknot/consts.c			\
111 112 113 114 115 116
	libknot/util/utils.c			\
	libknot/util/debug.c			\
	libknot/util/debug.h			\
	libknot/util/utils.h			\
	libknot/util/tolower.h			\
	libknot/util/tolower.c			\
117
	libknot/util/wire.h			\
118
	libknot/util/endian.h			\
119 120 121 122 123 124
	libknot/packet/query.c			\
	libknot/packet/response.c		\
	libknot/packet/packet.c			\
	libknot/packet/packet.h			\
	libknot/packet/query.h			\
	libknot/packet/response.h		\
125 126 127 128 129 130 131
	libknot/zone/zone.c			\
	libknot/zone/zone-contents.c		\
	libknot/zone/zone-tree.c		\
	libknot/zone/zone-tree.h		\
	libknot/zone/node.h			\
	libknot/zone/zone.h			\
	libknot/zone/zone-contents.h		\
132 133
	libknot/zone/zonedb.c			\
	libknot/zone/zonedb.h			\
134
	libknot/zone/node.c			\
135 136 137 138
	libknot/zone/zone-diff.h		\
	libknot/zone/zone-diff.c		\
	libknot/nameserver/name-server.h	\
	libknot/nameserver/name-server.c	\
139 140
	libknot/nameserver/chaos.h		\
	libknot/nameserver/chaos.c		\
141
	libknot/updates/changesets.h		\
142
	libknot/updates/changesets.c		\
143
	libknot/updates/xfr-in.h		\
144
	libknot/updates/xfr-in.c		\
145 146
	libknot/updates/ddns.h			\
	libknot/updates/ddns.c			\
Daniel Salzman's avatar
Daniel Salzman committed
147
	libknot/dname.c				\
148 149
	libknot/nsec3.c				\
	libknot/consts.h			\
150
	libknot/edns.h				\
Daniel Salzman's avatar
Daniel Salzman committed
151
	libknot/edns.c				\
152
	libknot/libknot.h			\
153
	libknot/dname.h				\
Daniel Salzman's avatar
Daniel Salzman committed
154 155
	libknot/rrset.h				\
	libknot/rrset.c				\
156
	libknot/nsec3.h				\
Daniel Salzman's avatar
Daniel Salzman committed
157 158
	libknot/rrset-dump.h			\
	libknot/rrset-dump.c			\
159 160 161
	libknot/tsig.h				\
	libknot/tsig.c				\
	libknot/tsig-op.h			\
162
	libknot/tsig-op.c			\
163 164
	libknot/binary.h			\
	libknot/binary.c			\
165
	libknot/sign/key.h			\
166 167 168
	libknot/sign/key.c			\
	libknot/sign/bnutils.h			\
	libknot/sign/bnutils.c			\
169 170
	libknot/sign/dnssec.h			\
	libknot/sign/dnssec.c			\
171 172
	libknot/sign/sig0.h			\
	libknot/sign/sig0.c
173 174 175

libknots_la_SOURCES =				\
	common/slab/slab.c			\
176
	common/slab/slab.h			\
177
	common/slab/alloc-common.h		\
178 179
	common/libtap/tap.c			\
	common/libtap/tap.h			\
180
	common/libtap/tap_unit.h		\
181
	common/atomic.h				\
182 183
	common/mempattern.h			\
	common/mempattern.c			\
184 185
	common/descriptor.h			\
	common/descriptor.c			\
186
	common/lists.c				\
187 188
	common/base64.c				\
	common/base64.h				\
189
	common/lists.h				\
190 191
	common/heap.h				\
	common/heap.c				\
Lubos Slovak's avatar
Lubos Slovak committed
192 193
	common/print.c				\
	common/print.h				\
194 195
	common/skip-list.c			\
	common/base32hex.c			\
196
	common/skip-list.h			\
197
	common/base32hex.h			\
198 199 200 201
	common/evqueue.h			\
	common/evqueue.c			\
	common/evsched.h			\
	common/evsched.c			\
202 203
	common/acl.h				\
	common/acl.c				\
204 205
	common/sockaddr.h			\
	common/sockaddr.c			\
206
	common/crc.h				\
207 208
	common/ref.h				\
	common/ref.c				\
209
	common/errors.h				\
210
	common/errors.c				\
Marek Vavrusa's avatar
Marek Vavrusa committed
211 212
	common/errcode.h			\
	common/errcode.c			\
213 214 215 216 217 218 219 220 221 222 223 224 225 226
	common/dSFMT.h				\
	common/dSFMT-params.h			\
	common/dSFMT-params521.h		\
	common/dSFMT.c				\
	common/prng.h				\
	common/prng.c				\
	common/fdset.h				\
	common/fdset.c				\
	common/fdset_poll.h			\
	common/fdset_poll.c			\
	common/fdset_kqueue.h			\
	common/fdset_kqueue.c			\
	common/fdset_epoll.h			\
	common/fdset_epoll.c			\
227 228
	common/getline.h			\
	common/getline.c			\
229 230
	common/log.c				\
	common/log.h				\
231 232
	common/mempool.c			\
	common/mempool.h			\
233 234 235 236 237 238 239 240 241 242 243 244
	common/hattrie/ahtable.c		\
	common/hattrie/ahtable.h		\
	common/hattrie/hat-trie.c		\
	common/hattrie/hat-trie.h		\
	common/hattrie/murmurhash3.c		\
	common/hattrie/murmurhash3.h

libknotd_la_SOURCES =				\
	knot/stat/gatherer.c			\
	knot/stat/stat.c			\
	knot/stat/gatherer.h			\
	knot/stat/stat.h			\
245
	knot/stat/stat-common.h			\
246
	knot/knot.h				\
247 248
	knot/other/debug.h			\
	knot/conf/cf-lex.l			\
249
	knot/conf/cf-parse.y			\
250
	knot/conf/conf.c			\
251 252 253 254 255
	knot/conf/conf.h			\
	knot/conf/extra.c			\
	knot/conf/extra.h			\
	knot/conf/includes.c			\
	knot/conf/includes.h			\
256 257 258 259 260 261 262
	knot/conf/logconf.c			\
	knot/conf/logconf.h			\
	knot/ctl/process.c			\
	knot/ctl/process.h			\
	knot/ctl/remote.c			\
	knot/ctl/remote.h			\
	knot/server/dthreads.c			\
Jan Kadlec's avatar
Jan Kadlec committed
263 264
	knot/server/journal.c			\
	knot/server/socket.c			\
265
	knot/server/server.c			\
Jan Kadlec's avatar
Jan Kadlec committed
266
	knot/server/udp-handler.c		\
267 268 269 270
	knot/server/tcp-handler.c		\
	knot/server/xfr-handler.c		\
	knot/server/zones.c			\
	knot/server/socket.h			\
Jan Kadlec's avatar
Jan Kadlec committed
271
	knot/server/udp-handler.h		\
272
	knot/server/tcp-handler.h		\
273
	knot/server/xfr-handler.h		\
274 275 276 277 278 279
	knot/server/dthreads.h			\
	knot/server/journal.h			\
	knot/server/zones.h			\
	knot/server/notify.h			\
	knot/server/notify.c			\
	knot/server/zones.h			\
280
	knot/server/rrl.h			\
281
	knot/server/rrl.c			\
282 283
	knot/zone/semantic-check.c		\
	knot/zone/semantic-check.h		\
Daniel Salzman's avatar
Daniel Salzman committed
284 285
	knot/zone/zone-dump.h			\
	knot/zone/zone-dump.c			\
286 287
	knot/zone/zone-load.h			\
	knot/zone/zone-load.c			\
288 289
	knot/zone/estimator.h			\
	knot/zone/estimator.c			\
290 291
	knot/server/server.h

292 293
zscanner_tool_SOURCES =				\
	zscanner/test/zscanner-tool.c		\
294 295 296 297
	zscanner/test/tests.h			\
	zscanner/test/tests.c			\
	zscanner/test/processing.h		\
	zscanner/test/processing.c
298

299
libzscanner_la_SOURCES =			\
300 301 302 303 304
	zscanner/file_loader.h			\
	zscanner/file_loader.c			\
	zscanner/scanner.h			\
	zscanner/scanner.c			\
	zscanner/scanner_functions.h		\
305
	zscanner/scanner_functions.c
Ondřej Surý's avatar
Ondřej Surý committed
306

307 308 309 310 311
libknotd_la_LIBADD = libknot.la libknots.la @LIBOBJS@
libknots_la_LIBADD = libzscanner.la @LIBOBJS@
libzscanner_la_LIBADD = @LIBOBJS@
knotd_LDADD = libknotd.la libknot.la libknots.la @LIBOBJS@
knotc_LDADD = libknotd.la libknot.la libknots.la @LIBOBJS@
312 313 314
kdig_LDADD = libknotd.la libknot.la libknots.la @LIBOBJS@
khost_LDADD = libknotd.la libknot.la libknots.la @LIBOBJS@
knsupdate_LDADD = libknotd.la libknot.la libknots.la libzscanner.la @LIBOBJS@
315
zscanner_tool_LDADD = libknots.la libknot.la libknotd.la libzscanner.la @LIBOBJS@
316 317 318

# Create storage and run-time directories
install-data-hook:
319
	$(INSTALL) -d $(DESTDIR)/@config_dir@
320 321
	$(INSTALL) -d $(DESTDIR)/@run_dir@
	$(INSTALL) -d $(DESTDIR)/@storage_dir@