2017-09-04 03:29:55 -07:00
|
|
|
CURDIR = $(shell pwd)
|
2018-11-05 13:12:05 -08:00
|
|
|
#GOPATH= $(dir $(abspath $(dir $(abspath $(dir ${CURDIR})))))
|
2017-09-04 03:29:55 -07:00
|
|
|
GOBIN = $(CURDIR)/build/bin
|
2017-06-23 02:21:00 -07:00
|
|
|
GO ?= latest
|
2020-04-08 07:24:39 -07:00
|
|
|
VERSION ?= undefined
|
|
|
|
OS ?= $(shell go env GOOS)
|
|
|
|
ARCH ?= $(shell go env GOARCH)
|
|
|
|
LDFLAGS = -s -w -X main.Version=$(VERSION)
|
|
|
|
ifeq (linux,$(OS))
|
|
|
|
LDFLAGS+= -linkmode external -extldflags "-static"
|
|
|
|
endif
|
2017-06-23 02:21:00 -07:00
|
|
|
|
|
|
|
istanbul:
|
2018-06-20 07:30:50 -07:00
|
|
|
@GOPATH=$(GOPATH) go build -v -o ./build/bin/istanbul ./cmd/istanbul
|
2017-06-23 02:21:00 -07:00
|
|
|
@echo "Done building."
|
|
|
|
@echo "Run \"$(GOBIN)/istanbul\" to launch istanbul."
|
|
|
|
|
2020-04-08 07:24:39 -07:00
|
|
|
dist: clean
|
|
|
|
@GOPATH=$(GOPATH) go build -ldflags='$(LDFLAGS)' -o ./build/bin/istanbul ./cmd/istanbul
|
|
|
|
@tar cfvz ./build/istanbul-tools_$(VERSION)_$(OS)_$(ARCH).tar.gz -C ./build/bin istanbul
|
|
|
|
@echo "Distribution file created."
|
|
|
|
@ls -lh ./build
|
|
|
|
|
2017-09-04 03:29:55 -07:00
|
|
|
load-testing:
|
|
|
|
@echo "Run load testing"
|
2018-11-05 13:12:05 -08:00
|
|
|
@CURDIR=$(CURDIR) go test -v github.com/jpmorganchase/istanbul-tools/tests/load/... --timeout 1h
|
2017-09-04 03:29:55 -07:00
|
|
|
|
2017-06-23 02:21:00 -07:00
|
|
|
clean:
|
2020-04-08 07:24:39 -07:00
|
|
|
rm -rf build
|