Skip to content

Commit

Permalink
Add Makefile and manage version
Browse files Browse the repository at this point in the history
  • Loading branch information
metal3d committed Jul 27, 2015
1 parent f20499e commit 91adbf9
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
VERSION:=$(shell git describe --tags)
OPTS:=-ldflags '-X main.VERSION $(VERSION)'

all: clean dist linux freebsd darwin

clean:
rm -f vymad vymd
rm -rf dist

dist:
mkdir dist

linux:
GOOS=linux go build $(OPTS)
tar cfz vymad-linux-x64.tgz vymad
mv vymad-linux-x64.tgz dist/

freebsd:
GOOS=freebsd go build $(OPTS)
tar cfz vymad-freebsd-x64.tgz vymad
mv vymad-freebsd-x64.tgz dist/

darwin:
GOOS=darwin go build $(OPTS)
tar cfz vymad-osx-x64.tgz vymad
mv vymad-osx-x64.tgz dist/

0 comments on commit 91adbf9

Please sign in to comment.