]> git.sur5r.net Git - u-boot/blobdiff - Makefile
tools: Allow building with debug enabled
[u-boot] / Makefile
index 88128ec72a26878740dc3ac0719252819654bea4..7eaa392839142b272ffa7e54b75ef46529745c2e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -256,7 +256,8 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
 
 HOSTCC       = cc
 HOSTCXX      = c++
-HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
+               $(if $(CONFIG_TOOLS_DEBUG),-g)
 HOSTCXXFLAGS = -O2
 
 ifeq ($(HOSTOS),cygwin)