Index: Makefile |
diff --git a/Makefile b/Makefile |
index 36250fb67df56a76791c1e34ba88eab4887dc907..8566f06fb781aa11acdcefefef71a6d0f6974be3 100644 |
--- a/Makefile |
+++ b/Makefile |
@@ -3,6 +3,7 @@ |
# found in the LICENSE file. |
export FIRMWARE_ARCH |
+export FIRMWARE_CONFIG_PATH |
export CC ?= gcc |
export CXX ?= g++ |
@@ -15,7 +16,17 @@ endif |
ifeq (${DEBUG},) |
CFLAGS += -O3 |
else |
-CFLAGS += -O0 -g -DVBOOT_DEBUG |
+CFLAGS += -O0 |
+endif |
robotboy
2011/01/26 19:43:20
Won't these CFLAGS be overridden by the include of
Che-Liang Chiou
2011/01/27 02:12:53
They will if FIRMWARE_CONFIG_PATH is not empty.
I
|
+ |
+# Include compiler flags if provided. It is intended to override CC and CFLAGS |
+# that is set before. The CC and CFLAGS should not be overridden hereafter. |
+ifneq ($(FIRMWARE_CONFIG_PATH),) |
+include $(FIRMWARE_CONFIG_PATH) |
+endif |
+ |
+ifneq (${DEBUG},) |
+CFLAGS += -g -DVBOOT_DEBUG |
endif |
ifeq (${DISABLE_NDEBUG},) |