diff --git a/Makefile b/Makefile index e3e90a0..62e24f7 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ GIT_DIRTY ?= $(shell test -n "$$(git status --porcelain)" && echo "-dirty") # Note: can't use ?= for FC because GNU Make defaults to f77 FC = gfortran LD = gfortran -FFLAGS += -O3 -J$(OBJDIR) -I$(INCDIR) -ffree-line-length-none -fPIC +FFLAGS += -J$(OBJDIR) -I$(INCDIR) -ffree-line-length-none -fPIC CPPFLAGS += -DREVISION=\"$(GIT_REV)$(GIT_DIRTY)\" -DPREFIX=\"$(PREFIX)\" # Static build options @@ -80,6 +80,9 @@ ifdef DEBUG FFLAGS += -ggdb -O0 -Wall -Wunused-parameter # Tricks to detect uninitialised memory FFLAGS += -finit-integer=7777777 -finit-real=snan -ffpe-trap=invalid +else +# Optimization level 3 +FFLAGS += -O3 endif ##