forked from fatedier/frp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (41 loc) · 1.03 KB
/
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
50
51
52
53
54
55
export PATH := $(GOPATH)/bin:$(PATH)
export GO15VENDOREXPERIMENT := 1
all: fmt build
build: frps frpc build_test
build_test: echo_server http_server
# compile assets into binary file
assets:
go get -d github.com/rakyll/statik
@go install github.com/rakyll/statik
@rm -rf ./src/assets/statik
go generate ./src/...
fmt:
go fmt ./src/...
@go fmt ./test/echo_server.go
@go fmt ./test/http_server.go
@go fmt ./test/func_test.go
frps:
go build -o bin/frps ./src/cmd/frps
@cp -rf ./src/assets/static ./bin
frpc:
go build -o bin/frpc ./src/cmd/frpc
echo_server:
go build -o test/bin/echo_server ./test/echo_server.go
http_server:
go build -o test/bin/http_server ./test/http_server.go
test: gotest
gotest:
go test -v ./src/...
alltest:
cd ./test && ./run_test.sh && cd -
go test -v ./src/...
go test -v ./test/func_test.go
cd ./test && ./clean_test.sh && cd -
clean:
rm -f ./bin/frpc
rm -f ./bin/frps
rm -f ./test/bin/echo_server
rm -f ./test/bin/http_server
cd ./test && ./clean_test.sh && cd -
save:
godep save ./src/...