summaryrefslogtreecommitdiffstats
path: root/src/dkv/Makefile
blob: f540692f980a19e3428877bb1736c4af1ecd944b (plain)
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
GOPATH := $(shell realpath "$(PWD)/../../")
BINARY := dkv
DEPENDENCIES := github.com/golang/dep/cmd/dep

export GOPATH ...

all: test build
deploy: test build

build: deps format
	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo -ldflags '-w' -o $(GOPATH)/target/$(BINARY) -v main.go

clean:
	go clean
	rm -f $(GOPATH)/target/$(BINARY)

test: deps
	go test -cover ./...

format:
	go fmt ./...

deps:
	go get -u $(DEPENDENCIES)
	$(GOPATH)/bin/dep ensure

.PHONY: test