build: use configure rule whether host tool is built
Use a configure variable to control whether the host tool is built. It
is built by default.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ic5052fbd20cb16fe7fec8fc09d25b90457a5a645
diff --git a/test/Makefile.am b/test/Makefile.am
index c8eee3f..f0f87a4 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -32,10 +32,14 @@
firmware_delete_unittest \
firmware_sessionstat_unittest \
firmware_commit_unittest \
- file_handler_unittest \
+ file_handler_unittest
+
+if BUILD_HOST_TOOL
+check_PROGRAMS += \
tools_bt_unittest \
tools_lpc_unittest \
tools_updater_unittest
+endif
TESTS = $(check_PROGRAMS)
@@ -75,6 +79,7 @@
file_handler_unittest_SOURCES = file_handler_unittest.cpp
file_handler_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la -lstdc++fs
+if BUILD_HOST_TOOL
tools_bt_unittest_SOURCES = tools_bt_unittest.cpp
tools_bt_unittest_LDADD = $(top_builddir)/tools/libupdater.la
@@ -83,3 +88,4 @@
tools_updater_unittest_SOURCES = tools_updater_unittest.cpp
tools_updater_unittest_LDADD = $(top_builddir)/tools/libupdater.la
+endif