-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathMakefile
37 lines (35 loc) · 955 Bytes
/
Makefile
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
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
BINARY_NAME=ethconnect
BINARY_UNIX=$(BINARY_NAME)-tux
BINARY_MAC=$(BINARY_NAME)-mac
BINARY_WIN=$(BINARY_NAME)-win
all: deps build
build:
$(GOBUILD) -o $(BINARY_NAME) -v
clean:
$(GOCLEAN)
rm -f $(BINARY_NAME)
rm -f $(BINARY_UNIX)
run:
$(GOBUILD) -o $(BINARY_NAME) -v ./...
./$(BINARY_NAME)
deps:
$(GOGET) github.com/ethereum/go-ethereum
$(GOGET) github.com/sirupsen/logrus
$(GOGET) github.com/spf13/cobra
$(GOGET) github.com/bsm/sarama-cluster
$(GOGET) github.com/Shopify/sarama
$(GOGET) github.com/nu7hatch/gouuid
$(GOGET) github.com/stretchr/testify/assert
$(GOGET) github.com/golang/mock/gomock
build-linux:
GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_UNIX) -v
build-mac:
GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINARY_MAC) -v
build-win:
GOOS=windows GOARCH=amd64 $(GOBUILD) -o $(BINARY_WIN) -v