-
Notifications
You must be signed in to change notification settings - Fork 17
/
machine_settings.make
49 lines (42 loc) · 1.28 KB
/
machine_settings.make
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
43
44
45
46
47
48
49
DEBUG=FALSE
FC ?= $(shell nf-config --fc)
# The ? mark sets the compiler to whatever compiler you've chosen in your module environment.
LDFLAGS = $(shell nf-config --flibs)
LIBS = $(shell nc-config --libs)
FFLAGS = -c $(shell nf-config --fflags)
#------------------------------------------------------------------------
# Gfortran
#------------------------------------------------------------------------
ifeq ($(findstring gfortran, $(FC)),gfortran)
ifneq ($(findstring pgfortran, $(FC)),pgfortran)
ifeq ($(DEBUG),TRUE)
FFLAGS += -Wall -fbacktrace -fbounds-check -fno-range-check
else
FFLAGS += -O
endif
endif
endif
#------------------------------------------------------------------------
# NAG
#------------------------------------------------------------------------
ifeq ($(findstring nagfor, $(FC)),nagfor)
ifeq ($(DEBUG),TRUE)
FFLAGS += -g -C
else
FFLAGS += -O
endif
endif
#------------------------------------------------------------------------
# PGF95
#------------------------------------------------------------------------
ifeq ($(findstring pgf95, $(FC)),pgf95)
FFLAGS += -Mlarge_arrays
ifeq ($(DEBUG),TRUE)
FFLAGS += -g -Mbounds -traceback -Mchkfpstk
else
FFLAGS += -O
endif
endif
export LDFLAGS
export FFLAGS
export FC