summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2013-08-25 00:10:56 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2013-08-25 00:10:56 +0000
commit9f401cf11570fdefac2a19577f7fca69d8035c9a (patch)
treeb49b6aa98e43f55001c6219d9cf1b003b4ec6922
parentb695ff01c3b8798aae49e81f8ee8e25f5f3cf7e1 (diff)
downloadflashrom-9f401cf11570fdefac2a19577f7fca69d8035c9a.zip
flashrom-9f401cf11570fdefac2a19577f7fca69d8035c9a.tar.gz
Makefile: Explain process of handling CONFIG_* variables
Corresponding to flashrom svn r1721. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
-rw-r--r--Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 023c41d..3b24bc4 100644
--- a/Makefile
+++ b/Makefile
@@ -61,10 +61,13 @@ CFLAGS += -Werror
endif
###############################################################################
-# General OS/architecture specific settings.
+# General OS-specific settings.
+# 1. Prepare for later by gathering information about host and target OS
+# 2. Set compiler flags and parameters according to OSes
+# 3. Likewise verify user-supplied CONFIG_* variables.
# HOST_OS is only used to work around local toolchain issues.
-HOST_OS ?= $(shell uname)
+HOST_OS ?= $(shell uname)
ifeq ($(HOST_OS), MINGW32_NT-5.1)
# Explicitly set CC = gcc on MinGW, otherwise: "cc: command not found".
CC = gcc
@@ -263,6 +266,10 @@ override CONFIG_LINUX_SPI = no
endif
endif
+###############################################################################
+# General architecture-specific settings.
+# Like above for the OS, below we verify user-supplied options depending on the target architecture.
+
# Determine the destination processor architecture.
# IMPORTANT: The following line must be placed before ARCH is ever used
# (of course), but should come after any lines setting CC because the line
@@ -334,6 +341,9 @@ RELEASENAME ?= $(VERSION)
SVNDEF := -D'FLASHROM_VERSION="$(VERSION)"'
+###############################################################################
+# Default settings of CONFIG_* variables.
+
# Always enable internal/onboard support for now.
CONFIG_INTERNAL ?= yes
@@ -426,6 +436,7 @@ endif
###############################################################################
# Programmer drivers and programmer support infrastructure.
+# Depending on the CONFIG_* variables set and verified above we set compiler flags and parameters below.
FEATURE_CFLAGS += -D'CONFIG_DEFAULT_PROGRAMMER=$(CONFIG_DEFAULT_PROGRAMMER)'
OpenPOWER on IntegriCloud