frp/Makefile
fatedier 09127a3b55 all: improve the method of import for internal packages
1. Change directory structure and Makefile to let GOPATH=`pwd`, so wherever the project directory is, just use make to build.
2016-02-25 17:38:34 +08:00

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 ./...