diff options
author | Simon Glass <sjg@chromium.org> | 2011-11-14 13:46:33 -0800 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2011-11-23 16:40:52 -0800 |
commit | 6d696e532c6a0c93ad9b915c59dad4144e6f1b33 (patch) | |
tree | 65e849c4442137d825421ede346f9324c3278abc | |
parent | 5fffeee4124ec2a27baace5e5b8e473a18f32f16 (diff) | |
download | vboot-6d696e532c6a0c93ad9b915c59dad4144e6f1b33.tar.gz |
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 <wfrichar@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -5,6 +5,12 @@ export FIRMWARE_ARCH export MOCK_TPM +# This Makefile normally builds in a 'build' subdir, but use +# +# make BUILD=<dir> +# +# 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 |