1
0

Makefile 1003 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. export PATH := $(GOPATH)/bin:$(PATH)
  2. export GO15VENDOREXPERIMENT := 1
  3. all: fmt build
  4. build: frps frpc
  5. # compile assets into binary file
  6. file:
  7. rm -rf ./assets/static/*
  8. cp -rf ./web/frps/dist/* ./assets/static
  9. go get -d github.com/rakyll/statik
  10. go install github.com/rakyll/statik
  11. rm -rf ./assets/statik
  12. go generate ./assets/...
  13. fmt:
  14. go fmt ./assets/...
  15. go fmt ./client/...
  16. go fmt ./cmd/...
  17. go fmt ./models/...
  18. go fmt ./server/...
  19. go fmt ./utils/...
  20. frps:
  21. go build -o bin/frps ./cmd/frps
  22. @cp -rf ./assets/static ./bin
  23. frpc:
  24. go build -o bin/frpc ./cmd/frpc
  25. test: gotest
  26. gotest:
  27. go test -v ./assets/...
  28. go test -v ./client/...
  29. go test -v ./cmd/...
  30. go test -v ./models/...
  31. go test -v ./server/...
  32. go test -v ./utils/...
  33. ci:
  34. cd ./tests && ./run_test.sh && cd -
  35. go test -v ./tests/...
  36. cd ./tests && ./clean_test.sh && cd -
  37. ciclean:
  38. cd ./tests && ./clean_test.sh && cd -
  39. alltest: gotest ci
  40. clean:
  41. rm -f ./bin/frpc
  42. rm -f ./bin/frps
  43. cd ./tests && ./clean_test.sh && cd -