From e9d82dd950cb23e79c3425a636a5ddc95b65f904 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 27 Apr 2021 19:15:45 +0200 Subject: Better makefile debugging structure --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5d8d616..4583234 100644 --- a/Makefile +++ b/Makefile @@ -14,10 +14,11 @@ BUILD = $(PWD)/build/ KERNEL = $(PWD)/kernel/ LIBS = $(PWD)/libs/ -all: compile +ifeq ($(DEBUG), 1) + CFLAGS_DEFAULT += -Wno-error -ggdb3 -s -fsanitize=undefined -fstack-protector-all +endif -debug: CFLAGS_DEFAULT += -Wno-error -ggdb3 -s -fsanitize=undefined -fstack-protector-all -debug: compile +all: compile export -- cgit v1.2.3