Introduce a Makefile for UNIX-style people
Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
This commit is contained in:
18
Makefile
Normal file
18
Makefile
Normal file
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user