From 0ff867c2429f1e6fb045a4c123ba4fd24bc18bbd Mon Sep 17 00:00:00 2001 From: beveloper Date: Thu, 28 Nov 2002 14:06:11 +0000 Subject: [PATCH] if you specify DEBUG as environment variable, the DEBUG macro will be defined with the same value. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2101 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- Jamrules | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Jamrules b/Jamrules index 78580b573b..a31fd5ba10 100644 --- a/Jamrules +++ b/Jamrules @@ -84,13 +84,19 @@ if $(WARNINGS) { C++FLAGS += -Wpointer-arith -Wcast-align -Wsign-compare ; } +KERNEL_CCFLAGS ?= -Wall -Wno-multichar -Wmissing-prototypes -finline -nostdinc ; +KERNEL_CCFLAGS += -fno-builtin -D$(OBOS_TARGET_DEFINE) ; +KERNEL_CCFLAGS += -DBOCHS_DEBUG_HACK=$(BOCHS_DEBUG_HACK) ; + + # We might later want to introduce debug levels or handle the whole issue # differently. For now there's only on or off. # if $(DEBUG) { OPTIM ?= -O0 ; - CCFLAGS += -g ; - C++FLAGS += -g ; + CCFLAGS += -g -DDEBUG=$(DEBUG) ; + C++FLAGS += -g -DDEBUG=$(DEBUG) ; + KERNEL_CCFLAGS += -g -DDEBUG=$(DEBUG) ; LINKFLAGS += -g ; } else { OPTIM ?= -O2 ; @@ -99,10 +105,6 @@ if $(DEBUG) { # To disable for the tests OPTIM and DEBUG are overridden, set the environment # variable NO_TEST_DEBUG. -KERNEL_CCFLAGS ?= -Wall -Wno-multichar -Wmissing-prototypes -finline -nostdinc ; -KERNEL_CCFLAGS += -fno-builtin -D$(OBOS_TARGET_DEFINE) ; -KERNEL_CCFLAGS += -DBOCHS_DEBUG_HACK=$(BOCHS_DEBUG_HACK) ; - # Instructs the Library rule to not make its object files temporary. # This is need as some objects are used in a static library and for an # executable.