summaryrefslogtreecommitdiff
path: root/config.mk
diff options
context:
space:
mode:
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk26
1 files changed, 26 insertions, 0 deletions
diff --git a/config.mk b/config.mk
index b1254e9042..195787ecdb 100644
--- a/config.mk
+++ b/config.mk
@@ -41,7 +41,11 @@ endif
# clean the slate ...
PLATFORM_RELFLAGS =
+ifdef CONFIG_CW
+PLATFORM_CPPFLAGS = -DCONFIG_CW
+else
PLATFORM_CPPFLAGS =
+endif
PLATFORM_LDFLAGS =
#########################################################################
@@ -108,8 +112,13 @@ else
ARFLAGS = crv
endif
RELFLAGS= $(PLATFORM_RELFLAGS)
+ifdef CONFIG_CW
+DBGFLAGS= -g2 -gdwarf-2
+OPTFLAGS= -O1
+else
DBGFLAGS= -g # -DDEBUG
OPTFLAGS= -Os #-fomit-frame-pointer
+endif
ifndef LDSCRIPT
#LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
ifeq ($(CONFIG_NAND_U_BOOT),y)
@@ -136,6 +145,17 @@ CPPFLAGS += -I$(TOPDIR)/include
CPPFLAGS += -fno-builtin -ffreestanding -nostdinc \
-isystem $(gccincdir) -pipe $(PLATFORM_CPPFLAGS)
+ifdef CONFIG_CW
+
+ifdef BUILD_TAG
+CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -ggdb \
+ -DBUILD_TAG='"$(BUILD_TAG)"'
+else
+CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -ggdb
+endif
+
+else # !define CONFIG_CW
+
ifdef BUILD_TAG
CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes \
-DBUILD_TAG='"$(BUILD_TAG)"'
@@ -145,6 +165,8 @@ endif
CFLAGS += $(call cc-option,-fno-stack-protector)
+endif # CONFIG_CW
+
# avoid trigraph warnings while parsing pci.h (produced by NIOS gcc-2.9)
# this option have to be placed behind -Wall -- that's why it is here
ifeq ($(ARCH),nios)
@@ -155,7 +177,11 @@ endif
# $(CPPFLAGS) sets -g, which causes gcc to pass a suitable -g<format>
# option to the assembler.
+ifdef CONFIG_CW
+AFLAGS_DEBUG := -Wa,-gdwarf2
+else
AFLAGS_DEBUG :=
+endif
# turn jbsr into jsr for m68k
ifeq ($(ARCH),m68k)