-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
49 lines (38 loc) · 866 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Go parameters
BUILDPATH=$(CURDIR)
GOCMD=go
GODOC=godoc
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOINSTALL=$(GOCMD) install
GOTEST=$(GOCMD) test
GOBENCH=$(GOCMD) test -check.b
GODEP=$(GOTEST) -i
GOFMT=gofmt -w
GOGET=$(GOCMD) get
GOTESTFLAGS=-check.vv
GOCOVERFLAGS=-covermode=count -coverprofile=count.out
GOFLAGS=-race
# Package lists
TOPLEVEL_PKG := github.com/theodesp/unionfind
get:
@echo "getting all dependencies"
$(GOGET)
build:
$(GOINSTALL) $(GOFLAGS) $(TOPLEVEL_PKG)
@echo "build sucessfully"
clean:
@rm -rf $(BUILDPATH)/bin/$(EXENAME)
@rm -rf $(BUILDPATH)/pkg
test:
@echo "Running Tests..."
$(GOTEST) $(GOTESTFLAGS) $(TOPLEVEL_PKG)
bench:
@echo "Running Benchmarks..."
$(GOBENCH) $(TOPLEVEL_PKG)
cover:
@echo "Running Coverage Report..."
$(GOTEST) $(GOCOVERFLAGS) $(TOPLEVEL_PKG)
format:
$(GOFMT) $(TOPLEVEL_PKG)
all: get build