forked from Fantom-foundation/go-lachesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
26 lines (20 loc) · 767 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
BUILD_TAGS?=lachesis
# vendor uses Glide to install all the Go dependencies in vendor/
vendor:
glide install
# install compiles and places the binary in GOPATH/bin
install:
go install --ldflags '-extldflags "-static"' \
--ldflags "-X github.com/andrecronje/lachesis/version.GitCommit=`git rev-parse HEAD`" \
./cmd/lachesis
# build compiles and places the binary in /build
build:
CGO_ENABLED=0 go build \
--ldflags "-X github.com/andrecronje/lachesis/version.GitCommit=`git rev-parse HEAD`" \
-o build/lachesis ./cmd/lachesis/
# dist builds binaries for all platforms and packages them for distribution
dist:
@BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/dist.sh'"
test:
glide novendor | xargs go test
.PHONY: vendor install build dist test