blob: 36edbca7df3ee936d2abcff2d7bf65b6e6db9fe7 [file] [log] [blame]
Brad Bishop1a886e32016-11-11 16:02:10 -05001EXTRAIFACES_C=@EXTRAIFACES_C@
2EXTRAIFACES_LO=@EXTRAIFACES_LO@
3BUILT_SOURCES=generated.cpp
Brad Bishopc7166352016-11-12 21:38:41 -05004
Brad Bishop1a886e32016-11-11 16:02:10 -05005CLEANFILES=$(BUILT_SOURCES) $(EXTRAIFACES_C) libextra.la
6
Brad Bishop73b776b2016-10-19 07:50:28 -04007sbin_PROGRAMS = phosphor-inventory
Brad Bishopd4468352016-10-31 13:20:02 -05008phosphor_inventory_SOURCES = app.cpp
9phosphor_inventory_LDADD = libmanager.la
Brad Bishopc7166352016-11-12 21:38:41 -050010phosphor_inventory_LDFLAGS = $(SYSTEMD_LIBS)
11phosphor_inventory_CFLAGS = $(SYSTEMD_CFLAGS)
Brad Bishopd4468352016-10-31 13:20:02 -050012
13noinst_LTLIBRARIES = libmanager.la
14libmanager_la_SOURCES = \
Brad Bishopadc45662016-10-28 20:00:57 -050015 xyz.openbmc_project.Inventory.Manager.cpp \
Brad Bishop789cf832016-10-22 00:47:54 -040016 generated.cpp \
Brad Bishop49aefb32016-10-19 11:54:14 -040017 manager.cpp
Brad Bishop1a886e32016-11-11 16:02:10 -050018libmanager_la_LIBADD = libextra.la
Brad Bishop64d994a2016-10-31 10:24:27 -050019
Brad Bishop1a886e32016-11-11 16:02:10 -050020# Automake does not allow autoconf substituted variables
21# in _SOURCES variables. Work around this by providing
22# our own target.
23#
24# Typically the recommendation is conditional compilation
25# but here the generated source files are completely
26# arbitrary and not known making that approach difficult.
27libextra.la: $(EXTRAIFACES_LO)
28 $(AM_V_CXXLD)$(CXXLINK) $(EXTRAIFACES_LO)
29
30$(EXTRAIFACES_C) generated.cpp:
31 $(AM_V_GEN)@PIMGEN@ -o $(top_builddir) generate-cpp
32
Brad Bishop74e52bc2016-10-31 13:12:04 -050033SUBDIRS = . test