diff options
-rw-r--r-- | Makefile.am | 8 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | test/Makefile.am | 3 |
3 files changed, 14 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 0c1a9f7..e30d9e3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,6 +5,14 @@ phosphor_inventory_SOURCES = \ xyz.openbmc_project.Inventory.Manager.cpp \ generated.cpp \ manager.cpp + +if EXAMPLE +noinst_LTLIBRARIES = libexample.la +libexample_la_SOURCES = \ + xyz.openbmc_project.Example.Iface1.cpp \ + xyz.openbmc_project.Example.Iface2.cpp +phosphor_inventory_LDADD = libexample.la +endif phosphor_inventory_LDFLAGS = $(SYSTEMD_LIBS) phosphor_inventory_CFLAGS = $(SYSTEMD_CFLAGS) diff --git a/configure.ac b/configure.ac index 936bdec..2f904ca 100644 --- a/configure.ac +++ b/configure.ac @@ -34,6 +34,9 @@ AS_IF([test "x$IFACE" == "x"], [IFACE="xyz.openbmc_project.Inventory.Manager"]) AC_DEFINE_UNQUOTED([BUSNAME], ["$BUSNAME"], [The DBus busname to own.]) AC_DEFINE_UNQUOTED([INVENTORY_ROOT], ["$INVENTORY_ROOT"], [The DBus inventory namespace root.]) AC_DEFINE_UNQUOTED([IFACE], ["$IFACE"], [The manager DBus interface.]) +AC_ARG_ENABLE([example], + AS_HELP_STRING([--enable-example], [Enable example configuration.])) +AM_CONDITIONAL([EXAMPLE], [test x$enable_example = xyes]) # Create configured output AC_CONFIG_FILES([Makefile test/Makefile]) diff --git a/test/Makefile.am b/test/Makefile.am index 94baa9a..f40f143 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -8,3 +8,6 @@ phosphor_inventory_test_LDADD = ${top_builddir}/manager.o \ ${top_builddir}/filters.o \ ${top_builddir}/generated.o \ ${top_builddir}/xyz.openbmc_project.Inventory.Manager.o +if EXAMPLE +phosphor_inventory_test_LDADD += ${top_builddir}/libexample.la +endif |