From 79b27f40907a5050a2512d11703ab9bba3f64ec0 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Mon, 28 Dec 2009 21:29:02 +0800 Subject: [PATCH] Added flag to enable/disable debug symbols in the kernel - `export DEBUG_BUILD=yes` will enable a debug build, any other value will disable DWARF debug. --- Kernel/Makefile | 4 ++-- Kernel/Makefile.BuildNum | 2 +- Kernel/system.c | 2 +- Usermode/Applications/Makefile.cfg | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Kernel/Makefile b/Kernel/Makefile index 427f4e04..4cf661ad 100644 --- a/Kernel/Makefile +++ b/Kernel/Makefile @@ -20,10 +20,10 @@ CFLAGS += -Wall -Werror -O3 -fno-stack-protector -fno-builtin ASFLAGS += -D ARCH=\"$(ARCH)\" LDFLAGS += -T arch/$(ARCHDIR)/link.ld -if $(KERNEL_DEBUG) != "" then +ifeq ($(DEBUG_BUILD),yes) LDFLAGS += -g -if $(KERNEL_DEBUG) != "" then CFLAGS += -g +endif OBJ = $(addprefix arch/$(ARCHDIR)/,$(A_OBJ)) OBJ += heap.o messages.o debug.o modules.o lib.o syscalls.o system.o threads.o drvutil.o diff --git a/Kernel/Makefile.BuildNum b/Kernel/Makefile.BuildNum index 41c16ab1..60218c46 100644 --- a/Kernel/Makefile.BuildNum +++ b/Kernel/Makefile.BuildNum @@ -1 +1 @@ -BUILD_NUM = 1124 +BUILD_NUM = 1128 diff --git a/Kernel/system.c b/Kernel/system.c index 3d1ebcad..8c2d19dc 100644 --- a/Kernel/system.c +++ b/Kernel/system.c @@ -3,7 +3,7 @@ * Architecture Independent System Init * system.c */ -#define DEBUG 1 +#define DEBUG 0 #include // === TYPES === diff --git a/Usermode/Applications/Makefile.cfg b/Usermode/Applications/Makefile.cfg index fd8bc451..0418fb77 100644 --- a/Usermode/Applications/Makefile.cfg +++ b/Usermode/Applications/Makefile.cfg @@ -3,9 +3,9 @@ -include ../../../Makefile.cfg # satisfying 2 deep applications -if $(ACESSDIR) == "" then +ifeq ($(ACESSDIR),) -include ../../../../Makefile.cfg -#endif +endif ACESSUSERDIR := $(ACESSDIR)/Usermode ASFLAGS = -felf -- 2.20.1