Makefile.am 2.57 KB
Newer Older
1 2 3 4 5 6
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)

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

if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

17
CLEANFILES  = *.gcno *.gcda spec_config.h dhcp4_messages.h dhcp4_messages.cc s-messages
18

19
man_MANS = kea-dhcp4.8
20
DISTCLEANFILES = $(man_MANS)
21
EXTRA_DIST = $(man_MANS) kea-dhcp4.xml dhcp4.spec
22

23
if GENERATE_DOCS
24
kea-dhcp4.8: kea-dhcp4.xml
25
	@XSLTPROC@ --novalid --xinclude --nonet -o $@ \
26
        http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
27
	$(srcdir)/kea-dhcp4.xml
28 29 30 31

else

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

35 36 37 38 39
endif

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

40 41 42
dhcp4_messages.h dhcp4_messages.cc: s-messages

s-messages: dhcp4_messages.mes
43
	$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/dhcp4/dhcp4_messages.mes
44
	touch $@
45 46 47

BUILT_SOURCES = spec_config.h dhcp4_messages.h dhcp4_messages.cc

48
sbin_PROGRAMS = kea-dhcp4
49

50 51 52 53 54
kea_dhcp4_SOURCES  = main.cc
kea_dhcp4_SOURCES += ctrl_dhcp4_srv.cc ctrl_dhcp4_srv.h
kea_dhcp4_SOURCES += json_config_parser.cc json_config_parser.h
kea_dhcp4_SOURCES += dhcp4_log.cc dhcp4_log.h
kea_dhcp4_SOURCES += dhcp4_srv.cc dhcp4_srv.h
55

56
if CONFIG_BACKEND_BUNDY
57
kea_dhcp4_SOURCES += bundy_controller.cc
58 59 60
endif

if CONFIG_BACKEND_JSON
61
kea_dhcp4_SOURCES += kea_controller.cc
62 63
endif

64
nodist_kea_dhcp4_SOURCES = dhcp4_messages.h dhcp4_messages.cc
65
EXTRA_DIST += dhcp4_messages.mes
66

67 68 69 70 71 72 73 74 75 76 77 78 79
kea_dhcp4_LDADD  = $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la

kea_dhcp4dir = $(pkgdatadir)
kea_dhcp4_DATA = dhcp4.spec