forked from ecmwf-ifs/ecrad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile_include.gfortran
42 lines (32 loc) · 1.17 KB
/
Makefile_include.gfortran
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
36
37
38
39
40
41
42
# Fortran compiler executable -*- Makefile -*-
FC = gfortran
# Tell the compiler to accept C-preprocessor directives
CPPFLAGS = -cpp
# Basic flags such as where to write module files. We used to have the
# flag "-fconvert=big-endian" here because the RRTM input files are
# big endian Fortran unformatted files, but now the file ordering has
# been specified at the OPEN command so no compiler flags are needed.
BASICFLAGS = -J../mod -fno-range-check
# OpenMP flag; type "make OMPFLAG=-DNO_OPENMP" to compile with OpenMP
# disabled
OMPFLAG = -fopenmp
ifndef DEBUG
# --NORMAL CONFIGURATION--
# Optimization flags
OPTFLAGS = -O3
# -march=native
# Warning flags: all except those that warn about unused stuff
WARNFLAGS = -Wall -Wno-unused-label -Wno-unused-dummy-argument -Wno-unused-variable
# Debugging flags, such as "-g" to store debugging symbols, and
# instructions to abort if certain floating-point exceptions occur
DEBUGFLAGS = -g -ffpe-trap=invalid,zero,overflow
else
# --DEBUGGING CONFIGURATION--
OPTFLAGS = -O0
WARNFLAGS = -Wall
DEBUGFLAGS = -g -ffpe-trap=invalid,zero,overflow -fcheck=bounds -finit-real=snan -fbacktrace
endif
ifdef GPROF
# Add gprof output
DEBUGFLAGS += -pg
endif