
Signed-off-by: Aoi K <koizumi.aoi@chaotic.ninja> git-svn-id: file:///srv/svn/repo/toyohime/trunk@111 922d331f-388e-da47-97a9-ad700dc0b8b9
25 lines
619 B
Makefile
25 lines
619 B
Makefile
GO ?= go
|
|
GOFLAGS ?= -v -ldflags "-w -X `go list`.Version=$(VERSION) -X `go list`.Commit=$(COMMIT) -X `go list`.Build=$(BUILD)" -tags "static_build"
|
|
PREFIX ?= /usr/local
|
|
|
|
VERSION = `git describe --abbrev=0 --tags 2>/dev/null || echo "$VERSION"`
|
|
COMMIT = `git rev-parse --short HEAD || echo "$COMMIT"`
|
|
BRANCH = `git rev-parse --abbrev-ref HEAD`
|
|
BUILD = `git show -s --pretty=format:%cI`
|
|
|
|
GOARCH ?= amd64
|
|
GOOS ?= linux
|
|
|
|
all: yorihime
|
|
|
|
yorihime:
|
|
${GO} build ${GOFLAGS} ./cmd/yorihime
|
|
clean:
|
|
rm yorihime
|
|
install:
|
|
install -m0755 yorihime $(PREFIX)/bin/yorihime
|
|
test:
|
|
${GO} test .
|
|
uninstall:
|
|
rm -f $(PREFIX)/bin/yorihime
|