Makefile.am 3.42 KB
Newer Older
1 2 3 4
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
5
AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_builddir)/src
6
AM_CPPFLAGS += $(BOOST_INCLUDES)
7 8 9 10 11 12
if HAVE_MYSQL
AM_CPPFLAGS += $(MYSQL_CPPFLAGS)
endif
if HAVE_PGSQL
AM_CPPFLAGS += $(PGSQL_CPPFLAGS)
endif
13

14
AM_CXXFLAGS = $(KEA_CXXFLAGS)
15 16 17 18
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
endif
19 20 21 22 23

if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

24
CLEANFILES  = *.gcno *.gcda spec_config.h dhcp4_messages.h dhcp4_messages.cc s-messages
25

26
man_MANS = kea-dhcp4.8
27
DISTCLEANFILES = $(man_MANS)
28
EXTRA_DIST = $(man_MANS) kea-dhcp4.xml dhcp4.spec
29
EXTRA_DIST += dhcp4.dox dhcp4_hooks.dox
30

31
if GENERATE_DOCS
32
kea-dhcp4.8: kea-dhcp4.xml
33
	@XSLTPROC@ --novalid --xinclude --nonet -o $@ \
34
        http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
35
	$(srcdir)/kea-dhcp4.xml
36 37 38 39

else

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

43 44 45 46 47
endif

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

48 49 50
dhcp4_messages.h dhcp4_messages.cc: s-messages

s-messages: dhcp4_messages.mes
51
	$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/dhcp4/dhcp4_messages.mes
52
	touch $@
53 54 55

BUILT_SOURCES = spec_config.h dhcp4_messages.h dhcp4_messages.cc

Francis Dupont's avatar
Francis Dupont committed
56
# convenience archive
57

Francis Dupont's avatar
Francis Dupont committed
58 59 60 61 62 63 64
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
65

Francis Dupont's avatar
Francis Dupont committed
66
libdhcp4_la_SOURCES += kea_controller.cc
67

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

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

kea_dhcp4_SOURCES  = main.cc

kea_dhcp4_LDADD  = libdhcp4.la
76
kea_dhcp4_LDADD += $(top_builddir)/src/lib/cfgrpt/libcfgrpt.la
77
kea_dhcp4_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
78
kea_dhcp4_LDADD += $(top_builddir)/src/lib/eval/libkea-eval.la
79 80
kea_dhcp4_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/stats/libkea-stats.la
81
kea_dhcp4_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
82 83
kea_dhcp4_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
84
kea_dhcp4_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
85
kea_dhcp4_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la
86
kea_dhcp4_LDADD += $(top_builddir)/src/lib/cryptolink/libkea-cryptolink.la
87 88 89 90 91
kea_dhcp4_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
kea_dhcp4_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
92
kea_dhcp4_LDADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS) $(BOOST_LIBS)
93

94
kea_dhcp4_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS)
95 96 97 98 99 100
if HAVE_MYSQL
kea_dhcp4_LDFLAGS += $(MYSQL_LIBS)
endif
if HAVE_PGSQL
kea_dhcp4_LDFLAGS += $(PGSQL_LIBS)
endif
101 102 103

kea_dhcp4dir = $(pkgdatadir)
kea_dhcp4_DATA = dhcp4.spec