Fix debug/optimization flags

This commit is contained in:
Lorenzo Figini 2023-10-20 13:42:06 +02:00
parent 7d9f43e1af
commit e3656e8bdd

View File

@ -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
##