Makefile.am 2.74 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
EXTRA_DIST += dhcp4.dox dhcp4_hooks.dox
23

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

else

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

36 37 38 39 40
endif

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

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

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

BUILT_SOURCES = spec_config.h dhcp4_messages.h dhcp4_messages.cc

Francis Dupont's avatar
Francis Dupont committed
49
# convenience archive
50

Francis Dupont's avatar
Francis Dupont committed
51 52 53 54 55 56 57
noinst_LTLIBRARIES = libdhcp4.la

libdhcp4_la_SOURCES  =
libdhcp4_la_SOURCES += ctrl_dhcp4_srv.cc ctrl_dhcp4_srv.h
libdhcp4_la_SOURCES += json_config_parser.cc json_config_parser.h
libdhcp4_la_SOURCES += dhcp4_log.cc dhcp4_log.h
libdhcp4_la_SOURCES += dhcp4_srv.cc dhcp4_srv.h
58

59
if CONFIG_BACKEND_BUNDY
Francis Dupont's avatar
Francis Dupont committed
60
libdhcp4_la_SOURCES += bundy_controller.cc
61 62 63
endif

if CONFIG_BACKEND_JSON
Francis Dupont's avatar
Francis Dupont committed
64
libdhcp4_la_SOURCES += kea_controller.cc
65 66
endif

Francis Dupont's avatar
Francis Dupont committed
67
nodist_libdhcp4_la_SOURCES = dhcp4_messages.h dhcp4_messages.cc
68
EXTRA_DIST += dhcp4_messages.mes
69

Francis Dupont's avatar
Francis Dupont committed
70 71 72 73 74 75
sbin_PROGRAMS = kea-dhcp4

kea_dhcp4_SOURCES  = main.cc

kea_dhcp4_LDADD  = libdhcp4.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
76 77 78 79 80 81 82 83 84 85 86 87
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