diff --git a/MDD/deconvolve.c b/MDD/deconvolve.c
index 6b88d68d438a081ef7328e2aaa6c5dea1408ab27..147fc7b6da2909c40e18485881cf0f5de472215f 100644
--- a/MDD/deconvolve.c
+++ b/MDD/deconvolve.c
@@ -3,6 +3,9 @@
 #include <assert.h>
 #include <math.h>
 #include <string.h>
+#ifdef MKL
+#include<mkl_cblas.h>
+#endif
 
 typedef struct { /* complex number */
 	float r,i;
diff --git a/Make_include_template b/Make_include_template
index e37379b66007c10d3fe05416be9a074e74aada35..44f672f07993901ff8697efec3076b4bfc5389a3 100644
--- a/Make_include_template
+++ b/Make_include_template
@@ -8,6 +8,12 @@
 # the current directory (in vi ":r!pwd")
 ROOT=/Users/jan/src/OpenSource
 
+#############################################################################
+# Some convenient abbreviations
+B = $(ROOT)/bin
+I = $(ROOT)/include
+L = $(ROOT)/lib
+
 ########################################################################
 # C compiler; change this only if you are using a different C-compiler
 
@@ -87,18 +93,16 @@ BLAS = ${MKLROOT}/lib/libmkl_intel_lp64.a ${MKLROOT}/lib/libmkl_sequential.a ${M
 #AMD ACML 4.4.0
 #AMDROOT = /home/thorbcke/amdsdk/v1.0/acml/open64_64
 #OPTC += -DACML440 -I$(AMDROOT)/include
-#LIBSM = -L$(AMDROOT)/lib -lacml -lfortran -lffio -lrt -lm
+#BLAS = -L$(AMDROOT)/lib -lacml -lfortran -lffio -lrt -lm
 #Intel MKL
 MKLROOT=/opt/intel/mkl/
 OPTC += -DMKL -I$(MKLROOT)/include
 FFT = ${MKLROOT}/lib/libmkl_intel_lp64.a ${MKLROOT}/lib/libmkl_sequential.a ${MKLROOT}/lib/libmkl_core.a -lpthread -lm -ldl
 
-#############################################################################
-# Some convenient abbreviations
+#LIBARIES
+LIBS= -L$L -lgenfft $(FFT) $(BLAS)
+
 
-B = $(ROOT)/bin
-I = $(ROOT)/include
-L = $(ROOT)/lib
 
 ########################################################################
 # standard CFLAGS
diff --git a/corrvir/Makefile b/corrvir/Makefile
index a8866219482d7e6fc03fcd94f46b8077b8f8e1d9..de45912b8eac959ba611b109b3b240c7d13810b6 100644
--- a/corrvir/Makefile
+++ b/corrvir/Makefile
@@ -3,7 +3,7 @@
 include ../Make_include
 
 ALLINC  = -I.
-LIBS    += -L$L -lgenfft -lm
+#LIBS    += -L$L -lgenfft -lm
 #OPTC += -g -O0 -m64
 #OPTC = -g -O0 -fno-omit-frame-pointer
 
diff --git a/fdelmodc/Makefile b/fdelmodc/Makefile
index 56b3c4db58b1edee66c9341b593d29f36afe820d..4214ad0836e2eb3fc6b8d426ffa5ec1138c22c57 100644
--- a/fdelmodc/Makefile
+++ b/fdelmodc/Makefile
@@ -5,8 +5,7 @@ include ../Make_include
 ########################################################################
 # define general include and system library
 ALLINC  = -I.
-LIBS    += -L$L -lgenfft -lm $(LIBSM)
-#LIBS    += -L$L -lgenfft -lm -lc
+#LIBS    += -L$L -lgenfft -lm $(LIBSM)
 #OPTC = -g -Wall -fsignaling-nans -O0 -fopenmp
 #OPTC += -fopenmp -Waddress
 #OPTC := $(subst -O3 -ffast-math, -O1 -g ,$(OPTC))
diff --git a/fdemmodc/Makefile b/fdemmodc/Makefile
index 762538283e1353e719731c662a3e473e22dd4ddb..60fc989b6bdea945895eb84ca3598b7c360b48ea 100644
--- a/fdemmodc/Makefile
+++ b/fdemmodc/Makefile
@@ -5,7 +5,7 @@ include ../Make_include
 ########################################################################
 # define general include and system library
 ALLINC  = -I.
-LIBS    += -L$L -lgenfft -lm $(LIBSM)
+#LIBS    += -L$L -lgenfft -lm $(LIBSM)
 #LIBS    += -L$L -lgenfft -lm -lc
 #OPTC = -g -Wall -fsignaling-nans -O0
 #OPTC += -fopenmp -Waddress
diff --git a/marchenko/Makefile b/marchenko/Makefile
index 237c134e904d7c4b7311e63065c4c09282ace67f..260e2c02845925df6222452cf89035f50faf8704 100644
--- a/marchenko/Makefile
+++ b/marchenko/Makefile
@@ -2,7 +2,7 @@
 
 include ../Make_include
 
-LIBS    += -L$L -lgenfft -lm $(LIBSM)
+#LIBS    += -L$L -lgenfft -lm $(LIBSM)
 #OPTC += -g -O0 -Wall 
 
 #ALL: fmute marchenko marchenko2
diff --git a/raytime/Makefile b/raytime/Makefile
index b3aa6f39b0b3a26f00e0c892e352eebbbe223768..398bd1fedc4198afb9c050c4acdfc0423f76a15e 100644
--- a/raytime/Makefile
+++ b/raytime/Makefile
@@ -5,7 +5,7 @@ include ../Make_include
 ########################################################################
 # define general include and system library
 ALLINC  = -I.
-LIBS    += -L$L -lgenfft -lm $(LIBSM)
+#LIBS    += -L$L -lgenfft -lm $(LIBSM)
 #LIBS    += -L$L -lgenfft -lm -lc
 #OPTC = -g -Wall -fsignaling-nans -O0
 #OPTC += -fopenmp -Waddress
diff --git a/raytime3d/Makefile b/raytime3d/Makefile
index be0bb6e043b09ee22c89254f9c54afceb990ad92..a71b7a36a1a2cd6c4cf0927efaad5e231d10e9e3 100644
--- a/raytime3d/Makefile
+++ b/raytime3d/Makefile
@@ -5,7 +5,7 @@ include ../Make_include
 ########################################################################
 # define general include and system library
 ALLINC  = -I.
-LIBS    += -L$L -lgenfft -lm $(LIBSM)
+#LIBS    += -L$L -lgenfft -lm $(LIBSM)
 #LIBS    += -L$L -lgenfft -lm -lc
 #OPTC = -g -Wall -fsignaling-nans -O0
 #OPTC += -fopenmp -Waddress
diff --git a/utils/Makefile b/utils/Makefile
index 9d47eceee936c6e5dffd52824bbd667ed5a4adea..7b056b16b5e646d7af1ae0f0101b8f2c1ead0027 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -2,7 +2,7 @@
 
 include ../Make_include
 
-LIBS    += -L$L -lgenfft -lm $(LIBSM)
+#LIBS    += -L$L -lgenfft -lm $(LIBSM)
 #OPTC += -openmp 
 #OPTC += -g -O0