summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2014-12-08 13:32:22 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-12-15 22:46:25 +0000
commitfb05f742233c146d8c9c5abb4e55ebd98d990711 (patch)
treec81ba58110fccbcefcee677a1e619aed6cea59fd /Makefile
parent91ca05cf3ac251c196397de8dc2d0cb8c91abd4c (diff)
downloadchrome-ec-fb05f742233c146d8c9c5abb4e55ebd98d990711.tar.gz
Makefile: Add .config target
.config is a file in build/$BOARD that contains all defined config variables. It is used by external programs to know what features have been compiled for a specific board. BUG=chrome-os-partner:33908 TEST=Check .config is generated properly. Check content, check it updates when new .bin are created. BRANCH=none Change-Id: If93c2a393867a9fcb60841e282d8e6b933f3dfec Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/233888 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a2d321b17b..01581fba35 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,9 @@ PROJECT?=ec
# Output directory for build objects
out?=build/$(BOARD)
+# File containing configuration information
+config=$(out)/.config
+
# If no key file is provided, use the default dev key
PEM ?= board/$(BOARD)/dev_key.pem
@@ -136,7 +139,10 @@ all-y+=$(call objs_from_dir,test,$(PROJECT))
dirs=core/$(CORE) chip/$(CHIP) board/$(BOARD) private common power test util
dirs+=$(shell find driver -type d)
-all: $(out)/$(PROJECT).bin utils ${PROJECT_EXTRA}
+$(config): $(out)/$(PROJECT).bin
+ @printf '%s=y\n' $(_tsk_cfg) $(_flag_cfg) > $@
+
+all: $(config) utils ${PROJECT_EXTRA}
include Makefile.rules