Matt Spinler | b96fa32 | 2018-03-27 13:39:33 -0500 | [diff] [blame] | 1 | AM_CPPFLAGS = -I$(top_srcdir) |
| 2 | |
| 3 | TESTS = $(check_PROGRAMS) |
| 4 | |
Matt Spinler | a3c33e7 | 2018-05-23 13:02:51 -0500 | [diff] [blame] | 5 | check_PROGRAMS = test_policy test_callout |
Matt Spinler | b96fa32 | 2018-03-27 13:39:33 -0500 | [diff] [blame] | 6 | |
Matt Spinler | a3c33e7 | 2018-05-23 13:02:51 -0500 | [diff] [blame] | 7 | test_cppflags = \ |
| 8 | -Igtest \ |
| 9 | $(GTEST_CPPFLAGS) \ |
| 10 | $(AM_CPPFLAGS) |
Matt Spinler | b96fa32 | 2018-03-27 13:39:33 -0500 | [diff] [blame] | 11 | |
Matt Spinler | a3c33e7 | 2018-05-23 13:02:51 -0500 | [diff] [blame] | 12 | test_cxxflags = \ |
| 13 | $(PTHREAD_CFLAGS) \ |
| 14 | $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \ |
| 15 | $(IBM_DBUS_INTERFACES_CFLAGS) \ |
| 16 | $(SDBUSPLUS_CFLAGS) \ |
| 17 | $(PHOSPHOR_LOGGING_CFLAGS) |
| 18 | |
| 19 | test_ldflags = \ |
| 20 | -lgtest_main -lgtest \ |
| 21 | -lstdc++fs \ |
| 22 | $(PTHREAD_LIBS) \ |
| 23 | $(OESDK_TESTCASE_FLAGS) \ |
| 24 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ |
| 25 | $(IBM_DBUS_INTERFACES_LIBS) \ |
| 26 | $(SDBUSPLUS_LIBS) |
| 27 | |
| 28 | test_policy_CPPFLAGS = $(test_cppflags) |
| 29 | test_policy_CXXFLAGS = $(test_cxxflags) |
| 30 | test_policy_LDFLAGS = $(test_ldflags) |
Matt Spinler | b96fa32 | 2018-03-27 13:39:33 -0500 | [diff] [blame] | 31 | test_policy_SOURCES = test_policy.cpp |
| 32 | test_policy_LDADD = \ |
| 33 | $(top_builddir)/policy_table.o \ |
Matt Spinler | a3c33e7 | 2018-05-23 13:02:51 -0500 | [diff] [blame] | 34 | $(top_builddir)/policy_find.o |
| 35 | |
| 36 | test_callout_CPPFLAGS = $(test_cppflags) |
| 37 | test_callout_CXXFLAGS = $(test_cxxflags) |
| 38 | test_callout_LDFLAGS = $(test_ldflags) |
| 39 | test_callout_SOURCES = test_callout.cpp |
| 40 | |
Matt Spinler | a3c33e7 | 2018-05-23 13:02:51 -0500 | [diff] [blame] | 41 | test_callout_LDADD = \ |
Matt Spinler | a3c33e7 | 2018-05-23 13:02:51 -0500 | [diff] [blame] | 42 | $(top_builddir)/callout.o |
| 43 | |
| 44 | |