linuxboot/Makefile.utk
Julien Viard de Galbert f5dfd39ac7 Allow to use utk.
Based on branch 'ganshun/use-utk' with the following changes

Makefile:
 - Added missing ./dxe/linuxboot.ffs while resolving conflict.
 - Copying utk from $GOPATH
 - Make utk optional

Signed-off-by: Julien Viard de Galbert <julien.viard-de-galbert@itrenew.com>
2020-02-07 15:44:39 +01:00

29 lines
798 B
Makefile

#
# Rules for using UTK to manipulate the flash image
#
# Check go version. We need go 1.11 or newer
GOVERSION:=$(shell go version | grep ^go | cut -d ' ' -f 3 | cut -c 3-)
GOMAJOR:=$(shell echo $(GOVERSION) | cut -d '.' -f 1)
GOMINOR:=$(shell echo $(GOVERSION) | cut -d '.' -f 2)
GOVERSIONREQ:=1.11
GOMAJORREQ:=1
GOMINORREQ:=11
$(shell \
if [ "$(GOMAJOR)" -lt "$(GOMAJORREQ)" ]; then \
echo >&2 "Go version $(GOVERSION) too old, please install go $(GOVERSIONREQ) or newer"; \
exit 1; \
elif [ "$(GOMAJOR)" -eq "$(GOMAJORREQ)" ]; then \
if [ "$(GOMINOR)" -lt "$(GOMINORREQ)" ]; then \
echo >&2 "Go version $(GOVERSION) too old, please install go $(GOVERSIONREQ) or newer"; \
exit 1; \
fi; \
fi; \
)
bin/utk:
go get github.com/linuxboot/fiano/cmds/utk
cp $(GOPATH)/bin/utk $@