diff options
author | Wojtek Kosior <kwojtus@protonmail.com> | 2019-06-02 12:51:14 +0200 |
---|---|---|
committer | Wojtek Kosior <kwojtus@protonmail.com> | 2019-06-02 12:51:14 +0200 |
commit | ec0bf480229353c6de8c1836bd16fb31f4d26f58 (patch) | |
tree | 4dce80b5086c1a9f798e961e2a5916c85ba48e0d /Makefile | |
parent | 5d1fddc10b0eff740f186f38777314ed46ae2dd4 (diff) | |
download | fortran-assignment2-ec0bf480229353c6de8c1836bd16fb31f4d26f58.tar.gz fortran-assignment2-ec0bf480229353c6de8c1836bd16fb31f4d26f58.zip |
support 2 compilers
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
1 files changed, 26 insertions, 1 deletions
@@ -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 |