lbry.go/Makefile

18 lines
417 B
Makefile
Raw Normal View History

2017-09-29 00:09:46 +02:00
BINARY=lbry
DIR = $(shell cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
VERSION=$(shell git --git-dir=${DIR}/.git describe --dirty --always --long --abbrev=7)
LDFLAGS = -ldflags "-X main.Version=${VERSION}"
2017-09-29 00:09:46 +02:00
.PHONY: build clean
2017-09-29 00:09:46 +02:00
.DEFAULT_GOAL: build
build:
2017-10-05 18:02:01 +02:00
CGO_ENABLED=0 go build ${LDFLAGS} -asmflags -trimpath=${DIR} -o ${DIR}/${BINARY} main.go
2017-09-29 00:09:46 +02:00
clean:
if [ -f ${DIR}/${BINARY} ]; then rm ${DIR}/${BINARY}; fi