
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja> git-svn-id: file:///srv/svn/repo/yuuka/trunk@2 10373541-e681-4840-9083-43024fea98c9
20 lines
508 B
Makefile
20 lines
508 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"
|
|
|
|
VERSION ?= `git describe --abbrev=0 --tags || echo $VERSION`
|
|
COMMIT ?= `git rev-parse --short HEAD || echo $COMMIT`
|
|
BUILD ?= `git show -s --pretty=format:%cI`
|
|
|
|
all: yuuka
|
|
|
|
yuuka:
|
|
go build ${GOFLAGS}
|
|
strip -s yuuka
|
|
clean:
|
|
rm -f yuuka
|
|
install:
|
|
install -Dm0755 yuuka ${DESTDIR}${PREFIX}/bin/yuuka
|
|
uninstall:
|
|
rm -f ${DESTDIR}${PREFIX}/bin/yuuka
|
|
|