Merge pull request #7 from justincormack/makefile

Add a simple Makefile
This commit is contained in:
Justin Cormack 2017-04-27 14:29:26 +01:00 committed by GitHub
commit 4694f5a7ec
2 changed files with 15 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
moby

14
Makefile Normal file
View File

@ -0,0 +1,14 @@
VERSION="0.0" # dummy for now
GIT_COMMIT=$(shell git rev-list -1 HEAD)
default: moby
DEPS=$(wildcard cmd/moby/*.go) Makefile
PREFIX?=/usr/local
moby: $(DEPS)
go build --ldflags "-X main.GitCommit=$(GIT_COMMIT) -X main.Version=$(VERSION)" -o $@ github.com/moby/tool/cmd/moby
PHONY: install
install: moby
cp -a $^ $(PREFIX)/bin/