blob: 60d07e0441d84be88f1a7acc71933ebbadfd0789 [file] [log] [blame]
Patrick Venture5d8f5702019-03-06 10:24:04 -08001AM_CPPFLAGS = \
2 -I$(top_srcdir)/ \
3 $(GTEST_CFLAGS) \
4 $(GMOCK_CFLAGS) \
Patrick Venture609fe982018-04-17 17:51:56 -07005 $(SDBUSPLUS_CFLAGS) \
Patrick Venture69a68ed2019-03-06 10:37:30 -08006 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
7 $(CODE_COVERAGE_CPPFLAGS)
8AM_CFLAGS = \
9 $(CODE_COVERAGE_CFLAGS)
10AM_CXXFLAGS = \
11 $(CODE_COVERAGE_CXXFLAGS)
Patrick Venture9f514812018-06-27 10:19:32 -070012AM_LDFLAGS = \
Patrick Venture5d8f5702019-03-06 10:24:04 -080013 $(GTEST_LIBS) \
Patrick Venture609fe982018-04-17 17:51:56 -070014 $(GMOCK_LIBS) \
Patrick Venture5d8f5702019-03-06 10:24:04 -080015 -lgmock_main \
Patrick Venture609fe982018-04-17 17:51:56 -070016 $(OESDK_TESTCASE_FLAGS) \
17 $(SDBUSPLUS_LIBS) \
Patrick Venture69a68ed2019-03-06 10:37:30 -080018 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
19 $(CODE_COVERAGE_LIBS)
Patrick Venture609fe982018-04-17 17:51:56 -070020
21# Run all 'check' test programs
Patrick Venture0e2d68d2018-12-19 07:53:45 -080022check_PROGRAMS = hwmon_unittest fanpwm_unittest sensor_unittest
Patrick Venture609fe982018-04-17 17:51:56 -070023TESTS = $(check_PROGRAMS)
24
25hwmon_unittest_SOURCES = hwmon_unittest.cpp
26hwmon_unittest_LDADD = $(top_builddir)/hwmon.o
27
Patrick Venture50552372018-06-07 10:53:56 -070028fanpwm_unittest_SOURCES = fanpwm_unittest.cpp
29fanpwm_unittest_LDADD = $(PHOSPHOR_LOGGING_LIBS) $(top_builddir)/fan_pwm.o
Patrick Venture0e2d68d2018-12-19 07:53:45 -080030
31sensor_unittest_SOURCES = sensor_unittest.cpp
32sensor_unittest_CXXFLAGS = \
33 $(PHOSPHOR_LOGGING_CFLAGS) \
34 $(GPIOPLUS_CFLAGS)
35sensor_unittest_LDADD = \
36 -lstdc++fs \
37 $(PHOSPHOR_LOGGING_LIBS) \
38 $(GPIOPLUS_LIBS) \
39 $(top_builddir)/sensor.o \
40 $(top_builddir)/hwmon.o \
Patrick Venture99b95812018-12-19 08:59:15 -080041 env.o \
42 gpio.o