From: Ole Streicher <debian@liska.ath.cx>
Date: Thu, 29 May 2014 10:09:47 +0200
Subject: Use system provided environment when building the test suite

---
 examples/Makefile | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/examples/Makefile b/examples/Makefile
index 63d9781..9f2bf26 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -10,10 +10,12 @@ F77=gfortran
 #F77CFLAGS=-g
 
 # uncomment the following for C MINPACK
-MINPACK=../libcminpack$(LIBSUFFIX).a
-CC=gcc
-CFLAGS=-g -Wall
-CPPFLAGS=-I..
+MINPACK=
+#CC=gcc
+#CFLAGS=-g -Wall
+CPPFLAGS+=-I..
+LIBPATH=$(shell echo ../obj-*)
+LDADD+=-L$(LIBPATH) -lcminpack -Wl,-rpath -Wl,$(LIBPATH)
 
 FMINPACK=../fortran/libminpack.a
 
