diff --git a/examples/Makefile.am b/examples/Makefile.am
index b6a51a30005476ba71c1b5ba5c4324e1afa1010f..5d5a462d80f9c90c576f8a91c04fe9af83cf4412 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -22,7 +22,7 @@ AUTOMAKE_OPTIONS=gnu
 # Add the source directory and debug to CFLAGS
 AM_CFLAGS = -g -Wall -Werror -I../src $(OPENMP_CFLAGS) -DCPU_TPS=2.67e9
 
-AM_LDFLAGS =
+AM_LDFLAGS = -lm
 
 # Set-up the library
 bin_PROGRAMS = test
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 2b54b665c2068f0d58bec8a8f1618ce36e7d2966..c2cabb36d3807485085c1928c734a34183f01a94 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -271,7 +271,7 @@ AUTOMAKE_OPTIONS = gnu
 
 # Add the source directory and debug to CFLAGS
 AM_CFLAGS = -g -Wall -Werror -I../src $(OPENMP_CFLAGS) -DCPU_TPS=2.67e9
-AM_LDFLAGS = 
+AM_LDFLAGS = -lm
 
 # Sources for test
 test_SOURCES = test.c