Makefile.am 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. SUBDIRS = . tests
  2. AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
  3. AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
  4. AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_builddir)/src
  5. AM_CPPFLAGS += $(BOOST_INCLUDES)
  6. if HAVE_MYSQL
  7. AM_CPPFLAGS += $(MYSQL_CPPFLAGS)
  8. endif
  9. if HAVE_PGSQL
  10. AM_CPPFLAGS += $(PGSQL_CPPFLAGS)
  11. endif
  12. if HAVE_CQL
  13. AM_CPPFLAGS += $(CQL_CPPFLAGS)
  14. endif
  15. AM_CXXFLAGS = $(KEA_CXXFLAGS)
  16. if USE_STATIC_LINK
  17. AM_LDFLAGS = -static
  18. endif
  19. CLEANFILES = *.gcno *.gcda spec_config.h dhcp4_messages.h dhcp4_messages.cc s-messages
  20. man_MANS = kea-dhcp4.8
  21. DISTCLEANFILES = $(man_MANS)
  22. EXTRA_DIST = $(man_MANS) kea-dhcp4.xml dhcp4.spec
  23. EXTRA_DIST += dhcp4.dox dhcp4_hooks.dox dhcp4o6.dox
  24. EXTRA_DIST += dhcp4_parser.yy
  25. if GENERATE_DOCS
  26. kea-dhcp4.8: kea-dhcp4.xml
  27. @XSLTPROC@ --novalid --xinclude --nonet -o $@ \
  28. http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
  29. $(srcdir)/kea-dhcp4.xml
  30. else
  31. $(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. endif
  35. spec_config.h: spec_config.h.pre
  36. $(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" spec_config.h.pre >$@
  37. dhcp4_messages.h dhcp4_messages.cc: s-messages
  38. s-messages: dhcp4_messages.mes
  39. $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/dhcp4/dhcp4_messages.mes
  40. touch $@
  41. BUILT_SOURCES = spec_config.h dhcp4_messages.h dhcp4_messages.cc
  42. # convenience archive
  43. noinst_LTLIBRARIES = libdhcp4.la
  44. libdhcp4_la_SOURCES =
  45. libdhcp4_la_SOURCES += ctrl_dhcp4_srv.cc ctrl_dhcp4_srv.h
  46. libdhcp4_la_SOURCES += json_config_parser.cc json_config_parser.h
  47. libdhcp4_la_SOURCES += dhcp4_log.cc dhcp4_log.h
  48. libdhcp4_la_SOURCES += dhcp4_srv.cc dhcp4_srv.h
  49. libdhcp4_la_SOURCES += dhcp4to6_ipc.cc dhcp4to6_ipc.h
  50. libdhcp4_la_SOURCES += dhcp4_lexer.ll location.hh position.hh stack.hh
  51. libdhcp4_la_SOURCES += dhcp4_parser.cc dhcp4_parser.h
  52. libdhcp4_la_SOURCES += parser_context.cc parser_context.h parser_context_decl.h
  53. libdhcp4_la_SOURCES += simple_parser4.cc simple_parser4.h
  54. nodist_libdhcp4_la_SOURCES = dhcp4_messages.h dhcp4_messages.cc
  55. EXTRA_DIST += dhcp4_messages.mes
  56. sbin_PROGRAMS = kea-dhcp4
  57. kea_dhcp4_SOURCES = main.cc
  58. kea_dhcp4_LDADD = libdhcp4.la
  59. kea_dhcp4_LDADD += $(top_builddir)/src/lib/cfgrpt/libcfgrpt.la
  60. kea_dhcp4_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
  61. kea_dhcp4_LDADD += $(top_builddir)/src/lib/eval/libkea-eval.la
  62. kea_dhcp4_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
  63. kea_dhcp4_LDADD += $(top_builddir)/src/lib/stats/libkea-stats.la
  64. kea_dhcp4_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
  65. kea_dhcp4_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
  66. kea_dhcp4_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
  67. kea_dhcp4_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
  68. kea_dhcp4_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la
  69. kea_dhcp4_LDADD += $(top_builddir)/src/lib/cryptolink/libkea-cryptolink.la
  70. kea_dhcp4_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
  71. kea_dhcp4_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
  72. kea_dhcp4_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
  73. kea_dhcp4_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
  74. kea_dhcp4_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
  75. kea_dhcp4_LDADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS) $(BOOST_LIBS)
  76. kea_dhcp4_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS)
  77. if HAVE_MYSQL
  78. kea_dhcp4_LDFLAGS += $(MYSQL_LIBS)
  79. endif
  80. if HAVE_PGSQL
  81. kea_dhcp4_LDFLAGS += $(PGSQL_LIBS)
  82. endif
  83. if HAVE_CQL
  84. kea_dhcp4_LDFLAGS += $(CQL_LIBS)
  85. endif
  86. kea_dhcp4dir = $(pkgdatadir)
  87. kea_dhcp4_DATA = dhcp4.spec
  88. if GENERATE_PARSER
  89. parser: dhcp4_lexer.cc location.hh position.hh stack.hh dhcp4_parser.cc dhcp4_parser.h
  90. @echo "Flex/bison files regenerated"
  91. # --- Flex/Bison stuff below --------------------------------------------------
  92. # When debugging grammar issues, it's useful to add -v to bison parameters.
  93. # bison will generate parser.output file that explains the whole grammar.
  94. # It can be used to manually follow what's going on in the parser.
  95. # This is especially useful if yydebug_ is set to 1 as that variable
  96. # will cause parser to print out its internal state.
  97. # Call flex with -s to check that the default rule can be suppressed
  98. # Call bison with -W to get warnings like unmarked empty rules
  99. # Note C++11 deprecated register still used by flex < 2.6.0
  100. location.hh position.hh stack.hh dhcp4_parser.cc dhcp4_parser.h: dhcp4_parser.yy
  101. $(YACC) --defines=dhcp4_parser.h --report=all --report-file=dhcp4_parser.report -o dhcp4_parser.cc dhcp4_parser.yy
  102. dhcp4_lexer.cc: dhcp4_lexer.ll
  103. $(LEX) --prefix parser4_ -o dhcp4_lexer.cc dhcp4_lexer.ll
  104. else
  105. parser location.hh position.hh stack.hh dhcp4_parser.cc dhcp4_parser.h dhcp4_lexer.cc:
  106. @echo Parser generation disabled. Configure with --enable-generate-parser to enable it.
  107. endif