--- TESTING/Makefile.orig	2011-10-27 21:49:47.000000000 +0200
+++ TESTING/Makefile	2014-08-27 19:38:04.000000000 +0200
@@ -54,7 +54,7 @@
 
 ./stest: $(SLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
 	$(LOADER) $(LOADOPTS) $(SLINTST) $(ALINTST) \
-        $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
+        $(TMGLIB) $(SUPERLULIB) $(BLASLIB) ${LDFLAGS} -lm -o $@
 
 stest.out: stest stest.csh
 	@echo Testing SINGLE PRECISION linear equation routines 
@@ -64,7 +64,7 @@
 
 ./dtest: $(DLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
 	$(LOADER) $(LOADOPTS) $(DLINTST) $(ALINTST) \
-        $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
+        $(TMGLIB) $(SUPERLULIB) $(BLASLIB) ${LDFLAGS} -lm -o $@
 
 dtest.out: dtest dtest.csh
 	@echo Testing DOUBLE PRECISION linear equation routines 
@@ -74,7 +74,7 @@
 
 ./ctest: $(CLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
 	$(LOADER) $(LOADOPTS) $(CLINTST) $(ALINTST) \
-	$(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
+	$(TMGLIB) $(SUPERLULIB) $(BLASLIB) ${LDFLAGS} -lm -o $@
 
 ctest.out: ctest ctest.csh
 	@echo Testing SINGLE COMPLEX linear equation routines 
@@ -84,7 +84,7 @@
 
 ./ztest: $(ZLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
 	$(LOADER) $(LOADOPTS) $(ZLINTST) $(ALINTST) \
-	$(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
+	$(TMGLIB) $(SUPERLULIB) $(BLASLIB) ${LDFLAGS} -lm -o $@
 
 ztest.out: ztest ztest.csh
 	@echo Testing DOUBLE COMPLEX linear equation routines 
