diff --git a/src/cluster/cluster.cpp b/src/cluster/cluster.cpp
index 52ab59ac92213ffae67c05510a6bfad9ecf097ab..75e053cd61fd0b94303a6a4247ebabc26ede805e 100644
--- a/src/cluster/cluster.cpp
+++ b/src/cluster/cluster.cpp
@@ -43,9 +43,9 @@
 #include "../include/algebraic.h"
 #endif
 
-#ifdef LAPACK_ILP64
-#define USE_LAPACK
-#endif
+//#ifdef LAPACK_ILP64
+//#define USE_LAPACK
+//#endif
 
 using namespace std;
 
diff --git a/src/make.inc b/src/make.inc
index d5b96b5aca4496a03b31ccef554a600e14daf737..85c0c73b8076689864a0ef4d1719758d302aa578 100644
--- a/src/make.inc
+++ b/src/make.inc
@@ -73,11 +73,12 @@ endif
 
 # CXXFLAGS defines the default compilation options for the C++ compiler
 ifndef CXXFLAGS
-ifdef USE_LAPACK
-override CXXFLAGS=-O3 -ggdb -pg -coverage -I$(HDF5_INCLUDE) -I$(LAPACK_INCLUDE)
-else
 override CXXFLAGS=-O3 -ggdb -pg -coverage -I$(HDF5_INCLUDE)
-#override CXXFLAGS=-O3 -I$(HDF5_INCLUDE)
+ifdef USE_LAPACK
+override CXXFLAGS+= -DUSE_LAPACK -DMKL_ILP64 -DLAPACK_ILP64 
+ifdef USE_MKL
+override CXXFLAGS+= -DMKL_ILP64 -I$(MKLROOT)/include
+endif
 endif
 endif
 
@@ -87,9 +88,11 @@ ifndef CXXLDFLAGS
 ifndef HDF5_LIB
 override HDF5_LIB=/usr/lib/x86_64-linux-gnu/hdf5/serial
 endif
-override CXXLDFLAGS=-L/usr/lib64 -L$(HDF5_LIB) -lhdf5 $(LAPACK_LDFLAGS) $(LDFLAGS)
-#else
-#override CXXLDFLAGS=-L/usr/lib64 -L$(HDF5_LIB) -lhdf5 $(CXXLDFLAGS)
+override CXXLDFLAGS=-L/usr/lib64 -L$(HDF5_LIB) -lhdf5
+ifdef USE_LAPACK
+override CXXLDFLAGS+= $(LAPACK_LDFLAGS)
+endif
+override CXXLDFLAGS+= $(LDFLAGS)
 endif
 
 #SOFLAGS defines the additional flags for the c++ compiler to create a shared object file