
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja> git-svn-id: https://svn.yakumo.dev/yakumo.izuru/marisa/trunk@65 d6811dac-2434-b64a-9ddc-f563ab233461
26 lines
838 B
Makefile
26 lines
838 B
Makefile
GO ?= go
|
|
GOFLAGS ?= -v -ldflags "-w -X `go list`.Version=${VERSION} -X `go list`.Commit=${COMMIT} -X `go list`.Build=${BUILD}"
|
|
CGO ?= 0
|
|
|
|
VERSION = `git describe --abbrev=0 --tags 2>/dev/null || echo "$VERSION"`
|
|
COMMIT = `git rev-parse --short HEAD || echo "$COMMIT"`
|
|
BRANCH = `git rev-parse --abbrev-ref HEAD`
|
|
BUILD = `git show -s --pretty=format:%cI`
|
|
|
|
PREFIX ?= /usr/local
|
|
|
|
all: marisa marisa-trash
|
|
|
|
marisa:
|
|
CGO_ENABLED=${CGO} go build ${GOFLAGS} ./cmd/marisa
|
|
marisa-trash:
|
|
CGO_ENABLED=${CGO} go build ${GOFLAGS} ./cmd/marisa-trash
|
|
clean:
|
|
rm -f marisa marisa-trash
|
|
install:
|
|
install -Dm0755 marisa ${PREFIX}/bin/marisa
|
|
install -Dm0755 marisa-trash ${PREFIX}/bin/marisa-trash
|
|
install -Dm0644 marisa.1 ${PREFIX}/share/man/man1/marisa.1
|
|
install -Dm0644 marisa.conf.5 ${PREFIX}/share/man/man5/marisa.conf.5
|
|
.PHONY: marisa marisa-trash
|