forked from evilsocket/xray
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (34 loc) · 793 Bytes
/
Makefile
File metadata and controls
41 lines (34 loc) · 793 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
38
39
40
41
NAME=xray
SOURCE=cmd/$(NAME)/*.go
GOBUILD=go build
DEPEND=github.com/Masterminds/glide
# Command to get glide, you need to run it only once
.PHONY: get_glide
get_glide:
go get -u -v $(DEPEND)
$(GOPATH)/bin/glide install
# Command to install dependencies using glide
.PHONY: install_dependencies
install_dependencies:
glide install
# Run tests in verbose mode with race detector and display coverage
.PHONY: test
test:
go test -v -cover -race $(shell glide novendor)
# Removing artifacts
.PHONY: clean
clean:
@rm -rf $(NAME) ui.go
@rm -rf build
.PHONY: static
static:
go-bindata -o cmd/xray/ui.go -pkg main ui
# Building linux binaries
.PHONY: build
build: static
@mkdir -p build
@$(GOBUILD) -o build/$(NAME) $(SOURCE)
# Run the application
.PHONY: run
run:
go run $(SOURCE)