PREFIX ?= /usr/local
DATE ?= `date -u +%F`
GOOS ?= `go env GOOS`
+GOARCH ?= `go env GOARCH`
VERSION ?= `git describe --tags`
build:
- go build ${GOFLAGS} ./cmd/aya
+ env GOOS=${GOOS} GOARCH=${GOARCH} go build ${GOFLAGS} -o aya-${GOOS}-${GOARCH} ./cmd/aya
clean:
- rm -f aya
+ rm -f aya-${GOOS}-${GOARCH}
dist:
git archive --format=tar.gz --output=aya-${VERSION}.tar.gz HEAD
install:
- install -Dm0755 aya ${DESTDIR}${PREFIX}/bin/aya
+ install -Dm0755 aya-${GOOS}-${GOARCH} ${DESTDIR}${PREFIX}/bin/aya
install -Dm0644 aya.1 ${DESTDIR}${PREFIX}/share/man/man1/aya.1
uninstall:
- rm -f ${PREFIX}/bin/aya
+ rm -f ${PREFIX}/bin/aya-${GOOS}-${GOARCH}
rm -f ${PREFIX}/share/man/man1/aya.1