Makefile.am 4.38 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 += -I$(top_srcdir)/src -I$(top_builddir)/src
6
AM_CPPFLAGS += $(BOOST_INCLUDES) $(SYSREPO_INCLUDES)
7 8 9 10 11 12 13 14 15 16 17 18

AM_CXXFLAGS = $(KEA_CXXFLAGS)

if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

CLEANFILES  = *.gcno *.gcda netconf_messages.h netconf_messages.cc s-messages

man_MANS = kea-netconf.8
DISTCLEANFILES = $(man_MANS)
EXTRA_DIST = $(man_MANS) kea-netconf.xml
19
#EXTRA_DIST += netconf.dox netconf_hooks.dox
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
#EXTRA_DIST += netconf_parser.yy

if GENERATE_DOCS
kea-netconf.8: kea-netconf.xml
	@XSLTPROC@ --novalid --xinclude --nonet -o $@ \
        http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
	$(srcdir)/kea-netconf.xml

else

$(man_MANS):
	@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 Kea > $@

endif

netconf_messages.h netconf_messages.cc: s-messages

s-messages: netconf_messages.mes
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/netconf/netconf_messages.mes
	touch $@

BUILT_SOURCES = netconf_messages.h netconf_messages.cc

# convenience archive

noinst_LTLIBRARIES = libnetconf.la

48
libnetconf_la_SOURCES  = netconf_log.cc netconf_log.h
49 50 51 52
libnetconf_la_SOURCES += parser_context.cc parser_context.h
libnetconf_la_SOURCES += parser_context_decl.h netconf_lexer.ll
libnetconf_la_SOURCES += netconf_parser.cc netconf_parser.h
libnetconf_la_SOURCES += location.hh position.hh stack.hh
53 54

nodist_libnetconf_la_SOURCES = netconf_messages.h netconf_messages.cc
55

56
EXTRA_DIST += netconf_messages.mes
57 58
EXTRA_DIST += netconf_lexer.ll
EXTRA_DIST += netconf_parser.yy
59 60 61 62 63 64

sbin_PROGRAMS = kea-netconf

kea_netconf_SOURCES  = main.cc

kea_netconf_LDADD  = libnetconf.la
65
kea_netconf_LDADD += $(top_builddir)/src/lib/http/libkea-http.la
66
kea_netconf_LDADD += $(top_builddir)/src/lib/process/libkea-process.la
67 68 69 70 71 72 73 74 75 76
kea_netconf_LDADD += $(top_builddir)/src/lib/cfgrpt/libcfgrpt.la
kea_netconf_LDADD += $(top_builddir)/src/lib/yang/libkea-yang.la
kea_netconf_LDADD += $(top_builddir)/src/lib/stats/libkea-stats.la
kea_netconf_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
kea_netconf_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
kea_netconf_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
kea_netconf_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
kea_netconf_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
kea_netconf_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la
kea_netconf_LDADD += $(top_builddir)/src/lib/cryptolink/libkea-cryptolink.la
77
kea_netconf_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
78 79 80
kea_netconf_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
kea_netconf_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
kea_netconf_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
81
kea_netconf_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
82
kea_netconf_LDADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS) $(BOOST_LIBS) $(SYSREPO_LIBS)
83 84 85 86 87 88


kea_netconfdir = $(pkgdatadir)

if GENERATE_PARSER

89
parser: netconf_lexer.cc location.hh position.hh stack.hh netconf_parser.cc netconf_parser.h
90 91 92 93 94 95 96 97 98 99 100
#	@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
101 102
location.hh position.hh stack.hh netconf_parser.cc netconf_parser.h: netconf_parser.yy
	$(YACC) --defines=netconf_parser.h --report=all --report-file=netconf_parser.report -o netconf_parser.cc netconf_parser.yy
103

104 105
netconf_lexer.cc: netconf_lexer.ll
	$(LEX) --prefix netconf_ -o netconf_lexer.cc netconf_lexer.ll
106 107 108 109 110 111 112

else

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

endif