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:04:29 -08:00
|
|
|
${GOPATH}/bin/hwtd: $(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:04:29 -08:00
|
|
|
${GOPATH}/bin/hwtc: $(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
|