diff --git a/Makefile.power b/Makefile.power index 3fa6d6faf8..d3b88db83e 100644 --- a/Makefile.power +++ b/Makefile.power @@ -93,6 +93,11 @@ FCOMMON_OPT += -O2 -Mrecursive endif endif +ifeq ($(DEBUG), 1) +CCOMMON_OPT:= $(filter-out -O3 -O2 -O1 -Ofast, $(CCOMMON_OPT)) -O0 +FCOMMON_OPT:= $(filter-out -O3 -O2 -O1 -Ofast, $(FCOMMON_OPT)) -O0 +endif + ifeq ($(USE_OPENMP), 1) ifneq ($(C_COMPILER), PGI) CCOMMON_OPT += -DUSE_OPENMP -fopenmp