Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: Makefile

Issue 6297017: Import firmware compiler flags (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Makefile
diff --git a/Makefile b/Makefile
index 36250fb67df56a76791c1e34ba88eab4887dc907..0d29bd508313b1e51ed14aa247342f80ed92bc59 100644
--- a/Makefile
+++ b/Makefile
@@ -6,16 +6,26 @@ export FIRMWARE_ARCH
export CC ?= gcc
export CXX ?= g++
-ifeq ($(FIRMWARE_ARCH),)
-export CFLAGS = -Wall -Werror -DCHROMEOS_ENVIRONMENT
-else
export CFLAGS = -Wall -Werror
-endif
ifeq (${DEBUG},)
CFLAGS += -O3
else
-CFLAGS += -O0 -g -DVBOOT_DEBUG
+CFLAGS += -O0 -g
+endif
+
+# Override CC and CFLAGS only if FIRMWARE_CONFIG_PATH is not empty, but we
+# wish to preserve -D flags (so move all -D flags after this).
+ifneq (${FIRMWARE_CONFIG_PATH},)
+include ${FIRMWARE_CONFIG_PATH}
+endif
+
+ifeq ($(FIRMWARE_ARCH),)
+CFLAGS += -DCHROMEOS_ENVIRONMENT
+endif
+
+ifneq (${DEBUG},)
+CFLAGS += -DVBOOT_DEBUG
endif
ifeq (${DISABLE_NDEBUG},)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698