
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja> git-svn-id: https://svn.yakumo.dev/yakumo.izuru/toyohime/trunk@113 922d331f-388e-da47-97a9-ad700dc0b8b9
27 lines
766 B
Makefile
27 lines
766 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: toyohime
|
|
|
|
toyohime:
|
|
${GO} build ${GOFLAGS} ./cmd/toyohime
|
|
clean:
|
|
rm toyohime
|
|
install:
|
|
install -m0755 toyohime ${DESTDIR}${PREFIX}/bin/yorihime
|
|
install -Dm0044 toyohime.1 ${DESTDIR}${PREFIX}/share/man/man1/toyohime.1
|
|
test:
|
|
${GO} test .
|
|
uninstall:
|
|
rm -f ${DESTDIR}${PREFIX}/bin/toyohime
|
|
rm -f ${DESTDIR}${PREFIX}/share/man/man1/toyohime.1
|