Add missing -g flag when debug mode enable

This commit is contained in:
Edouard Dupin 2012-08-08 09:34:46 +02:00
parent 6be7555799
commit 08c4d638b2
2 changed files with 16 additions and 15 deletions

View File

@ -29,18 +29,18 @@ endif
# Tools for target # Tools for target
ifneq ("$(CLANG)","1") ifneq ("$(CLANG)","1")
GCC ?= $(CROSS)gcc GCC ?= $(CROSS)gcc
GXX ?= $(CROSS)g++ GXX ?= $(CROSS)g++
else else
GCC ?= $(CROSS)clang GCC ?= $(CROSS)clang
GXX ?= $(CROSS)clang++ GXX ?= $(CROSS)clang++
endif endif
AR ?= $(CROSS)ar AR ?= $(CROSS)ar
LD ?= $(CROSS)ld LD ?= $(CROSS)ld
NM ?= $(CROSS)nm NM ?= $(CROSS)nm
STRIP ?= $(CROSS)strip STRIP ?= $(CROSS)strip
# This is the default target. It must be the first declared target. # This is the default target. It must be the first declared target.
all: all:
# Target global variables # Target global variables

View File

@ -50,19 +50,20 @@ endif
# Extra warnings # Extra warnings
ifeq ("$(W)","1") ifeq ("$(W)","1")
COMMON_FLAGS_WARNINGS += -Wconversion
COMMON_FLAGS_WARNINGS += -Wconversion COMMON_FLAGS_WARNINGS += -Wswitch-enum
COMMON_FLAGS_WARNINGS += -Wswitch-enum COMMON_FLAGS_WARNINGS += -Wcast-qual
COMMON_FLAGS_WARNINGS += -Wcast-qual # gcc >= 4.4.0
ifneq (0,$(shell expr $(GCC_VERSION) \>= 4.4.0))
# gcc >= 4.4.0 COMMON_FLAGS_WARNINGS += -Wframe-larger-than=1024
ifneq (0,$(shell expr $(GCC_VERSION) \>= 4.4.0)) endif
COMMON_FLAGS_WARNINGS += -Wframe-larger-than=1024
endif
endif endif
# Add common flags to specific flags # Add common flags to specific flags
GCC_FLAGS_WARNINGS += $(COMMON_FLAGS_WARNINGS) GCC_FLAGS_WARNINGS += $(COMMON_FLAGS_WARNINGS)
GXX_FLAGS_WARNINGS += $(COMMON_FLAGS_WARNINGS) GXX_FLAGS_WARNINGS += $(COMMON_FLAGS_WARNINGS)
ifeq ("$(DEBUG)","1")
TARGET_GLOBAL_CFLAGS += -g
TARGET_GLOBAL_CPPFLAGS += -g
endif