blob: 7d0e1d446404c236b8436665097e6ad8b110ee0a [file] [log] [blame]
Deepak Kodihallif7b03992017-08-04 11:25:41 -05001BUILT_SOURCES=generated.cpp extra_ifaces.cpp gen_serialization.hpp
Brad Bishopc7166352016-11-12 21:38:41 -05002
Brad Bishopa6fcd562017-02-03 11:00:27 -05003CLEANFILES=$(BUILT_SOURCES)
Brad Bishop1a886e32016-11-11 16:02:10 -05004
Patrick Venture2ed0fd12019-03-28 11:12:17 -07005bin_PROGRAMS = phosphor-inventory
Brad Bishopa6fcd562017-02-03 11:00:27 -05006noinst_LTLIBRARIES = libmanagercommon.la libmanager.la
7
8extra_yamldir=$(YAML_PATH)/extra_interfaces.d
Tom Josephf22bf822017-08-01 23:02:55 +05309base_yamldir=$(YAML_PATH)
Brad Bishopa6fcd562017-02-03 11:00:27 -050010
Brad Bishopd4468352016-10-31 13:20:02 -050011phosphor_inventory_SOURCES = app.cpp
Brad Bishopef2325d2017-03-06 22:55:51 -050012phosphor_inventory_LDADD = libmanager.la $(SDBUSPLUS_LIBS)
Andrew Geisslerd6819c92018-08-27 10:34:07 -070013phosphor_inventory_CXXFLAGS = $(SDBUSPLUS_CFLAGS) -flto
Brad Bishopd4468352016-10-31 13:20:02 -050014
Brad Bishopef2325d2017-03-06 22:55:51 -050015libmanagercommon_la_LDFLAGS = -static
Brad Bishopa6fcd562017-02-03 11:00:27 -050016libmanagercommon_la_SOURCES = \
Brad Bishop02379712017-01-31 22:24:27 -050017 errors.cpp \
Brad Bishopc1f47982017-02-09 01:27:38 -050018 functor.cpp \
Brad Bishop49aefb32016-10-19 11:54:14 -040019 manager.cpp
Matt Spinler852db672019-03-06 13:46:14 -060020
21if CREATE_INV_ASSOCIATIONS
22libmanagercommon_la_SOURCES += association_manager.cpp
23endif
24
Brad Bishop3ea767d2017-03-06 22:47:01 -050025libmanagercommon_la_LIBADD = \
26 $(SDBUSPLUS_LIBS) \
27 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Deepak Kodihalli6620e982017-08-05 13:09:54 -050028 $(PHOSPHOR_LOGGING_LIBS) \
29 -lstdc++fs
Brad Bishopef2325d2017-03-06 22:55:51 -050030libmanagercommon_la_CXXFLAGS = \
Brad Bishop3ea767d2017-03-06 22:47:01 -050031 $(SDBUSPLUS_CFLAGS) \
32 $(PHOSPHOR_DBUS_INTERACES_CFLAGS) \
33 $(PHOSPHOR_LOGGING_CFLAGS)
Brad Bishop64d994a2016-10-31 10:24:27 -050034
Brad Bishopef2325d2017-03-06 22:55:51 -050035libmanager_la_LDFLAGS = -static
Brad Bishopa6fcd562017-02-03 11:00:27 -050036libmanager_la_SOURCES = \
37 extra_ifaces.cpp \
38 generated.cpp
Brad Bishop3ea767d2017-03-06 22:47:01 -050039libmanager_la_LIBADD = \
40 libmanagercommon.la \
41 $(SDBUSPLUS_LIBS)
Brad Bishop1a886e32016-11-11 16:02:10 -050042
Brad Bishopa6fcd562017-02-03 11:00:27 -050043clean-local: clean-extra
44
Brad Bishop834989f2017-02-06 12:08:20 -050045if IFACES_PATH
46PIMGEN_ARGS=-i $(IFACES_PATH)
47endif
48
Brad Bishopa6fcd562017-02-03 11:00:27 -050049generated.cpp:
Deepak Kodihallif7b03992017-08-04 11:25:41 -050050 $(AM_V_GEN)$(PYTHON) $(top_srcdir)/pimgen.py $(PIMGEN_ARGS) -d \
Matthew Barth979eb592018-10-05 15:29:26 -050051 $(base_yamldir) -o $(builddir) -b $(BUSNAME) generate-cpp
Deepak Kodihallif7b03992017-08-04 11:25:41 -050052
53gen_serialization.hpp:
54 $(AM_V_GEN)$(PYTHON) $(top_srcdir)/pimgen.py $(PIMGEN_ARGS) -d \
Matthew Barth979eb592018-10-05 15:29:26 -050055 $(base_yamldir) -o $(builddir) -b $(BUSNAME) \
56 generate-serialization
Brad Bishop1a886e32016-11-11 16:02:10 -050057
Brad Bishop74e52bc2016-10-31 13:12:04 -050058SUBDIRS = . test
Brad Bishopa6fcd562017-02-03 11:00:27 -050059
60-include Makefile.extra