-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (29 loc) · 716 Bytes
/
Makefile
File metadata and controls
37 lines (29 loc) · 716 Bytes
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
# 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 ./