diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..872f4c4 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +GO ?= go +GOFLAGS ?= -buildvcs=false -ldflags='-w -X code.laidback.moe/yuki.Version=1.0' -buildmode=exe -v +PREFIX ?= /usr/local + +all: build + +build: + ${GO} build ${GOFLAGS} -o yuki +clean: + rm -f yuki +install: + install -d ${DESTDIR}${PREFIX}/bin + install -d ${DESTDIR}${PREFIX}/man/man1 + install -m0755 yuki ${DESTDIR}${PREFIX}/bin + install -m0660 yuki.1 ${DESTDIR}${PREFIX}/man/man1 +tidy: + ${GO} mod tidy +