Index: Makefile |
diff --git a/Makefile b/Makefile |
index d73112719eee7d239a9717d09f9bf34ab83cb82e..9f12daa4e662538a55768192567bae511c5aae3c 100644 |
--- a/Makefile |
+++ b/Makefile |
@@ -4,7 +4,16 @@ |
export CC ?= gcc |
export CXX ?= g++ |
-export CFLAGS = -Wall -DNDEBUG -O3 -Werror -DCHROMEOS_ENVIRONMENT |
+export CFLAGS = -Wall -Werror -DCHROMEOS_ENVIRONMENT |
+ifeq (${DEBUG},) |
+CFLAGS += -O3 |
+else |
+CFLAGS += -O0 -g -DVBOOT_DEBUG |
+endif |
+ifeq (${DISABLE_NDEBUG},) |
+CFLAGS += -DNDEBUG |
+endif |
+ |
export TOP = $(shell pwd) |
export FWDIR=$(TOP)/firmware |
export HOSTDIR=$(TOP)/host |