-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmake.compiler
More file actions
35 lines (28 loc) · 827 Bytes
/
make.compiler
File metadata and controls
35 lines (28 loc) · 827 Bytes
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
PLATFORM ?= gnu
BUILD ?= release
ifeq ($(PLATFORM), gnu)
FC=gfortran
AR=gcc-ar
FFLAGS += -std=f2008 -fimplicit-none -J$(MODDIR) #-fopenmp
FFLAGS_LEGACY = -fimplicit-none -J$(MODDIR)
else ifeq ($(PLATFORM), intel)
FC=ifort
FFLAGS += -stand:f08 -module:$(MODDIR)
FFLAGS_LEGACY = $(FFLAGS)
else
$(error unrecognized platform.)
endif
ifeq ($(PLATFORM)-$(BUILD), gnu-debug)
FFLAGS += -g -Og -C -Wall -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow
else ifeq ($(PLATFORM)-$(BUILD), gnu-release)
FFLAGS += -O3
#-flto
else ifeq ($(PLATFORM)-$(BUILD), intel-debug)
FFLAGS += -g -O0 -check all -debug all -traceback -fpe0
else ifeq ($(PLATFORM)-$(BUILD), intel-release)
FFLAGS += -fast
else
$(error unrecognized build target.)
endif