github.com/evdatsion/aphelion-dpos-bft@v0.32.1/tools/tm-bench/Makefile (about) 1 DIST_DIRS := find * -type d -exec 2 VERSION := $(shell perl -ne '/^TMCoreSemVer = "([^"]+)"$$/ && print "v$$1\n"' ../../version/version.go) 3 4 all: build test install 5 6 ######################################## 7 ### Build 8 9 build: 10 @go build 11 12 install: 13 @go install 14 15 test: 16 @go test -race 17 18 build-all: 19 rm -rf ./dist 20 gox -verbose \ 21 -ldflags "-s -w" \ 22 -arch="amd64 386 arm arm64" \ 23 -os="linux darwin windows freebsd" \ 24 -osarch="!darwin/arm !darwin/arm64" \ 25 -output="dist/{{.OS}}-{{.Arch}}/{{.Dir}}" . 26 27 dist: build-all 28 cd dist && \ 29 $(DIST_DIRS) cp ../LICENSE {} \; && \ 30 $(DIST_DIRS) cp ../README.rst {} \; && \ 31 $(DIST_DIRS) tar -zcf tm-bench-${VERSION}-{}.tar.gz {} \; && \ 32 shasum -a256 ./*.tar.gz > "./tm-bench_${VERSION}_SHA256SUMS" && \ 33 cd .. 34 35 ######################################## 36 ### Docker 37 38 build-docker: 39 rm -f ./tm-bench 40 docker run -it --rm -v "$(PWD)/../../:/go/src/github.com/evdatsion/aphelion-dpos-bft" -w "/go/src/github.com/evdatsion/aphelion-dpos-bft/tools/tm-bench" -e "CGO_ENABLED=0" golang:alpine go build -ldflags "-s -w" -o tm-bench 41 docker build -t "tendermint/bench" . 42 43 clean: 44 rm -f ./tm-bench 45 rm -rf ./dist 46 47 # To avoid unintended conflicts with file names, always add to .PHONY 48 # unless there is a reason not to. 49 # https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html 50 .PHONY: build install test build-all dist build-docker clean