From 460ea31c76c216f7cc8f0359f2b2fc95e5c18db3 Mon Sep 17 00:00:00 2001 From: Jguer Date: Mon, 5 Sep 2016 03:32:57 +0100 Subject: [PATCH] Added Makefile --- .gitignore | 1 + Makefile | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index cd0d5d1e..fd72f5ce 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ _testmain.go # Output of the go coverage tool, specifically when used with LiteIDE *.out +bin/yay diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..438b2913 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +.PHONY: build doc fmt lint run test vendor_clean vendor_get vendor_update vet + +# Prepend our _vendor directory to the system GOPATH +# so that import path resolution will prioritize +# our third party snapshots. +LDFLAGS=-ldflags "-s -w" +GOFILES=$(shell ls ./src/*.go) +BINARY=./bin/yay + +default: build + +build: + go build -v -o ${BINARY} ${LDFLAGS} ${GOFILES} +release: + go build -v -o ${BINARY} ./src/main.go + +run: build + ${BINARY} + +clean: + go clean +