From 6d696e532c6a0c93ad9b915c59dad4144e6f1b33 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 14 Nov 2011 13:46:33 -0800 Subject: Allow caller to specify build output directory This changes the Makefile to set the BUILD directory only if the caller does not specify it. This allows U-Boot to build vboot reference and put the resulting binaries into its own output directory. BUG=chromium-os:16808 TEST=emerge vboot_reference-firmware for tegra2-seaboard, x86-mario Change-Id: I6b0bba47e397f86a130e67c4e18fbcf5fffdfd68 Reviewed-on: https://gerrit.chromium.org/gerrit/11638 Reviewed-by: Bill Richardson Commit-Ready: Simon Glass Tested-by: Simon Glass --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 19b91d52..d8ee8392 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,12 @@ export FIRMWARE_ARCH export MOCK_TPM +# This Makefile normally builds in a 'build' subdir, but use +# +# make BUILD= +# +# to put the output somewhere else + # # Provide default CC and CFLAGS for firmware builds; if you have any -D flags, # please add them after this point (e.g., -DVBOOT_DEBUG). @@ -74,7 +80,7 @@ else export INCLUDES = -I$(FWDIR)/include -I$(FWDIR)/arch/$(FIRMWARE_ARCH)/include endif -export BUILD = ${TOP}/build +export BUILD ?= ${TOP}/build export FWLIB = ${BUILD}/vboot_fw.a export HOSTLIB = ${BUILD}/vboot_host.a @@ -93,7 +99,7 @@ all: mkdir -p $$newdir; \ fi; \ done; \ - [ -z "$(FIRMWARE_ARCH)" ] && make -C utility update_tlcl_structures; \ + [ -z "$(FIRMWARE_ARCH)" ] && $(MAKE) -C utility update_tlcl_structures; \ for i in $(SUBDIRS); do \ make -C $$i; \ done -- cgit v1.2.1