We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5bb3d90 + 8e2ccd9 commit eeec362Copy full SHA for eeec362
mk/build.mk
@@ -1,11 +1,15 @@
1
extension = $(patsubst windows,.exe,$(filter windows,$(1)))
2
3
+# Valid target combinations
4
+VALID_OS_ARCH := "[darwin/amd64][linux/amd64][windows/amd64][windows/386]"
5
+
6
define gocross
7
+ $(if $(findstring [$(1)/$(2)],$(VALID_OS_ARCH)), \
8
GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 \
9
$(GO) build \
10
-o $(PREFIX)/bin/docker-machine_$(1)-$(2)$(call extension,$(GOOS)) \
11
-a $(VERBOSE_GO) -tags "static_build netgo $(BUILDTAGS)" -installsuffix netgo \
- -ldflags "$(GO_LDFLAGS) -extldflags -static" $(GO_GCFLAGS) ./cmd/machine.go;
12
+ -ldflags "$(GO_LDFLAGS) -extldflags -static" $(GO_GCFLAGS) ./cmd/machine.go;)
13
endef
14
15
build-clean:
0 commit comments