blob: f213b4f1bed8efbc1792777f4d994d889509cbba [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 Bishopa6fcd562017-02-03 11:00:27 -050036extra_yamldir=$(top_srcdir)/example/extra_interfaces.d
37
38phosphor_inventory_test_SOURCES = test.cpp
Brad Bishopef2325d2017-03-06 22:55:51 -050039phosphor_inventory_test_LDADD = \
40 libtest.la
Brad Bishop3ea767d2017-03-06 22:47:01 -050041 $(SDBSUPLUS_LIBS) \
Brad Bishopef2325d2017-03-06 22:55:51 -050042 $(PTHREAD_LIBS)
43phosphor_inventory_test_CXXFLAGS = \
44 $(SDBUSPLUS_CFLAGS) \
Brad Bishop3ea767d2017-03-06 22:47:01 -050045 $(PTHREAD_CFLAGS)
Brad Bishopa6fcd562017-02-03 11:00:27 -050046
Brad Bishopef2325d2017-03-06 22:55:51 -050047libtest_la_LDFLAGS = -static
Brad Bishopa6fcd562017-02-03 11:00:27 -050048libtest_la_SOURCES = \
49 extra_ifaces.cpp \
50 generated.cpp
Brad Bishop3ea767d2017-03-06 22:47:01 -050051libtest_la_LIBADD = \
52 $(top_builddir)/libmanagercommon.la \
53 $(SDBUSPLUS_LIBS)
Brad Bishopa6fcd562017-02-03 11:00:27 -050054
55clean-local: clean-extra
56
57generated.cpp:
58 $(AM_V_GEN)$(PYTHON) $(top_srcdir)/pimgen.py -d $(extra_yamldir)/.. -o $(builddir) generate-cpp
59
Deepak Kodihallif7b03992017-08-04 11:25:41 -050060gen_serialization.hpp:
61 $(AM_V_GEN)$(PYTHON) $(top_srcdir)/pimgen.py -d $(extra_yamldir)/.. -o $(builddir) generate-serialization
62
Brad Bishopa6fcd562017-02-03 11:00:27 -050063-include Makefile.extra