22 lines
773 B
Makefile
22 lines
773 B
Makefile
|
|
.PHONY: init
|
||
|
|
# init env
|
||
|
|
init:
|
||
|
|
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||
|
|
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||
|
|
|
||
|
|
.PHONY: shreder
|
||
|
|
# generate shreder proto
|
||
|
|
shreder:
|
||
|
|
protoc --proto_path=./third_party/shreder_protos \
|
||
|
|
--go_opt=Mshreder.proto=github.com/samlior/libsam/third_party/shreder_protos \
|
||
|
|
--go_opt=paths=source_relative \
|
||
|
|
--go_out=./third_party/shreder_protos \
|
||
|
|
--go-grpc_opt=Mshreder.proto=github.com/samlior/libsam/third_party/shreder_protos \
|
||
|
|
--go-grpc_opt=paths=source_relative \
|
||
|
|
--go-grpc_out=./third_party/shreder_protos \
|
||
|
|
third_party/shreder_protos/shreder.proto
|
||
|
|
|
||
|
|
.PHONY: build
|
||
|
|
# build
|
||
|
|
build:
|
||
|
|
mkdir -p bin/ && CGO_ENABLED=0 go build -o ./bin/ ./...
|