Makefile.am 5.63 KB
Newer Older
1
2
3
4
5
SUBDIRS = . tests

AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
AM_CPPFLAGS += $(BOOST_INCLUDES)
6
7
8
9
10
11
if HAVE_MYSQL
AM_CPPFLAGS += $(MYSQL_CPPFLAGS)
endif
if HAVE_PGSQL
AM_CPPFLAGS += $(PGSQL_CPPFLAGS)
endif
Tomek Mrugalski's avatar
Tomek Mrugalski committed
12
13
if HAVE_CQL
AM_CPPFLAGS += $(CQL_CPPFLAGS)
14
endif
15

16
AM_CXXFLAGS = $(KEA_CXXFLAGS)
17
18
19
20
21

if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

22
CLEANFILES  = *.gcno *.gcda d2_messages.h d2_messages.cc s-messages
23

24
man_MANS = kea-dhcp-ddns.8
25
DISTCLEANFILES = $(man_MANS)
26
EXTRA_DIST = $(man_MANS) kea-dhcp-ddns.xml dhcp-ddns.spec d2.dox
27

28
29
30
31
32
33
34
35
EXTRA_DIST += images/abstract_app_classes.svg images/add_state_model.svg
EXTRA_DIST += images/config_data_classes.svg images/config_from_file_sequence.svg
EXTRA_DIST += images/config_parser_classes.svg images/cpl_signal_classes.svg
EXTRA_DIST += images/cpl_signal_sequence.svg images/d2_app_classes.svg
EXTRA_DIST += images/nc_trans_sequence.svg images/remove_state_model.svg
EXTRA_DIST += images/request_mgt_classes.svg images/state_model_classes.svg
EXTRA_DIST += images/trans_classes.svg images/update_exec_classes.svg

36
if GENERATE_DOCS
37
kea-dhcp-ddns.8: kea-dhcp-ddns.xml
38
39
	@XSLTPROC@ --novalid --xinclude --nonet -o $@ \
        http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
40
	$(srcdir)/kea-dhcp-ddns.xml
41
42
43
44
45

else

$(man_MANS):
	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
46
	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild Kea > $@
47
48
49

endif

50
51
52
d2_messages.h d2_messages.cc: s-messages

s-messages: d2_messages.mes
53
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/d2/d2_messages.mes
54
	touch $@
55

56
BUILT_SOURCES = d2_messages.h d2_messages.cc
57

Francis Dupont's avatar
Francis Dupont committed
58
59
60
61
62
63
64
65
66
# convenience archive

noinst_LTLIBRARIES = libd2.la

libd2_la_SOURCES  =
libd2_la_SOURCES += d2_log.cc d2_log.h
libd2_la_SOURCES += d2_process.cc d2_process.h
libd2_la_SOURCES += d2_config.cc d2_config.h
libd2_la_SOURCES += d2_cfg_mgr.cc d2_cfg_mgr.h
67
68
libd2_la_SOURCES += d2_lexer.ll location.hh position.hh stack.hh
libd2_la_SOURCES += d2_parser.cc d2_parser.h
Francis Dupont's avatar
Francis Dupont committed
69
libd2_la_SOURCES += d2_queue_mgr.cc d2_queue_mgr.h
70
libd2_la_SOURCES += d2_simple_parser.cc d2_simple_parser.h
Francis Dupont's avatar
Francis Dupont committed
71
72
73
74
75
76
77
78
libd2_la_SOURCES += d2_update_message.cc d2_update_message.h
libd2_la_SOURCES += d2_update_mgr.cc d2_update_mgr.h
libd2_la_SOURCES += d2_zone.cc d2_zone.h
libd2_la_SOURCES += dns_client.cc dns_client.h
libd2_la_SOURCES += nc_add.cc nc_add.h
libd2_la_SOURCES += nc_remove.cc nc_remove.h
libd2_la_SOURCES += nc_trans.cc nc_trans.h
libd2_la_SOURCES += d2_controller.cc d2_controller.h
79
libd2_la_SOURCES += parser_context.cc parser_context.h parser_context_decl.h
80

Francis Dupont's avatar
Francis Dupont committed
81
nodist_libd2_la_SOURCES = d2_messages.h d2_messages.cc
82
EXTRA_DIST += d2_messages.mes
83

Francis Dupont's avatar
Francis Dupont committed
84
85
86
87
88
sbin_PROGRAMS = kea-dhcp-ddns

kea_dhcp_ddns_SOURCES  = main.cc

kea_dhcp_ddns_LDADD  = libd2.la
89
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/cfgrpt/libcfgrpt.la
90
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/process/libkea-process.la
91
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
92
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/eval/libkea-eval.la
93
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
94
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/asiodns/libkea-asiodns.la
95
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/stats/libkea-stats.la
96
97
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
98
99
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
100
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la
101
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/cryptolink/libkea-cryptolink.la
102
103
104
105
106
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
kea_dhcp_ddns_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
107
kea_dhcp_ddns_LDADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS) $(BOOST_LIBS)
108

109
kea_dhcp_ddns_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS)
110
111
112
113
114
115
if HAVE_MYSQL
kea_dhcp_ddns_LDFLAGS += $(MYSQL_LIBS)
endif
if HAVE_PGSQL
kea_dhcp_ddns_LDFLAGS += $(PGSQL_LIBS)
endif
Tomek Mrugalski's avatar
Tomek Mrugalski committed
116
117
if HAVE_CQL
kea_dhcp_ddns_LDFLAGS += $(CQL_LIBS)
118
endif
119
120
121

kea_dhcp_ddnsdir = $(pkgdatadir)
kea_dhcp_ddns_DATA = dhcp-ddns.spec
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

if GENERATE_PARSER

parser: d2_lexer.cc location.hh position.hh stack.hh d2_parser.cc d2_parser.h
	@echo "Flex/bison files regenerated"

# --- Flex/Bison stuff below --------------------------------------------------
# When debugging grammar issues, it's useful to add -v to bison parameters.
# bison will generate parser.output file that explains the whole grammar.
# It can be used to manually follow what's going on in the parser.
# This is especially useful if yydebug_ is set to 1 as that variable
# will cause parser to print out its internal state.
# Call flex with -s to check that the default rule can be suppressed
# Call bison with -W to get warnings like unmarked empty rules
# Note C++11 deprecated register still used by flex < 2.6.0
location.hh position.hh stack.hh d2_parser.cc d2_parser.h: d2_parser.yy
	$(YACC) --defines=d2_parser.h --report=all --report-file=d2_parser.report -o d2_parser.cc d2_parser.yy

d2_lexer.cc: d2_lexer.ll
	$(LEX) --prefix d2_parser_ -o d2_lexer.cc d2_lexer.ll

else

parser location.hh position.hh stack.hh d2_parser.cc d2_parser.h d2_lexer.cc:
	@echo Parser generation disabled. Configure with --enable-generate-parser to enable it.

endif