toyohime/Makefile
yakumo.izuru d0690bc7d6 Rename command to toyohime
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/toyohime/trunk@112 922d331f-388e-da47-97a9-ad700dc0b8b9
2023-10-16 13:31:55 +00:00

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: toyohime
toyohime:
${GO} build ${GOFLAGS} ./cmd/toyohime
clean:
rm toyohime
install:
install -m0755 toyohime $(PREFIX)/bin/yorihime
test:
${GO} test .
uninstall:
rm -f $(PREFIX)/bin/toyohime