blob: 562de0395d67080517c5941a8ca4df3e9abd35ce [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) \
6 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
Patrick Venture9f514812018-06-27 10:19:32 -07007AM_LDFLAGS = \
Patrick Venture5d8f5702019-03-06 10:24:04 -08008 $(GTEST_LIBS) \
Patrick Venture609fe982018-04-17 17:51:56 -07009 $(GMOCK_LIBS) \
Patrick Venture5d8f5702019-03-06 10:24:04 -080010 -lgmock_main \
Patrick Venture609fe982018-04-17 17:51:56 -070011 $(OESDK_TESTCASE_FLAGS) \
12 $(SDBUSPLUS_LIBS) \
13 $(PHOSPHOR_DBUS_INTERFACES_LIBS)
14
15# Run all 'check' test programs
Patrick Venture0e2d68d2018-12-19 07:53:45 -080016check_PROGRAMS = hwmon_unittest fanpwm_unittest sensor_unittest
Patrick Venture609fe982018-04-17 17:51:56 -070017TESTS = $(check_PROGRAMS)
18
19hwmon_unittest_SOURCES = hwmon_unittest.cpp
20hwmon_unittest_LDADD = $(top_builddir)/hwmon.o
21
Patrick Venture50552372018-06-07 10:53:56 -070022fanpwm_unittest_SOURCES = fanpwm_unittest.cpp
23fanpwm_unittest_LDADD = $(PHOSPHOR_LOGGING_LIBS) $(top_builddir)/fan_pwm.o
Patrick Venture0e2d68d2018-12-19 07:53:45 -080024
25sensor_unittest_SOURCES = sensor_unittest.cpp
26sensor_unittest_CXXFLAGS = \
27 $(PHOSPHOR_LOGGING_CFLAGS) \
28 $(GPIOPLUS_CFLAGS)
29sensor_unittest_LDADD = \
30 -lstdc++fs \
31 $(PHOSPHOR_LOGGING_LIBS) \
32 $(GPIOPLUS_LIBS) \
33 $(top_builddir)/sensor.o \
34 $(top_builddir)/hwmon.o \
Patrick Venture99b95812018-12-19 08:59:15 -080035 env.o \
36 gpio.o