forked from boot2podman/machine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
27 lines (19 loc) · 931 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Initialize version and gc flags
GO_LDFLAGS := -X `go list ./version`.GitCommit=`git rev-parse --short HEAD 2>/dev/null`
GO_GCFLAGS :=
GO_SRC = $(shell find . -type f -name '*.go')
podman-machine: $(GO_SRC)
go build -ldflags "$(GO_LDFLAGS)" $(GO_GCFLAGS) ./cmd/podman-machine
%.png: %.dot
dot -Tpng $^ -o $@
cross: podman-machine.linux-amd64 podman-machine.darwin-amd64 podman-machine.windows-amd64
podman-machine.linux-amd64: $(GO_SRC)
GOOS=linux GOARCH=amd64 go build -o $@ -ldflags "$(GO_LDFLAGS)" $(GO_GCFLAGS) ./cmd/podman-machine
podman-machine.darwin-amd64: $(GO_SRC)
GOOS=darwin GOARCH=amd64 go build -o $@ -ldflags "$(GO_LDFLAGS)" $(GO_GCFLAGS) ./cmd/podman-machine
podman-machine.windows-amd64: podman-machine.windows-amd64.exe
podman-machine.windows-amd64.exe: $(GO_SRC)
GOOS=windows GOARCH=amd64 go build -o $@ -ldflags "$(GO_LDFLAGS)" $(GO_GCFLAGS) ./cmd/podman-machine
.PHONY: test
test:
go test ./...