mirror of
https://github.com/fatedier/frp.git
synced 2024-11-27 20:49:10 +08:00
09127a3b55
1. Change directory structure and Makefile to let GOPATH=`pwd`, so wherever the project directory is, just use make to build.
23 lines
414 B
Makefile
23 lines
414 B
Makefile
export PATH := $(GOPATH)/bin:$(PATH)
|
|
export NEW_GOPATH := $(shell pwd)
|
|
|
|
all: build
|
|
|
|
build: godep fmt frps frpc
|
|
|
|
godep:
|
|
@go get github.com/tools/godep
|
|
godep restore
|
|
|
|
fmt:
|
|
@GOPATH=$(NEW_GOPATH) godep go fmt ./...
|
|
|
|
frps:
|
|
GOPATH=$(NEW_GOPATH) godep go build -o bin/frps ./src/frp/cmd/frps
|
|
|
|
frpc:
|
|
GOPATH=$(NEW_GOPATH) godep go build -o bin/frpc ./src/frp/cmd/frpc
|
|
|
|
test:
|
|
@GOPATH=$(NEW_GOPATH) godep go test ./...
|