2018-01-16 20:57:04 -08:00
|
|
|
# from http://blog.jgc.org/2011/07/gnu-make-recursive-wildcard-function.html
|
|
|
|
rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
|
|
|
|
|
|
|
|
default: ${GOPATH}/bin/hwtd ${GOPATH}/bin/hwtc
|
|
|
|
|
2018-01-16 21:14:00 -08:00
|
|
|
${GOPATH}/bin/hwtd: vendor $(call rwildcard,,*.go) hwt.go
|
2018-01-16 20:57:04 -08:00
|
|
|
go install -v mcquay.me/hwt/cmd/hwtd
|
|
|
|
|
2018-01-16 21:14:00 -08:00
|
|
|
${GOPATH}/bin/hwtc: vendor $(call rwildcard,,*.go) hwt.go
|
2018-01-16 20:57:04 -08:00
|
|
|
go install -v mcquay.me/hwt/cmd/hwtc
|
|
|
|
|
2018-01-16 21:04:29 -08:00
|
|
|
hwt.go: service.twirp.go service.pb.go
|
|
|
|
|
2018-01-16 20:57:04 -08:00
|
|
|
service.twirp.go: service.proto
|
|
|
|
protoc --proto_path=${GOPATH}/src:. --twirp_out=. --go_out=. ./service.proto
|
|
|
|
|
|
|
|
service.pb.go: service.proto
|
|
|
|
protoc --proto_path=${GOPATH}/src:. --twirp_out=. --go_out=. ./service.proto
|
2018-01-16 21:14:00 -08:00
|
|
|
|
|
|
|
vendor: Gopkg.toml Gopkg.lock service.twirp.go service.pb.go
|
|
|
|
dep ensure
|
2018-01-16 21:14:09 -08:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
@rm -f service.{twirp,pb}.go
|
|
|
|
@rm -rf vendor
|