Makefile 866 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. export PATH := $(GOPATH)/bin:$(PATH)
  2. export GOPATH := $(shell pwd)/Godeps/_workspace:$(shell pwd):$(GOPATH)
  3. all: build
  4. build: fmt frps frpc build_test
  5. build_test: echo_server http_server
  6. fmt:
  7. go fmt ./src/...
  8. @go fmt ./test/echo_server.go
  9. @go fmt ./test/http_server.go
  10. @go fmt ./test/func_test.go
  11. frps:
  12. go build -o bin/frps ./src/frp/cmd/frps
  13. frpc:
  14. go build -o bin/frpc ./src/frp/cmd/frpc
  15. echo_server:
  16. go build -o test/bin/echo_server ./test/echo_server.go
  17. http_server:
  18. go build -o test/bin/http_server ./test/http_server.go
  19. test: gotest
  20. gotest:
  21. go test -v ./src/...
  22. alltest:
  23. cd ./test && ./run_test.sh && cd -
  24. go test -v ./src/...
  25. go test -v ./test/func_test.go
  26. cd ./test && ./clean_test.sh && cd -
  27. clean:
  28. rm -f ./bin/frpc
  29. rm -f ./bin/frps
  30. rm -f ./test/bin/echo_server
  31. rm -f ./test/bin/http_server
  32. cd ./test && ./clean_test.sh && cd -