Makefile.am 2.36 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
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 45 46
dhcp4_messages.h dhcp4_messages.cc: dhcp4_messages.mes
	$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/dhcp4/dhcp4_messages.mes

BUILT_SOURCES = spec_config.h dhcp4_messages.h dhcp4_messages.cc

47 48
pkglibexec_PROGRAMS = b10-dhcp4

49
b10_dhcp4_SOURCES  = main.cc
50
b10_dhcp4_SOURCES += ctrl_dhcp4_srv.cc ctrl_dhcp4_srv.h
51
b10_dhcp4_SOURCES += config_parser.cc config_parser.h
52 53 54 55 56
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
57

58
b10_dhcp4_LDADD  = $(top_builddir)/src/lib/dhcp/libb10-dhcp++.la
59
b10_dhcp4_LDADD += $(top_builddir)/src/lib/util/libb10-util.la
60
b10_dhcp4_LDADD += $(top_builddir)/src/lib/dhcpsrv/libb10-dhcpsrv.la
61
b10_dhcp4_LDADD += $(top_builddir)/src/lib/exceptions/libb10-exceptions.la
62
b10_dhcp4_LDADD += $(top_builddir)/src/lib/asiolink/libb10-asiolink.la
63
b10_dhcp4_LDADD += $(top_builddir)/src/lib/log/libb10-log.la
64
b10_dhcp4_LDADD += $(top_builddir)/src/lib/config/libb10-cfgclient.la
65
b10_dhcp4_LDADD += $(top_builddir)/src/lib/cc/libb10-cc.la
66
b10_dhcp4_LDADD += $(top_builddir)/src/lib/hooks/libb10-hooks.la
67

68 69
b10_dhcp4dir = $(pkgdatadir)
b10_dhcp4_DATA = dhcp4.spec