blob: 36f2b4f682a14ec1689b23d90693d4c1f7766b82 [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}
26serialize_test_LDADD = ${GTEST_LIBS} ${GMOCK_LIBS}
27serialize_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
Brad Bishopa6fcd562017-02-03 11:00:27 -050042extra_yamldir=$(top_srcdir)/example/extra_interfaces.d
43
44phosphor_inventory_test_SOURCES = test.cpp
Brad Bishopef2325d2017-03-06 22:55:51 -050045phosphor_inventory_test_LDADD = \
46 libtest.la
Brad Bishop3ea767d2017-03-06 22:47:01 -050047 $(SDBSUPLUS_LIBS) \
Brad Bishopef2325d2017-03-06 22:55:51 -050048 $(PTHREAD_LIBS)
49phosphor_inventory_test_CXXFLAGS = \
50 $(SDBUSPLUS_CFLAGS) \
Brad Bishop3ea767d2017-03-06 22:47:01 -050051 $(PTHREAD_CFLAGS)
Brad Bishopa6fcd562017-02-03 11:00:27 -050052
Brad Bishopef2325d2017-03-06 22:55:51 -050053libtest_la_LDFLAGS = -static
Brad Bishopa6fcd562017-02-03 11:00:27 -050054libtest_la_SOURCES = \
55 extra_ifaces.cpp \
56 generated.cpp
Brad Bishop3ea767d2017-03-06 22:47:01 -050057libtest_la_LIBADD = \
58 $(top_builddir)/libmanagercommon.la \
59 $(SDBUSPLUS_LIBS)
Brad Bishopa6fcd562017-02-03 11:00:27 -050060
61clean-local: clean-extra
62
63generated.cpp:
64 $(AM_V_GEN)$(PYTHON) $(top_srcdir)/pimgen.py -d $(extra_yamldir)/.. -o $(builddir) generate-cpp
65
Deepak Kodihallif7b03992017-08-04 11:25:41 -050066gen_serialization.hpp:
67 $(AM_V_GEN)$(PYTHON) $(top_srcdir)/pimgen.py -d $(extra_yamldir)/.. -o $(builddir) generate-serialization
68
Brad Bishopa6fcd562017-02-03 11:00:27 -050069-include Makefile.extra