summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMaciej Gabryelski <maciej.gabryelski@3mdeb.com>2022-04-21 08:28:01 +0200
committerMichał Żygowski <michal.zygowski@3mdeb.com>2022-12-09 11:05:34 +0000
commit1fc12db95f7c1e353fd9fd4d496946cd17a733a4 (patch)
tree4332291185a9868f8745de5bce20ace21f39f79a /util
parent24858b0ba0efb0d66325e6dfe432097a005e0da8 (diff)
util/superiotool/Makefile: improve cross-compilation support
Use tool from INSTALL variable to create directory instead of mkdir to be compatible with other cross-compilation buildsystems (like Yocto). Signed-off-by: Maciej Gabryelski <maciej.gabryelski@3mdeb.com> Change-Id: I9d455f3d1a6d86c88b8e22da825fe14f9630e971 Reviewed-on: https://review.coreboot.org/c/coreboot/+/70103 Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/superiotool/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/superiotool/Makefile b/util/superiotool/Makefile
index 21bd2bca75..f8c1cc1f86 100644
--- a/util/superiotool/Makefile
+++ b/util/superiotool/Makefile
@@ -17,7 +17,7 @@ LDFLAGS += -lz
OBJS = superiotool.o serverengines.o ali.o exar.o fintek.o ite.o nsc.o \
nuvoton.o smsc.o winbond.o infineon.o aspeed.o
-OS_ARCH = $(shell uname)
+OS_ARCH ?= $(shell uname)
ifeq ($(OS_ARCH), Darwin)
LIBS = -framework IOKit -framework DirectHW -lpci -lz
endif
@@ -54,9 +54,9 @@ $(PROGRAM): $(OBJS) superiotool.h
$(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
install: $(PROGRAM)
- mkdir -p $(DESTDIR)$(PREFIX)/sbin
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/sbin
$(INSTALL) $(PROGRAM) $(DESTDIR)$(PREFIX)/sbin
- mkdir -p $(DESTDIR)$(PREFIX)/share/man/man8
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/share/man/man8
$(INSTALL) -p -m644 $(PROGRAM).8 $(DESTDIR)$(PREFIX)/share/man/man8
clean: