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

AM_CXXFLAGS = $(B10_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 17 18

if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

pkglibexecdir = $(libexecdir)/@PACKAGE@

19
CLEANFILES  = *.gcno *.gcda spec_config.h dhcp4_messages.h dhcp4_messages.cc s-messages
20

21
man_MANS = b10-dhcp4.8
22
DISTCLEANFILES = $(man_MANS)
23
EXTRA_DIST = $(man_MANS) b10-dhcp4.xml dhcp4.spec
24

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

else

$(man_MANS):
34 35
	@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 > $@
36

37 38 39 40 41
endif

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

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

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

BUILT_SOURCES = spec_config.h dhcp4_messages.h dhcp4_messages.cc

50 51
pkglibexec_PROGRAMS = b10-dhcp4

52
b10_dhcp4_SOURCES  = main.cc
53
b10_dhcp4_SOURCES += ctrl_dhcp4_srv.cc ctrl_dhcp4_srv.h
54
b10_dhcp4_SOURCES += config_parser.cc config_parser.h
55 56 57 58 59
b10_dhcp4_SOURCES += dhcp4_log.cc dhcp4_log.h
b10_dhcp4_SOURCES += dhcp4_srv.cc dhcp4_srv.h

nodist_b10_dhcp4_SOURCES = dhcp4_messages.h dhcp4_messages.cc
EXTRA_DIST += dhcp4_messages.mes
60

61 62 63 64 65 66 67 68 69 70
b10_dhcp4_LDADD  = $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
b10_dhcp4_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
b10_dhcp4_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
b10_dhcp4_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
b10_dhcp4_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
b10_dhcp4_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
b10_dhcp4_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
b10_dhcp4_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
b10_dhcp4_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
b10_dhcp4_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
71

72 73
b10_dhcp4dir = $(pkgdatadir)
b10_dhcp4_DATA = dhcp4.spec