File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -481,6 +481,20 @@ podman-testing: bin/podman-testing
481
481
generate-bindings : .install.golangci-lint
482
482
$(GOCMD ) generate ./pkg/bindings/... ;
483
483
484
+ # Do the cross build with the OS/ARCH extrcted from the target name, i.e.
485
+ # pass a path like "podman.cross.linux.amd64". This target is used by
486
+ # local-cross to build all CROSS_BUILD_TARGETS.
487
+ bin/podman.cross.% : $(SOURCES )
488
+ TARGET=" $* " ; \
489
+ GOOS=" $$ {TARGET%%.*}" ; \
490
+ GOARCH=" $$ {TARGET##*.}" ; \
491
+ CGO_ENABLED=0 \
492
+ $(GO ) build \
493
+ $(BUILDFLAGS ) \
494
+ $(GO_LDFLAGS ) ' $(LDFLAGS_PODMAN)' \
495
+ -tags ' $(BUILDTAGS_CROSS)' \
496
+ -o " $@ " ./cmd/podman
497
+
484
498
.PHONY : local-cross
485
499
local-cross : $(CROSS_BUILD_TARGETS ) # # Cross compile podman binary for multiple architectures
486
500
You can’t perform that action at this time.
0 commit comments