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>
This commit is contained in:
Maciej Gabryelski 2022-04-21 08:28:01 +02:00 committed by Michał Żygowski
parent 24858b0ba0
commit 1fc12db95f
1 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ LDFLAGS += -lz
OBJS = superiotool.o serverengines.o ali.o exar.o fintek.o ite.o nsc.o \ 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 nuvoton.o smsc.o winbond.o infineon.o aspeed.o
OS_ARCH = $(shell uname) OS_ARCH ?= $(shell uname)
ifeq ($(OS_ARCH), Darwin) ifeq ($(OS_ARCH), Darwin)
LIBS = -framework IOKit -framework DirectHW -lpci -lz LIBS = -framework IOKit -framework DirectHW -lpci -lz
endif endif
@ -54,9 +54,9 @@ $(PROGRAM): $(OBJS) superiotool.h
$(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS) $(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
install: $(PROGRAM) install: $(PROGRAM)
mkdir -p $(DESTDIR)$(PREFIX)/sbin $(INSTALL) -d $(DESTDIR)$(PREFIX)/sbin
$(INSTALL) $(PROGRAM) $(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 $(INSTALL) -p -m644 $(PROGRAM).8 $(DESTDIR)$(PREFIX)/share/man/man8
clean: clean: