18 行
530 B
Makefile
18 行
530 B
Makefile
DESTDIR ?=
|
|
GOFLAGS ?= -v -ldflags "-w -X `go list`.Version=$(VERSION) -X `go list`.Commit=$(COMMIT)" -tags "static_build" -mod=vendor
|
|
PREFIX ?= /usr/local
|
|
VERSION ?= `git describe --abbrev=0 --tags || echo "$VERSION"`
|
|
COMMIT ?= `git rev-parse --short HEAD || echo "$COMMIT"`
|
|
|
|
|
|
build:
|
|
go build ${GOFLAGS} ./cmd/aya
|
|
clean:
|
|
rm -f aya
|
|
install:
|
|
install -Dm0755 aya ${DESTDIR}${PREFIX}/bin/aya
|
|
install -Dm0644 aya.1 ${DESTDIR}${PREFIX}/share/man/man1/aya.1
|
|
uninstall:
|
|
rm -f ${PREFIX}/bin/aya
|
|
rm -f ${PREFIX}/share/man/man1/aya.1
|