diff --git a/Makefile b/Makefile index 4af1bfb6..b4f6d9ca 100644 --- a/Makefile +++ b/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 \