Makefile: target to for cross platform
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
f387b33f84
commit
80066151ba
1 changed files with 13 additions and 0 deletions
13
Makefile
13
Makefile
|
@ -98,6 +98,7 @@ ifneq ($(GOPATH),)
|
|||
rm -f "$(GOPATH)/.gopathok"
|
||||
endif
|
||||
rm -rf _output
|
||||
rm -rf ./crio.cross.*
|
||||
rm -f docs/*.5 docs/*.8
|
||||
rm -fr test/testdata/redis-image
|
||||
find . -name \*~ -delete
|
||||
|
@ -109,6 +110,17 @@ endif
|
|||
rm -f test/copyimg/copyimg
|
||||
rm -f test/checkseccomp/checkseccomp
|
||||
|
||||
|
||||
local-cross:
|
||||
@for target in windows/amd64 darwin/amd64 ; do \
|
||||
os=`echo $${target} | cut -f1 -d/` ; \
|
||||
arch=`echo $${target} | cut -f2 -d/` ; \
|
||||
suffix=$${os}.$${arch} ; \
|
||||
echo "building for $${target} ..."; \
|
||||
GOOS=$${os} GOARCH=$${arch} $(GO) build -i $(LDFLAGS) -tags "containers_image_openpgp" -o crio.cross.$${suffix} $(PROJECT)/cmd/crio && \
|
||||
echo "built ./crio.$${suffix}"; \
|
||||
done
|
||||
|
||||
crioimage:
|
||||
docker build -t ${CRIO_IMAGE} .
|
||||
|
||||
|
@ -224,6 +236,7 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man .ins
|
|||
|
||||
.PHONY: \
|
||||
binaries \
|
||||
local-cross \
|
||||
clean \
|
||||
conmon \
|
||||
default \
|
||||
|
|
Loading…
Reference in a new issue