blob: 27885d3b4e72190fc151e00243a60b9d94f97b6a [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
Brad Bishop73b776b2016-10-19 07:50:28 -04005sbin_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
Brad Bishop3ea767d2017-03-06 22:47:01 -050020libmanagercommon_la_LIBADD = \
21 $(SDBUSPLUS_LIBS) \
22 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Deepak Kodihalli6620e982017-08-05 13:09:54 -050023 $(PHOSPHOR_LOGGING_LIBS) \
24 -lstdc++fs
Brad Bishopef2325d2017-03-06 22:55:51 -050025libmanagercommon_la_CXXFLAGS = \
Brad Bishop3ea767d2017-03-06 22:47:01 -050026 $(SDBUSPLUS_CFLAGS) \
27 $(PHOSPHOR_DBUS_INTERACES_CFLAGS) \
28 $(PHOSPHOR_LOGGING_CFLAGS)
Brad Bishop64d994a2016-10-31 10:24:27 -050029
Brad Bishopef2325d2017-03-06 22:55:51 -050030libmanager_la_LDFLAGS = -static
Brad Bishopa6fcd562017-02-03 11:00:27 -050031libmanager_la_SOURCES = \
32 extra_ifaces.cpp \
33 generated.cpp
Brad Bishop3ea767d2017-03-06 22:47:01 -050034libmanager_la_LIBADD = \
35 libmanagercommon.la \
36 $(SDBUSPLUS_LIBS)
Brad Bishop1a886e32016-11-11 16:02:10 -050037
Brad Bishopa6fcd562017-02-03 11:00:27 -050038clean-local: clean-extra
39
Brad Bishop834989f2017-02-06 12:08:20 -050040if IFACES_PATH
41PIMGEN_ARGS=-i $(IFACES_PATH)
42endif
43
Brad Bishopa6fcd562017-02-03 11:00:27 -050044generated.cpp:
Deepak Kodihallif7b03992017-08-04 11:25:41 -050045 $(AM_V_GEN)$(PYTHON) $(top_srcdir)/pimgen.py $(PIMGEN_ARGS) -d \
Matthew Barth979eb592018-10-05 15:29:26 -050046 $(base_yamldir) -o $(builddir) -b $(BUSNAME) generate-cpp
Deepak Kodihallif7b03992017-08-04 11:25:41 -050047
48gen_serialization.hpp:
49 $(AM_V_GEN)$(PYTHON) $(top_srcdir)/pimgen.py $(PIMGEN_ARGS) -d \
Matthew Barth979eb592018-10-05 15:29:26 -050050 $(base_yamldir) -o $(builddir) -b $(BUSNAME) \
51 generate-serialization
Brad Bishop1a886e32016-11-11 16:02:10 -050052
Brad Bishop74e52bc2016-10-31 13:12:04 -050053SUBDIRS = . test
Brad Bishopa6fcd562017-02-03 11:00:27 -050054
55-include Makefile.extra