---
 mpc2sv8/Makefile.am |    5 +++--
 mpcdec/Makefile.am  |    5 +++--
 mpcenc/Makefile.am  |    5 +++--
 3 files changed, 9 insertions(+), 6 deletions(-)

--- a/mpc2sv8/Makefile.am
+++ b/mpc2sv8/Makefile.am
@@ -11,6 +11,7 @@ common_sources = ../common/crc32.c
 METASOURCES = AUTO
 bin_PROGRAMS = mpc2sv8
 mpc2sv8_SOURCES = mpc2sv8.c $(common_sources)
-mpc2sv8_LDADD = -lm \
+mpc2sv8_LDADD = \
 	$(top_builddir)/libmpcdec/libmpcdec.la \
-	$(top_builddir)/libmpcenc/libmpcenc.a
+	$(top_builddir)/libmpcenc/libmpcenc.a \
+	-lm
--- a/mpcdec/Makefile.am
+++ b/mpcdec/Makefile.am
@@ -9,6 +9,7 @@ endif
 METASOURCES = AUTO
 bin_PROGRAMS = mpcdec
 mpcdec_SOURCES = mpcdec.c
-mpcdec_LDADD = -lm \
+mpcdec_LDADD = \
 	$(top_builddir)/libmpcdec/libmpcdec.la \
-	$(top_builddir)/libwavformat/libwavformat.a
+	$(top_builddir)/libwavformat/libwavformat.a \
+	-lm
--- a/mpcenc/Makefile.am
+++ b/mpcenc/Makefile.am
@@ -22,8 +22,9 @@ mpcenc_SOURCES = keyboard.c mpcenc.c pip
 	$(common_sources) \
 	mpcenc.h predict.h config.h
 
-mpcenc_LDADD = -lm \
+mpcenc_LDADD = \
 	$(EXTRALIBS) \
 	$(top_builddir)/libmpcpsy/libmpcpsy.a \
-	$(top_builddir)/libmpcenc/libmpcenc.a
+	$(top_builddir)/libmpcenc/libmpcenc.a \
+	-lm
 
