test/Makefile: Build test sources using automake targets
If you specify object files for LDADD it will use some kind of built in
rules for building those objects instead of adding the proper CFLAGS to
the compile process. This results in build failures if the CFLAGS were
actually needed to compile those objects.
Change-Id: I1b7837c41fb5fc840d8b913802cfcdc0ee800455
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index acb03b0..48b3559 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -35,13 +35,6 @@
watchdog_test_CXXFLAGS = ${utestCXXFLAGS}
watchdog_test_LDFLAGS = ${utestLDFLAGS}
-argument_test_SOURCES = argument_test.cpp
-timer_test_SOURCES = timer_test.cpp
-watchdog_test_SOURCES = watchdog_test.cpp
-
-argument_test_LDADD = $(top_builddir)/argument.o
-
-timer_test_LDADD = $(top_builddir)/timer.o
-
-watchdog_test_LDADD = $(top_builddir)/watchdog.o \
- $(top_builddir)/timer.o
+argument_test_SOURCES = ../argument.cpp argument_test.cpp
+timer_test_SOURCES = ../timer.cpp timer_test.cpp
+watchdog_test_SOURCES = ../timer.cpp ../watchdog.cpp watchdog_test.cpp