From: Izuru Yakumo Date: Sat, 21 Sep 2024 12:19:05 +0000 (-0300) Subject: Make use of cross-compilation X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=787e275dfb50e1661099c1ea7362feba29d73e56;p=aya.git Make use of cross-compilation Signed-off-by: Izuru Yakumo --- diff --git a/Makefile b/Makefile index aa7572c..95055bc 100644 --- a/Makefile +++ b/Makefile @@ -3,16 +3,17 @@ GOFLAGS ?= -v -buildvcs=false -mod=vendor -buildmode=exe -ldflags "-w -X `go lis 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