-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
63 lines (45 loc) · 1.34 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
export GO111MODULE=on
BINARY_NAME=synapseshard synapsevalidator synapsebeacon synapsekey synapseexplorer synapse synapserelayer
SRC=$(shell find . -name "*.go")
TESTS=$(shell find integration/phore/tests -name "*.py" | sed "s/.*\//integration_test_/" | sed "s/\.py//")
# The stupid "go build" can't append the .exe on Windows when using -o, let's do it manually
ifeq ($(OS),Windows_NT)
EXE=.exe
else
EXE=
endif
all: deps $(BINARY_NAME)
install:
go install cmd/beacon/synapsebeacon.go
go install cmd/validator/synapsevalidator.go
go install cmd/keygen/synapsekey.go
go install cmd/synapse/synapse.go
go install cmd/relayer/synapserelayer.go
synapseshard: $(SRC)
go build cmd/shard/synapseshard.go
synapsebeacon: $(SRC)
go build cmd/beacon/synapsebeacon.go
synapsevalidator: $(SRC)
go build cmd/validator/synapsevalidator.go
synapsekey: $(SRC)
go build cmd/keygen/synapsekey.go
synapseexplorer: $(SRC)
go build explorer/cmd/synapseexplorer.go
synapse: $(SRC)
go build cmd/synapse/synapse.go
synapserelayer: $(SRC)
go build cmd/relayer/synapserelayer.go
test: unittest integrationtests
unittest:
go test -v ./...
src_depend: $(SRC)
integrationtests: $(TESTS)
integration_test_%: integration/phore/tests/%.py $(BINARY_NAME)
PYTHONPATH=integration python3 $<
clean:
go clean
rm -f $(BINARY_NAME)
deps:
go build -v ./...
upgrade:
go get -u