blob: a53747bd015f57c4719720ccd39f7ea118528764 [file] [log] [blame]
Deepak Kodihallif7b03992017-08-04 11:25:41 -05001BUILT_SOURCES=generated.cpp extra_ifaces.cpp gen_serialization.hpp
Brad Bishopa6fcd562017-02-03 11:00:27 -05002CLEANFILES=$(BUILT_SOURCES)
3
4AM_CPPFLAGS = -iquote$(top_srcdir)
5
Brad Bishop624827a2016-10-31 13:15:10 -05006check_PROGRAMS =
7noinst_PROGRAMS = phosphor-inventory-test
Brad Bishopa6fcd562017-02-03 11:00:27 -05008noinst_LTLIBRARIES = libtest.la
Brad Bishop49aefb32016-10-19 11:54:14 -04009
Brad Bishop783d1f92018-12-11 16:17:57 -050010TESTS = ${check_PROGRAMS}
11
Brad Bishop02bdbe72018-12-13 11:50:34 -050012types_test_SOURCES = types_test.cpp
13types_test_CFLAGS = ${GTEST_CFLAGS} ${GMOCK_CFLAGS}
14types_test_LDADD = ${GTEST_LIBS} ${GMOCK_LIBS}
15types_test_LDFLAGS = ${OESDK_TESTCASE_FLAGS}
16check_PROGRAMS += types-test
17
Brad Bishop68268402018-12-13 11:52:42 -050018utils_test_SOURCES = utils_test.cpp
19utils_test_CFLAGS = ${GTEST_CFLAGS} ${GMOCK_CFLAGS}
20utils_test_LDADD = ${GTEST_LIBS} ${GMOCK_LIBS}
21utils_test_LDFLAGS = ${OESDK_TESTCASE_FLAGS}
22check_PROGRAMS += utils-test
23
Brad Bishopca2a8412018-12-13 12:35:35 -050024serialize_test_SOURCES = serialize_test.cpp
25serialize_test_CFLAGS = ${GTEST_CFLAGS} ${GMOCK_CFLAGS}
Brad Bishopa2485502019-04-15 15:59:28 -040026serialize_test_LDADD = ${GTEST_LIBS} ${GMOCK_LIBS} -lstdc++fs
Brad Bishopca2a8412018-12-13 12:35:35 -050027serialize_test_LDFLAGS = ${OESDK_TESTCASE_FLAGS}
28check_PROGRAMS += serialize-test
29
Brad Bishop9cc42ab2018-12-12 16:36:51 -050030interface_ops_test_SOURCES = interface_ops_test.cpp
31interface_ops_test_CFLAGS = ${GTEST_CFLAGS} ${GMOCK_CFLAGS}
32interface_ops_test_LDADD = ${GTEST_LIBS} ${GMOCK_LIBS}
33interface_ops_test_LDFLAGS = ${OESDK_TESTCASE_FLAGS}
34check_PROGRAMS += interface-ops-test
35
Brad Bishop12ea1c52018-12-13 12:39:06 -050036manager_test_SOURCES = manager_test.cpp
37manager_test_CFLAGS = ${GTEST_CFLAGS} ${GMOCK_CFLAGS}
38manager_test_LDADD = ${GTEST_LIBS} ${GMOCK_LIBS}
39manager_test_LDFLAGS = ${OESDK_TESTCASE_FLAGS}
40check_PROGRAMS += manager-test
41
Matt Spinler99e66a02019-03-06 14:11:22 -060042associations_test_SOURCES = associations_test.cpp
43associations_test_CFLAGS = \
44 ${GTEST_CFLAGS} ${GMOCK_CFLAGS} $(SDBUSPLUS_CFLAGS) \
45 $(PHOSPHOR_DBUS_INTERACES_CFLAGS)
46associations_test_LDADD = \
47 ${GTEST_LIBS} ${GMOCK_LIBS} ${SDBUSPLUS_LIBS} -lstdc++fs \
48 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
49 $(top_builddir)/association_manager.o
50
51associations_test_LDFLAGS = ${OESDK_TESTCASE_FLAGS}
52check_PROGRAMS += associations-test
53
Brad Bishopa6fcd562017-02-03 11:00:27 -050054extra_yamldir=$(top_srcdir)/example/extra_interfaces.d
55
56phosphor_inventory_test_SOURCES = test.cpp
Brad Bishopef2325d2017-03-06 22:55:51 -050057phosphor_inventory_test_LDADD = \
58 libtest.la
Brad Bishop3ea767d2017-03-06 22:47:01 -050059 $(SDBSUPLUS_LIBS) \
Brad Bishopef2325d2017-03-06 22:55:51 -050060 $(PTHREAD_LIBS)
61phosphor_inventory_test_CXXFLAGS = \
62 $(SDBUSPLUS_CFLAGS) \
Brad Bishop3ea767d2017-03-06 22:47:01 -050063 $(PTHREAD_CFLAGS)
Brad Bishopa6fcd562017-02-03 11:00:27 -050064
Brad Bishopef2325d2017-03-06 22:55:51 -050065libtest_la_LDFLAGS = -static
Brad Bishopa6fcd562017-02-03 11:00:27 -050066libtest_la_SOURCES = \
67 extra_ifaces.cpp \
68 generated.cpp
Brad Bishop3ea767d2017-03-06 22:47:01 -050069libtest_la_LIBADD = \
70 $(top_builddir)/libmanagercommon.la \
71 $(SDBUSPLUS_LIBS)
Brad Bishopa6fcd562017-02-03 11:00:27 -050072
73clean-local: clean-extra
74
75generated.cpp:
76 $(AM_V_GEN)$(PYTHON) $(top_srcdir)/pimgen.py -d $(extra_yamldir)/.. -o $(builddir) generate-cpp
77
Deepak Kodihallif7b03992017-08-04 11:25:41 -050078gen_serialization.hpp:
79 $(AM_V_GEN)$(PYTHON) $(top_srcdir)/pimgen.py -d $(extra_yamldir)/.. -o $(builddir) generate-serialization
80
Brad Bishopa6fcd562017-02-03 11:00:27 -050081-include Makefile.extra