Makefile: add platform specific alias

pull/4601/head
Pranav 2019-06-25 23:32:07 +05:30 committed by Medya Ghazizadeh
parent 9d88171d18
commit d0488586bd
2 changed files with 15 additions and 1 deletions

View File

@ -108,7 +108,7 @@ out/minikube$(IS_EXE): out/minikube-$(GOOS)-$(GOARCH)$(IS_EXE)
cp $< $@
out/minikube-windows-amd64.exe: out/minikube-windows-amd64
cp out/minikube-windows-amd64 out/minikube-windows-amd64.exe
mv out/minikube-windows-amd64 out/minikube-windows-amd64.exe
out/minikube-%: pkg/minikube/assets/assets.go pkg/minikube/translate/translations.go $(shell find $(CMD_SOURCE_DIRS) -type f -name "*.go")
ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y)
@ -202,6 +202,15 @@ pkg/minikube/translate/translations.go: $(shell find translations/ -type f)
.PHONY: cross
cross: out/minikube-linux-$(GOARCH) out/minikube-darwin-amd64 out/minikube-windows-amd64.exe
.PHONY: windows
windows: out/minikube-windows-amd64.exe
.PHONY: darwin
darwin: out/minikube-darwin-amd64
.PHONY: linux
linux: out/minikube-linux-$(GOARCH)
.PHONY: e2e-cross
e2e-cross: e2e-linux-amd64 e2e-darwin-amd64 e2e-windows-amd64.exe

View File

@ -46,6 +46,11 @@ $ ls out/
minikube-darwin-amd64 minikube-linux-amd64 minikube-windows-amd64.exe
```
You can also build platform specific executables like below:
1. `make windows` will build the binary for Windows platform
2. `make linux` will build the binary for Linux platform
3. `make darwin` will build the binary for Darwin/Mac platform
### Run Instructions
Start the cluster using your built minikube with: