forked from linuxboot/linuxboot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.utk
31 lines (27 loc) · 901 Bytes
/
Makefile.utk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#
# 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 $@
bin/create-ffs.utk:
go get github.com/linuxboot/fiano/cmds/create-ffs
cp $(GOPATH)/bin/create-ffs $@