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
ifneq ("$(CLANG)","1")
GCC ?= $(CROSS)gcc
GXX ?= $(CROSS)g++
GCC ?= $(CROSS)gcc
GXX ?= $(CROSS)g++
else
GCC ?= $(CROSS)clang
GXX ?= $(CROSS)clang++
GCC ?= $(CROSS)clang
GXX ?= $(CROSS)clang++
endif
AR ?= $(CROSS)ar
LD ?= $(CROSS)ld
NM ?= $(CROSS)nm
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:
# Target global variables

View File

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