swift/go/Makefile
Michael Barton 0ed2d6b341 go: move hummingbird.go
Use a more conventional code layout so go tools work as intended.

Change-Id: I7832843bb5bf25c75b79e83140c280eafb629f8c
2016-07-13 18:22:27 +00:00

26 lines
566 B
Makefile

HUMMINGBIRD_VERSION?=$(shell git describe --tags)
all: bin/hummingbird
bin/hummingbird: */*.go
mkdir -p bin
go build -o bin/hummingbird -ldflags "-X main.Version=$(HUMMINGBIRD_VERSION)" cmd/hummingbird/main.go
get:
go get -t ./...
fmt:
go fmt ./...
test:
@test -z "$(shell find . -name '*.go' | xargs gofmt -l)" || (echo "You need to run 'go fmt ./...'"; exit 1)
go vet ./...
go test -cover ./...
install: bin/hummingbird
cp bin/hummingbird $(DESTDIR)/usr/bin/hummingbird
develop: bin/hummingbird
ln -f -s bin/hummingbird /usr/local/bin/hummingbird