-
Notifications
You must be signed in to change notification settings - Fork 93
/
Makefile
47 lines (38 loc) · 899 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
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
BINARY_NAME=morningo
BINARY_UNIX=$(BINARY_NAME)_unix
all: run
build:
$(GOBUILD) -o ./build/$(BINARY_NAME) -tags=jsoniter -v ./
test:
$(GOTEST) -v ./
clean:
$(GOCLEAN)
rm -f ./build/$(BINARY_NAME)
rm -f ./build/$(BINARY_UNIX)
run:
$(GOBUILD) -o ./build/$(BINARY_NAME) -tags=jsoniter -v ./
./build/$(BINARY_NAME)
restart:
kill -INT $$(cat pid)
$(GOBUILD) -o ./build/$(BINARY_NAME) -tags=jsoniter -v ./
./build/$(BINARY_NAME)
deps:
$(GOGET) github.com/kardianos/govendor
govendor sync
cross:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o ./build/$(BINARY_NAME) -tags=jsoniter -v ./
fmt:
go fmt ./cli/...
go fmt ./config/...
go fmt ./connections/...
go fmt ./controllers/...
go fmt ./filters/...
go fmt ./models/...
go fmt ./modules/...
go fmt ./routes/...