From 5a50ce1cef6b0e18a18563284736b111d0dd3e28 Mon Sep 17 00:00:00 2001 From: Michele Guerini Rocco Date: Wed, 15 Dec 2021 02:31:06 +0100 Subject: [PATCH] Makefile: add debug option --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index e3e42a2..5760f73 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,13 @@ LIBRARIES := $(LIBRARIES:so=a) LDFLAGS += -static endif +# Debug build options +ifdef DEBUG +FFLAGS += -ggdb -O0 -Wall -Wunused-parameter +# Tricks to detect uninitialised memory +FFLAGS += -finit-integer=7777777 -finit-real=snan -ffpe-trap=invalid +endif + ## ## Targets ##