From ec0bf480229353c6de8c1836bd16fb31f4d26f58 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Sun, 2 Jun 2019 12:51:14 +0200 Subject: support 2 compilers --- Makefile | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2d9a5ea..a0d7d51 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,31 @@ +ifneq ($(FC), ifort) +ifneq ($(FC), gfortran) + +ifneq ($(shell which ifort 2>/dev/null),) +FC = ifort +endif + +ifneq ($(shell which gfortran 2>/dev/null),) FC = gfortran +endif + +endif +endif + + +ifndef FFLAGS + +ifeq ($(FC), gfortran) FFLAGS = -std=f2008 -Wall -pedantic -fbounds-check -fimplicit-none \ - -I/usr/include -lfftw3 -lm + -ffree-form -O2 -I/usr/include -lfftw3 -lm +endif + +ifeq ($(FC), ifort) +FFLAGS = -std08 -module . -implicitnone -pedantic -check bounds \ + -O2 -I/usr/include -lfftw3 -lm +endif + +endif all : fourier -- cgit v1.2.3