suwako/Makefile
yakumo.izuru 040b11054c Documentation update and relicense as Beerware
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/suwako/trunk@27 0b558ee1-521d-8b46-a41b-40029c97c055
2023-12-16 23:04:17 +00:00

23 lines
719 B
Makefile

PREFIX ?= /usr/local
GOFLAGS ?= -v -ldflags "-w -X `go list`.Version=${VERSION} -X `go list`.Commit=${COMMIT} -X `go list`.Build=${BUILD}" -tags "static_build"
BRANCH = `git rev-parse --abbrev-ref HEAD`
BUILD = `git show -s --pretty=format:%cI`
COMMIT = `git rev-parse --short HEAD || echo "$COMMIT"`
VERSION = `git describe --abbrev=0 --tags 2>/dev/null || echo "$VERSION"`
all: suwako
suwako:
go build ${GOFLAGS} ./cmd/suwako
clean:
rm -f suwako
install:
install -Dm0755 suwako ${PREFIX}/bin/suwako
install -Dm0644 suwako.1 ${PREFIX}/share/man/man1/suwako.1
install -Dm0644 suwako.conf.5 ${PREFIX}/share/man/man5/suwako.conf.5
uninstall:
rm -f ${PREFIX}/bin/suwako
rm -f ${PREFIX}/share/man/man1/suwako.1