diff --git a/configure.ac b/configure.ac index ed7eb853..976dee7b 100755 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,8 @@ AC_ARG_WITH(contrib, AS_HELP_STRING([--without-contrib], [disable inclusion of c if test "x$with_contrib" != "xno"; then AC_DEFINE_UNQUOTED(HAVE_CONTRIB, [1], [Defined if contributed sources are enabled.]) fi +AC_ARG_WITH(ebusfeed, AS_HELP_STRING([--with-ebusfeed], [enable inclusion of ebusfeed tool]), [with_ebusfeed=yes], []) +AM_CONDITIONAL([WITH_EBUSFEED], [test "x$with_ebusfeed" == "xyes"]) AC_ARG_WITH(argp-lib, AS_HELP_STRING([--with-argp-lib=PATH], [path to argp libraries]), [LDFLAGS+="-L$with_argp_lib"]) AC_ARG_WITH(argp-include, AS_HELP_STRING([--with-argp-include=PATH], [path to argp includes]), [CXXFLAGS+="-I$with_argp_include"]) AC_CHECK_FUNC([argp_parse], [have_argp=yes], AC_CHECK_LIB([argp], [argp_parse], [have_argp=yes; LIBS="-largp $LIBS"], [have_argp=no])) diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index f24b1f2b..eff8a866 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -10,4 +10,10 @@ add_executable(ebuspicloader ${ebuspicloader_SOURCES}) target_link_libraries(ebusctl utils ebus ${LIB_ARGP} ${ebusctl_LIBS}) target_link_libraries(ebuspicloader ${LIB_ARGP}) +if(WITH_EBUSFEED) + set(ebusfeed_SOURCES ebusfeed.cpp) + add_executable(ebusfeed ${ebusfeed_SOURCES}) + target_link_libraries(ebusfeed ebus ${LIB_ARGP} ${ebusfeed_LIBS}) +endif(WITH_EBUSFEED) + install(TARGETS ebusctl ebuspicloader EXPORT ebusd DESTINATION usr/bin) diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am index 49d31551..806b8e1f 100644 --- a/src/tools/Makefile.am +++ b/src/tools/Makefile.am @@ -9,6 +9,13 @@ ebusctl_LDADD = ../lib/utils/libutils.a ebuspicloader_SOURCES = ebuspicloader.cpp intelhex/intelhexclass.cpp +if WITH_EBUSFEED +bin_PROGRAMS += ebusfeed +ebusfeed_SOURCES = ebusfeed.cpp +ebusfeed_LDADD = ../lib/utils/libutils.a \ + ../lib/ebus/libebus.a +endif + distclean-local: -rm -f Makefile.in -rm -rf .libs