diff -Naur BLAS/SRC/Makefile BLAS/SRC/Makefile
--- BLAS/SRC/Makefile	2016-12-24 07:01:32.000000000 +0800
+++ BLAS/SRC/Makefile	2017-04-12 02:03:28.313365432 +0800
@@ -138,8 +138,7 @@
 	$(ZBLAS2) $(ZBLAS3) $(ALLBLAS)
 
 $(BLASLIB): $(ALLOBJ)
-	$(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ)
-	$(RANLIB) $@
+	$(LOADER) $(LOADOPTS) -z muldefs -shared -Wl,-soname,libblas.so -o $@ $(ALLOBJ)
 
 single: $(SBLAS1) $(ALLBLAS) $(SBLAS2) $(SBLAS3)
 	$(ARCH) $(ARCHFLAGS) $(BLASLIB) $(SBLAS1) $(ALLBLAS) \
diff -Naur make.inc make.inc
--- make.inc	1970-01-01 08:00:00.000000000 +0800
+++ make.inc	2017-04-12 02:03:28.293365301 +0800
@@ -0,0 +1,81 @@
+####################################################################
+#  LAPACK make include file.                                       #
+#  LAPACK, Version 3.7.0                                           #
+#  December 2016                                                   #
+####################################################################
+#
+SHELL = /bin/sh
+#
+#  Modify the FORTRAN and OPTS definitions to refer to the
+#  compiler and desired compiler options for your machine.  NOOPT
+#  refers to the compiler options desired when NO OPTIMIZATION is
+#  selected.  Define LOADER and LOADOPTS to refer to the loader and
+#  desired load options for your machine.
+#
+#  Note: During a regular execution, LAPACK might create NaN and Inf
+#  and handle these quantities appropriately. As a consequence, one
+#  should not compile LAPACK with flags such as -ffpe-trap=overflow.
+#
+FORTRAN  = gfortran
+OPTS     = -O2 -frecursive -fPIC
+DRVOPTS  = $(OPTS)
+NOOPT    = -O0 -frecursive -fPIC
+LOADER   = gfortran
+LOADOPTS =
+#
+#  Comment out the following line to include deprecated routines to the
+#  LAPACK library.
+#
+#BUILD_DEPRECATED = Yes
+#
+# Timer for the SECOND and DSECND routines
+#
+# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
+# TIMER    = EXT_ETIME
+# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
+# TIMER    = EXT_ETIME_
+# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
+TIMER    = INT_ETIME
+# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
+# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
+# TIMER    = INT_CPU_TIME
+# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
+# TIMER     = NONE
+#
+#  Configuration LAPACKE: Native C interface to LAPACK
+#  To generate LAPACKE library: type 'make lapackelib'
+#  Configuration file: turned off (default)
+#  Complex types: C99 (default)
+#  Name pattern: mixed case (default)
+#  (64-bit) Data model: LP64 (default)
+#
+# CC is the C compiler, normally invoked with options CFLAGS.
+#
+CC = gcc
+CFLAGS = -O3
+#
+#  The archiver and the flag(s) to use when building archive (library)
+#  If you system has no ranlib, set RANLIB = echo.
+#
+ARCH     = ar
+ARCHFLAGS= cr
+RANLIB   = ranlib
+#
+#  Location of the extended-precision BLAS (XBLAS) Fortran library
+#  used for building and testing extended-precision routines.  The
+#  relevant routines will be compiled and XBLAS will be linked only if
+#  USEXBLAS is defined.
+#
+# USEXBLAS    = Yes
+XBLASLIB     =
+# XBLASLIB    = -lxblas
+#
+#  The location of the libraries to which you will link.  (The
+#  machine-specific, optimized BLAS library should be used whenever
+#  possible.)
+#
+BLASLIB      = ../../libblas.so
+CBLASLIB     = ../../libcblas.so
+LAPACKLIB    = liblapack.so
+TMGLIB       = libtmglib.so
+LAPACKELIB   = liblapacke.so
diff -Naur SRC/Makefile SRC/Makefile
--- SRC/Makefile	2016-12-24 07:01:32.000000000 +0800
+++ SRC/Makefile	2017-04-12 02:03:28.307365392 +0800
@@ -464,7 +464,6 @@
    zgelqt.o zgelqt3.o zgemlqt.o \
    zgetsls.o zgeqr.o zlatsqr.o zlamtsqr.o zgemqr.o \
    zgelq.o zlaswlq.o zlamswlq.o zgemlq.o \
-   ztplqt.o ztplqt2.o ztpmlqt.o \
    zhetrd_2stage.o zhetrd_he2hb.o zhetrd_hb2st.o zhb2st_kernels.o \
    zheevd_2stage.o zheev_2stage.o zheevx_2stage.o zheevr_2stage.o \
    zhbev_2stage.o zhbevx_2stage.o zhbevd_2stage.o zhegv_2stage.o
@@ -508,8 +507,7 @@
 all: ../$(LAPACKLIB)
 
 ../$(LAPACKLIB): $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED)
-	$(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED)
-	$(RANLIB) $@
+	$(LOADER) $(LOADOPTS) -shared -Wl,-soname,liblapack.so -o $@ $(ALLOBJ)
 
 single: $(SLASRC) $(DSLASRC) $(SXLASRC) $(SCLAUX) $(ALLAUX)
 	$(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(DSLASRC) \
diff -Naur TESTING/MATGEN/Makefile TESTING/MATGEN/Makefile
--- TESTING/MATGEN/Makefile	2016-12-24 07:01:32.000000000 +0800
+++ TESTING/MATGEN/Makefile	2017-04-12 02:03:28.318365465 +0800
@@ -59,8 +59,7 @@
 	$(DZATGEN)
 
 ../../$(TMGLIB): $(ALLOBJ)
-	$(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ)
-	$(RANLIB) $@
+	$(LOADER) $(LOADOPTS) -shared -Wl,-soname,libtmglib.so -o $@ $(ALLOBJ)
 
 single: $(SMATGEN) $(SCATGEN)
 	$(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $(SMATGEN) $(SCATGEN)
