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:
@@ -84,13 +84,19 @@ if $(WARNINGS) {
|
|||||||
C++FLAGS += -Wpointer-arith -Wcast-align -Wsign-compare ;
|
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
|
# We might later want to introduce debug levels or handle the whole issue
|
||||||
# differently. For now there's only on or off.
|
# differently. For now there's only on or off.
|
||||||
#
|
#
|
||||||
if $(DEBUG) {
|
if $(DEBUG) {
|
||||||
OPTIM ?= -O0 ;
|
OPTIM ?= -O0 ;
|
||||||
CCFLAGS += -g ;
|
CCFLAGS += -g -DDEBUG=$(DEBUG) ;
|
||||||
C++FLAGS += -g ;
|
C++FLAGS += -g -DDEBUG=$(DEBUG) ;
|
||||||
|
KERNEL_CCFLAGS += -g -DDEBUG=$(DEBUG) ;
|
||||||
LINKFLAGS += -g ;
|
LINKFLAGS += -g ;
|
||||||
} else {
|
} else {
|
||||||
OPTIM ?= -O2 ;
|
OPTIM ?= -O2 ;
|
||||||
@@ -99,10 +105,6 @@ if $(DEBUG) {
|
|||||||
# To disable for the tests OPTIM and DEBUG are overridden, set the environment
|
# To disable for the tests OPTIM and DEBUG are overridden, set the environment
|
||||||
# variable NO_TEST_DEBUG.
|
# 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.
|
# 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
|
# This is need as some objects are used in a static library and for an
|
||||||
# executable.
|
# executable.
|
||||||
|
|||||||
Reference in New Issue
Block a user