|
|
@ -1,16 +1,12 @@
|
|
|
|
export PATH := $(GOPATH)/bin:$(PATH)
|
|
|
|
export PATH := $(GOPATH)/bin:$(PATH)
|
|
|
|
export OLDGOPATH := $(GOPATH)
|
|
|
|
export GOPATH := $(shell pwd)/Godeps/_workspace:$(shell pwd):$(GOPATH)
|
|
|
|
export GOPATH := $(shell pwd):$(GOPATH)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
all: build
|
|
|
|
all: build
|
|
|
|
|
|
|
|
|
|
|
|
build: godep fmt frps frpc build_test
|
|
|
|
build: fmt frps frpc build_test
|
|
|
|
|
|
|
|
|
|
|
|
build_test: echo_server http_server
|
|
|
|
build_test: echo_server http_server
|
|
|
|
|
|
|
|
|
|
|
|
godep:
|
|
|
|
|
|
|
|
GOPATH=$(OLDGOPATH) go get github.com/tools/godep
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
fmt:
|
|
|
|
go fmt ./src/...
|
|
|
|
go fmt ./src/...
|
|
|
|
@go fmt ./test/echo_server.go
|
|
|
|
@go fmt ./test/echo_server.go
|
|
|
@ -18,26 +14,26 @@ fmt:
|
|
|
|
@go fmt ./test/func_test.go
|
|
|
|
@go fmt ./test/func_test.go
|
|
|
|
|
|
|
|
|
|
|
|
frps:
|
|
|
|
frps:
|
|
|
|
godep go build -o bin/frps ./src/frp/cmd/frps
|
|
|
|
go build -o bin/frps ./src/frp/cmd/frps
|
|
|
|
|
|
|
|
|
|
|
|
frpc:
|
|
|
|
frpc:
|
|
|
|
godep go build -o bin/frpc ./src/frp/cmd/frpc
|
|
|
|
go build -o bin/frpc ./src/frp/cmd/frpc
|
|
|
|
|
|
|
|
|
|
|
|
echo_server:
|
|
|
|
echo_server:
|
|
|
|
godep go build -o test/bin/echo_server ./test/echo_server.go
|
|
|
|
go build -o test/bin/echo_server ./test/echo_server.go
|
|
|
|
|
|
|
|
|
|
|
|
http_server:
|
|
|
|
http_server:
|
|
|
|
godep go build -o test/bin/http_server ./test/http_server.go
|
|
|
|
go build -o test/bin/http_server ./test/http_server.go
|
|
|
|
|
|
|
|
|
|
|
|
test: gotest
|
|
|
|
test: gotest
|
|
|
|
|
|
|
|
|
|
|
|
gotest:
|
|
|
|
gotest:
|
|
|
|
godep go test -v ./src/...
|
|
|
|
go test -v ./src/...
|
|
|
|
|
|
|
|
|
|
|
|
alltest:
|
|
|
|
alltest:
|
|
|
|
cd ./test && ./run_test.sh && cd -
|
|
|
|
cd ./test && ./run_test.sh && cd -
|
|
|
|
godep go test -v ./src/...
|
|
|
|
go test -v ./src/...
|
|
|
|
godep go test -v ./test/func_test.go
|
|
|
|
go test -v ./test/func_test.go
|
|
|
|
cd ./test && ./clean_test.sh && cd -
|
|
|
|
cd ./test && ./clean_test.sh && cd -
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
clean:
|
|
|
|