diff options
author | Werner Zeh <werner.zeh@siemens.com> | 2022-11-16 10:58:35 +0100 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2022-11-29 15:15:07 +0000 |
commit | 1c727fd784883865db8ab2a2828cfd18519ce151 (patch) | |
tree | 7e628258e1c70100bc5f8df12acd6afbf8c31cc9 /util/cbmem | |
parent | bc76109df205cc279c659c93186b004d43a8ddc8 (diff) |
util/cbmem: Provide a way to override coreboot path
Right now cbmem uses a fix path to reach coreboot src path (../../).
This makes it impossible to compile cbmem out of the coreboot tree (e.g.
copy just the cbmem directory elsewhere and compile).
This patch adapts the technique from cbfstool and adds a variable called
'TOP' which points to coreboot root directory and which can be
overridden at build time by providing it to make as an argument. This
will enable a stand-alone build of cbmem.
Change-Id: I2732f75310e10716e5aa74e094e0bf628ad22f0b
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69686
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Diffstat (limited to 'util/cbmem')
-rw-r--r-- | util/cbmem/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/cbmem/Makefile b/util/cbmem/Makefile index a170875574..9219a08f3c 100644 --- a/util/cbmem/Makefile +++ b/util/cbmem/Makefile @@ -2,7 +2,8 @@ ## SPDX-License-Identifier: GPL-2.0-only PROGRAM = cbmem -ROOT = ../../src +TOP ?= $(abspath ../..) +ROOT = $(TOP)/src CC ?= $(CROSS_COMPILE)gcc INSTALL ?= /usr/bin/env install PREFIX ?= /usr/local |