Skip to content

Commit

Permalink
support windows (64bit) as build target
Browse files Browse the repository at this point in the history
  • Loading branch information
felixb committed Dec 13, 2017
1 parent 88410c2 commit 72fa19d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@

VERSION=$(shell git describe --tags)

build: swamp_amd64 swamp_darwin
build: swamp_amd64 swamp_darwin swamp.exe

.get-deps: *.go
go get -t -d -v ./...
touch .get-deps

clean:
rm -f .get-deps
rm -f *_amd64 *_darwin
rm -f *_amd64 *_darwin *.exe

swamp_amd64: .get-deps *.go
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o $@ *.go

swamp_darwin: .get-deps *.go
GOOS=darwin go build -ldflags "-X main.version=$(VERSION)" -o $@ *.go

swamp.exe: .get-deps *.go
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o $@ *.go

0 comments on commit 72fa19d

Please sign in to comment.