From 9255c4205b19703816039e26f80c7e5a218c982c Mon Sep 17 00:00:00 2001
From: JanThorbecke <janth@xs4all.nl>
Date: Thu, 20 Aug 2020 08:28:12 +0200
Subject: [PATCH] making make easier

---
 INSTALL               | 3 +++
 Make_include_template | 7 ++++---
 Makefile              | 2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/INSTALL b/INSTALL
index bc66f15..1abdd55 100644
--- a/INSTALL
+++ b/INSTALL
@@ -7,6 +7,9 @@ You can use Make_include_template as a first start:
 ```
 cp Make_include_template Make_include
 ```
+and set the ROOT directory to the current path with the following command:
+
+sed -i 's,REPLACE_WITH_PWD,'"$PWD"',' Make_include
 
 2) Check the compiler and CFLAGS options in the file Make_include and adapt to the system you are using. The default options are set for a the GNU C-compiler on a Linux system. A Fortran compiler is only needed for the MDD package. A C++ compiler is not needed to compile the code. The Makefile has been tested with GNU make. 
 If the fortran compiler (FC=) is not set the MDD package will not be build.
diff --git a/Make_include_template b/Make_include_template
index 9528e90..99b008d 100644
--- a/Make_include_template
+++ b/Make_include_template
@@ -6,7 +6,7 @@
 #   -3- on Solaris system use RANLIB=ranlib which is defined below
 
 # the current directory (in vi ":r!pwd")
-ROOT=/vardim/home/thorbcke/src/OpenSource
+ROOT=REPLACE_WITH_PWD
 
 #############################################################################
 # Some convenient abbreviations
@@ -20,7 +20,8 @@ L = $(ROOT)/lib
 #GNU 
 #CC = gcc-mp-5 
 CC = gcc
-FC = gfortran
+FC = 
+#FC = gfortran
 # Linux gcc version 4.x
 OPTC = -O3 -ffast-math
 ##to include parallelisation with OpenMP
@@ -74,7 +75,7 @@ OPTC += -fopenmp
 #############################################################################
 # BLAS and LAPACK libraries 
 #MKLROOT=/opt/intel/mkl/
-MKLROOT=
+#MKLROOT=
 ifneq ($(strip $(MKLROOT)),)
     ifeq ($(CC),icc)
         #for intel compilers
diff --git a/Makefile b/Makefile
index 047c717..56df78d 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ include Make_include
 all: mkdirs 
 	cd FFTlib		; $(MAKE)
 	cd fdelmodc		; $(MAKE) install
+	cd zfp			; $(MAKE) install
 	cd utils		; $(MAKE) install
 	cd marchenko	; $(MAKE) install
 	cd corrvir		; $(MAKE) install
@@ -15,7 +16,6 @@ else
 	@echo "***************************************************************************";
 	@echo "**** There is no MKL or other library for the FFTW calls in use by fdacrtmc";
 endif
-	cd zfp			; $(MAKE) install
 	cd fdelmodc3D	; $(MAKE) install
 	cd marchenko3D	; $(MAKE) install
 ifneq ($(strip $(FC)),)
-- 
GitLab