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
This commit is contained in:
beveloper 2002-11-28 14:06:11 +00:00
parent a42a3ab57f
commit 0ff867c242

View File

@ -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.