Put most objects in a library
For easy sharing with other Makefiles.
Change-Id: I74635903be0119afcd13e1835cc4f28183f2c38b
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/Makefile.am b/Makefile.am
index b6e49b1..30353a7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,17 +1,20 @@
sbin_PROGRAMS = phosphor-inventory
-phosphor_inventory_SOURCES = \
- app.cpp \
+phosphor_inventory_SOURCES = app.cpp
+phosphor_inventory_LDADD = libmanager.la
+
+noinst_LTLIBRARIES = libmanager.la
+libmanager_la_SOURCES = \
xyz.openbmc_project.Inventory.Manager.cpp \
generated.cpp \
manager.cpp
if EXAMPLE
-noinst_LTLIBRARIES = libexample.la
+noinst_LTLIBRARIES += libexample.la
libexample_la_SOURCES = \
- xyz.openbmc_project.Example.Iface1.cpp \
+ xyz.openbmc_project.Example.Iface1.cpp \
xyz.openbmc_project.Example.Iface2.cpp
-phosphor_inventory_LDADD = libexample.la
+libmanager_la_LIBADD = libexample.la
endif
phosphor_inventory_LDFLAGS = $(SYSTEMD_LIBS)
phosphor_inventory_CFLAGS = $(SYSTEMD_CFLAGS)