-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (25 loc) · 1.11 KB
/
Makefile
File metadata and controls
42 lines (25 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
.PHONY: build deps test benchmark clean
GOBIN = ../../bin
VERSION = 0.0.1
flags = "-X 'main.Version=v$(VERSION)'"
build:
cd ./cmd/cli && GOOS=linux GOARCH=amd64 go build -ldflags=$(flags) -o $(GOBIN)/mnemo-linux-amd64
cd ./cmd/cli && GOOS=linux GOARCH=arm64 go build -ldflags=$(flags) -o $(GOBIN)/mnemo-linux-arm64
cd ./cmd/cli && GOOS=darwin GOARCH=amd64 go build -ldflags=$(flags) -o $(GOBIN)/mnemo-mac-amd64
cd ./cmd/cli && GOOS=darwin GOARCH=arm64 go build -ldflags=$(flags) -o $(GOBIN)/mnemo-mac-arm64
cd ./cmd/cli && GOOS=windows GOARCH=amd64 go build -ldflags=$(flags) -o $(GOBIN)/mnemo-windows-amd64.exe
deps:
cd ./internal/ethutil && go get github.com/ethereum/go-ethereum
cd ./internal/ethutil && go get github.com/ethereum/go-ethereum/common
cd ./internal/ethutil && go get github.com/ethereum/go-ethereum/core/types
cd ./internal/ethutil && go get github.com/ethereum/go-ethereum/crypto
cd ./internal/ethutil && go get github.com/ethereum/go-ethereum/ethclient
test:
cd ./test && go test
benchmark:
cd ./test && go test -bench=.
# Alias for benchmark
bench:
go test -bench=. ./test
clean:
rm bin/*