blob: fe66203e57da3011e5bad7c218c44cb7edebe7c3 [file] [log] [blame]
Brad Bishop83c43492017-05-22 22:04:03 -04001include $(top_srcdir)/vars.mk
2
3AM_CPPFLAGS = -iquote$(top_srcdir)/src
4gtest_cflags = $(PTHREAD_CFLAGS)
5gtest_ldadd = -lgtest -lgtest_main -lgmock $(PTHREAD_LIBS)
6
7TEMPLATESEARCH+=${srcdir}/templates
8
9check_PROGRAMS =
Brad Bishop13fd8722017-05-15 12:44:01 -040010noinst_PROGRAMS =
Brad Bishop83c43492017-05-22 22:04:03 -040011BUILT_SOURCES =
12CLEANFILES =
13
14TESTS = $(check_PROGRAMS)
Brad Bishopb6044802017-05-07 23:14:57 -040015
16check_PROGRAMS += pathgentest
17pathgentest_SOURCES = \
18 pathgentest.cpp
19pathgentest_CXXFLAGS = \
20 $(gtest_cflags)
21pathgentest_LDFLAGS = \
22 $(OESDK_TESTCASE_FLAGS)
23pathgentest_LDADD = \
24 ${gtest_ldadd}
25
26BUILT_SOURCES += pathgentest.hpp
27CLEANFILES += pathgentest.hpp
28
29PATH_TEST_GEN_DEPS = \
30 templates/pathgentest.mako.hpp \
31 yaml/pathgentest
32
33pathgentest.hpp: $(PDMGEN) $(PATH_TEST_GEN_DEPS)
34 $(AM_V_GEN) $(PYTHON) $(PDMGEN) \
35 -t pathgentest.mako.hpp \
36 -p "${TEMPLATESEARCH}" \
37 -d yaml/pathgentest \
38 -o $(builddir)/$@ \
39 generate-cpp
Brad Bishopc9e173f2017-05-09 00:23:11 -040040
41check_PROGRAMS += propertygentest
42propertygentest_SOURCES = \
43 propertygentest.cpp
44propertygentest_CXXFLAGS = \
45 $(gtest_cflags)
46propertygentest_LDFLAGS = \
47 $(OESDK_TESTCASE_FLAGS)
48propertygentest_LDADD = \
49 ${gtest_ldadd}
50
51BUILT_SOURCES += propertygentest.hpp
52CLEANFILES += propertygentest.hpp
53
54PROPERTY_TEST_GEN_DEPS = \
55 templates/propertygentest.mako.hpp \
56 yaml/propertygentest
57
58propertygentest.hpp: $(PROPERTY_TEST_GEN_DEPS)
59 $(AM_V_GEN) $(PYTHON) $(PDMGEN) \
60 -t propertygentest.mako.hpp \
61 -p "${TEMPLATESEARCH}" \
62 -d yaml/propertygentest \
63 -o $(builddir)/$@ \
64 generate-cpp
Brad Bishop13fd8722017-05-15 12:44:01 -040065
66check_PROGRAMS += propertywatchgentest
67propertywatchgentest_SOURCES = \
68 propertywatchgentest.cpp
69propertywatchgentest_CXXFLAGS = \
70 $(gtest_cflags)
71propertywatchgentest_LDFLAGS = \
72 $(OESDK_TESTCASE_FLAGS)
73propertywatchgentest_LDADD = \
74 ${gtest_ldadd}
75
76BUILT_SOURCES += propertywatchgentest.hpp
77CLEANFILES += propertywatchgentest.hpp
78
79PROPERTY_WATCH_TEST_GEN_DEPS = \
80 templates/propertywatchgentest.mako.hpp \
81 yaml/propertywatchgentest
82
83propertywatchgentest.hpp: $(PROPERTY_WATCH_TEST_GEN_DEPS)
84 $(AM_V_GEN) $(PYTHON) $(PDMGEN) \
85 -t propertywatchgentest.mako.hpp \
86 -p "${TEMPLATESEARCH}" \
87 -d yaml/propertywatchgentest \
88 -o $(builddir)/$@ \
89 generate-cpp
90
91# propertywatchtest is intentionally omitted from
92# check_PROGRAMS until a bug that manifests with
93# with GCC7 can be resolved.
94
95noinst_PROGRAMS += propertywatchtest
96propertywatchtest_SOURCES = \
97 propertywatchtest.cpp
98propertywatchtest_CXXFLAGS = \
99 $(gtest_cflags) \
100 ${SDBUSPLUS_CFLAGS}
101propertywatchtest_LDFLAGS = \
102 $(OESDK_TESTCASE_FLAGS)
103propertywatchtest_LDADD = \
104 ${gtest_ldadd} \
105 ${SDBUSPLUS_LIBS} \
106 $(builddir)/../propertywatch.o