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

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/lib/cc -I$(top_builddir)/src/lib/cc
6
AM_CPPFLAGS += $(BOOST_INCLUDES)
7 8

AM_CXXFLAGS = $(B10_CXXFLAGS)
9 10 11 12
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
endif
13 14 15 16 17 18 19

if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

pkglibexecdir = $(libexecdir)/@PACKAGE@

20
CLEANFILES = spec_config.h dhcp6_messages.h dhcp6_messages.cc s-messages
21 22

man_MANS = b10-dhcp6.8
23
DISTCLEANFILES = $(man_MANS)
24
EXTRA_DIST = $(man_MANS) b10-dhcp6.xml dhcp6.spec
25

26
if GENERATE_DOCS
27 28

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

else

$(man_MANS):
36 37
	@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 > $@
38

39
endif
40 41 42 43

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

44 45 46
dhcp6_messages.h dhcp6_messages.cc: s-messages

s-messages: dhcp6_messages.mes
47
	$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/dhcp6/dhcp6_messages.mes
48
	touch $@
49 50 51

BUILT_SOURCES = spec_config.h dhcp6_messages.h dhcp6_messages.cc

52
pkglibexec_PROGRAMS = b10-dhcp6
53

54 55 56
b10_dhcp6_SOURCES  = main.cc
b10_dhcp6_SOURCES += dhcp6_log.cc dhcp6_log.h
b10_dhcp6_SOURCES += dhcp6_srv.cc dhcp6_srv.h
Tomek Mrugalski's avatar
Tomek Mrugalski committed
57 58
b10_dhcp6_SOURCES += ctrl_dhcp6_srv.cc ctrl_dhcp6_srv.h
b10_dhcp6_SOURCES += json_config_parser.cc json_config_parser.h
59

60
if CONFIG_BACKEND_BUNDY
61
b10_dhcp6_SOURCES += bundy_controller.cc
62 63 64
endif

if CONFIG_BACKEND_JSON
Tomek Mrugalski's avatar
Tomek Mrugalski committed
65
b10_dhcp6_SOURCES += kea_controller.cc
66
endif
67 68 69

nodist_b10_dhcp6_SOURCES = dhcp6_messages.h dhcp6_messages.cc
EXTRA_DIST += dhcp6_messages.mes
70

71 72 73 74 75 76 77 78 79 80
b10_dhcp6_LDADD  = $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
81 82

b10_dhcp6dir = $(pkgdatadir)
83
b10_dhcp6_DATA = dhcp6.spec