Skip to content

Commit

Permalink
Adds a Makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
fgeller committed Mar 17, 2016
1 parent f5dd4e4 commit 802d226
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 @@
export SHELL:=/usr/bin/env bash -O extglob -c
export GO15VENDOREXPERIMENT:=1

build: GOOS ?= darwin
build: GOARCH ?= amd64
build:
rm -f jsonify
GOOS=${GOOS} GOARCH=${GOARCH} go build .

release-linux:
GOOS=linux $(MAKE) build
file jsonify
tar Jcf jsonify-`git describe --abbrev=0 --tags`-linux-amd64.txz jsonify

release-darwin:
GOOS=darwin $(MAKE) build
file jsonify
tar Jcf jsonify-`git describe --abbrev=0 --tags`-darwin-amd64.txz jsonify

release: clean release-linux release-darwin

clean:
rm -f jsonify
rm -f jsonify-*.txz

run: build
./jsonify

0 comments on commit 802d226

Please sign in to comment.