forked from irisnet/irishub-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 714 Bytes
/
Makefile
File metadata and controls
43 lines (32 loc) · 714 Bytes
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
43
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
BINARY_NAME=irishub-sync
BINARY_UNIX=$(BINARY_NAME)-unix
all: get_tools get_deps build
get_deps:
@rm -rf vendor/
@echo "--> Running dep ensure"
@dep ensure -v
build:
$(GOBUILD) -o $(BINARY_NAME) -v
clean:
$(GOCLEAN)
rm -f $(BINARY_NAME)
rm -f $(BINARY_UNIX)
run:
$(GOBUILD) -o $(BINARY_NAME) -v
./$(BINARY_NAME)
# Cross compilation
build-linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_UNIX) -v
######################################
## Tools
check_tools:
cd tools && $(MAKE) check_tools
get_tools:
cd tools && $(MAKE) get_tools
update_tools:
cd tools && $(MAKE) update_tools