25 lines
547 B
Makefile
25 lines
547 B
Makefile
GO ?= go
|
|
GOFLAGS ?= -v -ldflags "-w -X `${GO} list`.Version=${VERSION} -X `${GO} list`.Build=${BUILD}"
|
|
PREFIX ?= /usr/local
|
|
|
|
GOARCH ?= amd64
|
|
GOOS ?= linux
|
|
|
|
VERSION = 0.4.0
|
|
BUILD = `date +%Y-%m-%d:%H:%M:%S%z`
|
|
|
|
all: toyohime
|
|
|
|
toyohime:
|
|
${GO} build ${GOFLAGS} ./cmd/toyohime
|
|
clean:
|
|
rm toyohime
|
|
install:
|
|
install -m0755 toyohime ${DESTDIR}${PREFIX}/bin/toyohime
|
|
install -Dm0044 toyohime.1 ${DESTDIR}${PREFIX}/man/man1/toyohime.1
|
|
test:
|
|
${GO} test .
|
|
uninstall:
|
|
rm -f ${DESTDIR}${PREFIX}/bin/toyohime
|
|
rm -f ${DESTDIR}${PREFIX}/man/man1/toyohime.1
|