Makefile.am 4 KB
Newer Older
JINMEI Tatuya's avatar
JINMEI Tatuya committed
1
SUBDIRS = . tests benchmarks
2

3
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
4
AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
5
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
6
7
8
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/cc -I$(top_builddir)/src/lib/cc
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/asiolink
AM_CPPFLAGS += -I$(top_builddir)/src/lib/asiolink
9
AM_CPPFLAGS += $(BOOST_INCLUDES)
10
11

AM_CXXFLAGS = $(B10_CXXFLAGS)
12

JINMEI Tatuya's avatar
JINMEI Tatuya committed
13
14
15
16
if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

17
18
pkglibexecdir = $(libexecdir)/@PACKAGE@

19
20
CLEANFILES  = *.gcno *.gcda auth.spec spec_config.h
CLEANFILES += auth_messages.h auth_messages.cc
21
22
CLEANFILES += gen-statisticsitems.py
# auto-generated by gen-statisticsitems.py
23
CLEANFILES += statistics.cc statistics_items.h b10-auth.xml tests/statistics_unittest.cc
24

25
man_MANS = b10-auth.8
26
DISTCLEANFILES = $(man_MANS)
27
EXTRA_DIST = $(man_MANS) b10-auth.xml
28

29
if GENERATE_DOCS
30

31
b10-auth.8: b10-auth.xml
32
	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-auth.xml
33

34
35
36
else

$(man_MANS):
37
38
	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
39

40
41
endif

42
43
44
45
46
auth.spec: auth.spec.pre statistics_msg_items.def
b10-auth.xml: b10-auth.xml.pre statistics_msg_items.def
statistics_items.h: statistics_items.h.pre statistics_msg_items.def
statistics.cc: statistics.cc.pre statistics_msg_items.def
tests/statistics_unittest.cc: tests/statistics_unittest.cc.pre statistics_msg_items.def
47

48
49
gen-statisticsitems.py: gen-statisticsitems.py.pre
	$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" gen-statisticsitems.py.pre >$@
50
51
	chmod +x $@

52
53
auth.spec b10-auth.xml statistics_items.h statistics.cc tests/statistics_unittest.cc: Makefile gen-statisticsitems.py
	./gen-statisticsitems.py
54

55
56
57
spec_config.h: spec_config.h.pre
	$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" spec_config.h.pre >$@

58
59
60
61
auth_messages.h auth_messages.cc: auth_messages.mes
	$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/auth/auth_messages.mes

BUILT_SOURCES = spec_config.h auth_messages.h auth_messages.cc
62
# auto-generated by gen-statisticsitems.py
63
BUILT_SOURCES += statistics_items.h statistics.cc
64

65
pkglibexec_PROGRAMS = b10-auth
66
67
b10_auth_SOURCES = query.cc query.h
b10_auth_SOURCES += auth_srv.cc auth_srv.h
68
b10_auth_SOURCES += auth_log.cc auth_log.h
69
b10_auth_SOURCES += auth_config.cc auth_config.h
70
b10_auth_SOURCES += command.cc command.h
71
b10_auth_SOURCES += common.h common.cc
72
b10_auth_SOURCES += statistics.h
73
b10_auth_SOURCES += datasrc_configurator.h
74
b10_auth_SOURCES += main.cc
75
76

nodist_b10_auth_SOURCES = auth_messages.h auth_messages.cc
77
nodist_b10_auth_SOURCES += statistics.cc statistics_items.h
78
EXTRA_DIST += auth_messages.mes
79
EXTRA_DIST += statistics_msg_items.def
80
81
82
EXTRA_DIST += b10-auth.xml.pre
EXTRA_DIST += statistics_items.h.pre statistics.cc.pre
EXTRA_DIST += tests/statistics_unittest.cc.pre
83

84
b10_auth_LDADD =  $(top_builddir)/src/lib/datasrc/libb10-datasrc.la
85
b10_auth_LDADD += $(top_builddir)/src/lib/dns/libb10-dns++.la
86
b10_auth_LDADD += $(top_builddir)/src/lib/util/libb10-util.la
87
b10_auth_LDADD += $(top_builddir)/src/lib/util/io/libb10-util-io.la
88
b10_auth_LDADD += $(top_builddir)/src/lib/config/libb10-cfgclient.la
89
b10_auth_LDADD += $(top_builddir)/src/lib/cc/libb10-cc.la
90
b10_auth_LDADD += $(top_builddir)/src/lib/exceptions/libb10-exceptions.la
91
b10_auth_LDADD += $(top_builddir)/src/lib/asiodns/libb10-asiodns.la
92
b10_auth_LDADD += $(top_builddir)/src/lib/asiolink/libb10-asiolink.la
93
b10_auth_LDADD += $(top_builddir)/src/lib/log/libb10-log.la
94
b10_auth_LDADD += $(top_builddir)/src/lib/xfr/libb10-xfr.la
95
b10_auth_LDADD += $(top_builddir)/src/lib/server_common/libb10-server-common.la
96
b10_auth_LDADD += $(SQLITE_LIBS)
97

98
99
# TODO: config.h.in is wrong because doesn't honor pkgdatadir
# and can't use @datadir@ because doesn't expand default ${prefix}
100
b10_authdir = $(pkgdatadir)
101
102
b10_auth_DATA = auth.spec