summaryrefslogtreecommitdiff
path: root/util/ifdtool
diff options
context:
space:
mode:
authorMaciej Pijanowski <maciej.pijanowski@3mdeb.com>2022-04-20 16:36:01 +0200
committerMichał Żygowski <michal.zygowski@3mdeb.com>2022-12-09 11:06:06 +0000
commit1a397369ffd40a3a5ec6fade9e4bea08cff5c88d (patch)
treed1aeab8e7fcb5b8b6905b7d15c535fba4fa066ec /util/ifdtool
parent9d2902f7502598baa4a31d33b57ab340fa1daaed (diff)
util/ifdtool/Makefile: improve cross-compilation support
INSTALL and PREFIX variables will not be overwritten. Also, mkdir was replaced by a tool from the INSTALL variable to be compatible with other cross-compilation buildsystems (like Yocto). Overwriting variables generates problems when we use different buildsystem like Yocto where tool names are stored in environment variables. This change may make building the utility easier - the user of different buildsystem will not have to remember to pass correct tool names when issuing the make command. Also, this change does not affect the rest of users - if the variable was not set before, then it will be configured as before. Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> Change-Id: Ia8dd67d18392e1e11d9160b187ef1a874d69ff5d Reviewed-on: https://review.coreboot.org/c/coreboot/+/70105 Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/ifdtool')
-rw-r--r--util/ifdtool/Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/ifdtool/Makefile b/util/ifdtool/Makefile
index 83d19b892e..c0210693d8 100644
--- a/util/ifdtool/Makefile
+++ b/util/ifdtool/Makefile
@@ -2,9 +2,9 @@
#
# SPDX-License-Identifier: GPL-2.0-only
-CC ?= gcc
-INSTALL = /usr/bin/env install
-PREFIX = /usr/local
+CC ?= gcc
+INSTALL ?= /usr/bin/env install
+PREFIX ?= /usr/local
HOSTCC ?= $(CC)
HOSTCFLAGS ?= $(CFLAGS)
@@ -21,7 +21,7 @@ clean:
distclean: clean
install: $(PROGRAM)
- mkdir -p $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
$(INSTALL) $(PROGRAM) $(DESTDIR)$(PREFIX)/bin
.PHONY: all clean distclean install