2021-03-02 06:41:55 +00:00
|
|
|
LUME_VERSION ?= $(shell git describe --tags --always)
|
|
|
|
LDFLAGS := ${LDFLAGS} -X git.kill0.net/chill9/lume/cmd.Version=${LUME_VERSION}
|
|
|
|
|
2021-03-02 04:59:11 +00:00
|
|
|
ifeq ($(OS), Windows_NT)
|
|
|
|
EXE=lume.exe
|
2021-03-02 06:40:22 +00:00
|
|
|
RM=del /f /q
|
2021-03-02 04:59:11 +00:00
|
|
|
else
|
|
|
|
EXE=lume
|
|
|
|
EXE=rm -f
|
|
|
|
endif
|
|
|
|
|
2020-02-29 18:55:28 +00:00
|
|
|
.PHONY: build
|
|
|
|
build:
|
2021-03-02 06:41:55 +00:00
|
|
|
go build -o ${EXE} -ldflags="${LDFLAGS}" ./cmd/lume
|
2020-02-29 18:55:28 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2021-03-02 06:41:55 +00:00
|
|
|
${RM} ${EXE}
|