Files
libsam/Makefile

22 lines
797 B
Makefile
Raw Normal View History

2025-12-26 10:57:37 +08:00
.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:
2026-01-29 16:44:16 +08:00
mkdir -p bin/ && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/ ./...