forked from mosaicnetworks/babble
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
27 lines (20 loc) · 752 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
BUILD_TAGS?=babble
# 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/babbleio/babble/version.GitCommit=`git rev-parse HEAD`" \
./cmd/babble
# build compiles and places the binary in /build
build:
CGO_ENABLED=0 go build \
--ldflags "-X github.com/babbleio/babble/version.GitCommit=`git rev-parse HEAD`" \
-o build/babble ./cmd/babble/
# 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