d63ebf
diff -up lapack-3.7.1/INSTALL/make.inc.gfortran.shared lapack-3.7.1/INSTALL/make.inc.gfortran
d63ebf
--- lapack-3.7.1/INSTALL/make.inc.gfortran.shared	2017-08-01 11:46:10.665067382 -0400
d63ebf
+++ lapack-3.7.1/INSTALL/make.inc.gfortran	2017-08-01 11:46:10.667067346 -0400
d63ebf
@@ -83,3 +83,4 @@ CBLASLIB     = ../../libcblas.a
d63ebf
 LAPACKLIB    = liblapack.a
d63ebf
 TMGLIB       = libtmglib.a
d63ebf
 LAPACKELIB   = liblapacke.a
d63ebf
+SHLIB_LAPACKE = liblapacke.so
d63ebf
diff -up lapack-3.7.1/LAPACKE/Makefile.shared lapack-3.7.1/LAPACKE/Makefile
d63ebf
--- lapack-3.7.1/LAPACKE/Makefile.shared	2017-08-01 11:46:10.668067328 -0400
d63ebf
+++ lapack-3.7.1/LAPACKE/Makefile	2017-08-01 11:47:23.649755395 -0400
d63ebf
@@ -51,6 +51,9 @@ lapacke: include/lapacke_mangling.h
d63ebf
 include/lapacke_mangling.h: include/lapacke_mangling_with_flags.h.in
d63ebf
 	cp $< $@
d63ebf
 
d63ebf
+shlib: lapacke
d63ebf
+	$(CC) $(CFLAGS) -shared -Wl,-soname,$(SHLIB_LAPACKE).@SHORTVER@ -o $(SHLIB_LAPACKE).@LONGVER@ src/*.o utils/*.o $(LDFLAGS) $(LIBS) -lgfortran -lc
d63ebf
+
d63ebf
 lapacke_example: lapacke
d63ebf
 	$(MAKE) -C example
d63ebf