-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (36 loc) · 852 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
.PHONY: all clean echo test fmt install bench run bootstrap run
EXECUTABLE = fileserver
GDFLAGS ?= $(GDFLAGS:)
ARGS ?= $(ARGS:)
EXTERNAL_TOOLS=\
github.com/tools/godep
all: test
bootstrap:
@for tool in $(EXTERNAL_TOOLS) ; do \
echo "===> Installing $$tool" ; \
go get $$tool; \
done
clean:
@echo "===> Cleaning"
@godep go clean $(GDFLAGS) -i ./...
build:
@echo "===> Building"
@godep go build $(GDFLAGS) -o $(EXECUTABLE) ./...
fmt:
@echo "===> Formatting"
@godep go fmt $(GDFLAGS) ./...
install:
@echo "===> Installing"
@godep go install $(GDFLAGS)
test:
@echo "===> Testing"
@godep go test $(GDFLAGS) ./...
bench:
@echo "===> Benchmarking"
@godep go test -run=NONE -bench=. $(GDFLAGS) ./...
start: build
@echo "===> Starting Server"
@./$(EXECUTABLE) $(ARGS)
run:
@echo "===> Running Server"
@godep go run main.go