-
Notifications
You must be signed in to change notification settings - Fork 8
/
make.compiler
35 lines (28 loc) · 871 Bytes
/
make.compiler
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# --- Compile flags ---
# Compiler
FC = gfortran
BUILD ?= release
ifeq ($(FC), gfortran)
FC=gfortran
AR=gcc-ar
FOCAL_FFLAGS += -std=f2008 -fimplicit-none -J$(FOCAL_MODDIR)
FOCAL_FFLAGS_LEGACY = -fimplicit-none -J$(FOCAL_MODDIR)
else ifeq ($(FC), ifort)
FC=ifort
FOCAL_FFLAGS += -stand:f08 -module $(FOCAL_MODDIR)
FOCAL_FFLAGS_LEGACY = $(FOCAL_FFLAGS)
else
$(error unrecognized compiler $(FC).)
endif
ifeq ($(FC)-$(BUILD), gfortran-debug)
FOCAL_FFLAGS += -g -Og -C -Wall -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow
else ifeq ($(FC)-$(BUILD), gfortran-release)
FOCAL_FFLAGS += -O3
#-flto
else ifeq ($(FC)-$(BUILD), ifort-debug)
FOCAL_FFLAGS += -O0 -check all -debug all -traceback -fpe0
else ifeq ($(FC)-$(BUILD), ifort-release)
FOCAL_FFLAGS += -fast
else
$(error unrecognized build target.)
endif