diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2016-11-11 16:02:10 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2016-11-21 11:49:37 -0500 |
commit | 1a886e36312944614106992ab13f60aea278dc75 (patch) | |
tree | c3964c41131a071e1a17742072c241bf0483361d /Makefile.am | |
parent | 14a9fe5e15c588e82efa002faaac8d38a087b779 (diff) | |
download | phosphor-inventory-manager-1a886e36312944614106992ab13f60aea278dc75.tar.gz phosphor-inventory-manager-1a886e36312944614106992ab13f60aea278dc75.zip |
build: Add targets for generated files
Add a target for generated.cpp.
Add targets for extra interfaces.
Remove example configure option - this is now driven
by the input yaml filesystem.
Add YAML_PATH autoconf variable.
Change-Id: Ieff734948088d3252e346a8dcc0e1dd6caf83333
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am index 30353a7..21b8f38 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,8 @@ +EXTRAIFACES_C=@EXTRAIFACES_C@ +EXTRAIFACES_LO=@EXTRAIFACES_LO@ +BUILT_SOURCES=generated.cpp +CLEANFILES=$(BUILT_SOURCES) $(EXTRAIFACES_C) libextra.la + sbin_PROGRAMS = phosphor-inventory phosphor_inventory_SOURCES = app.cpp @@ -8,14 +13,21 @@ libmanager_la_SOURCES = \ xyz.openbmc_project.Inventory.Manager.cpp \ generated.cpp \ manager.cpp +libmanager_la_LIBADD = libextra.la + +# Automake does not allow autoconf substituted variables +# in _SOURCES variables. Work around this by providing +# our own target. +# +# Typically the recommendation is conditional compilation +# but here the generated source files are completely +# arbitrary and not known making that approach difficult. +libextra.la: $(EXTRAIFACES_LO) + $(AM_V_CXXLD)$(CXXLINK) $(EXTRAIFACES_LO) + +$(EXTRAIFACES_C) generated.cpp: + $(AM_V_GEN)@PIMGEN@ -o $(top_builddir) generate-cpp -if EXAMPLE -noinst_LTLIBRARIES += libexample.la -libexample_la_SOURCES = \ - xyz.openbmc_project.Example.Iface1.cpp \ - xyz.openbmc_project.Example.Iface2.cpp -libmanager_la_LIBADD = libexample.la -endif phosphor_inventory_LDFLAGS = $(SYSTEMD_LIBS) phosphor_inventory_CFLAGS = $(SYSTEMD_CFLAGS) |