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>
diff --git a/util/superiotool/Makefile b/util/superiotool/Makefile
index 21bd2bc..f8c1cc1 100644
--- a/util/superiotool/Makefile
+++ b/util/superiotool/Makefile
@@ -17,7 +17,7 @@
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 @@
$(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: