mirror of
https://github.com/go-home-admin/toolset.git
synced 2025-12-24 13:37:52 +08:00
18 lines
578 B
Makefile
18 lines
578 B
Makefile
GOBIN := $(shell go env GOBIN)
|
|
ATDIR := $(shell pwd)
|
|
|
|
# mac 系统更新path可能不全
|
|
export PATH := $(GOBIN):$(PATH)
|
|
|
|
build:
|
|
go build -ldflags="-w -s" -o $(GOBIN)/toolset ./
|
|
|
|
build-win:
|
|
go build -ldflags="-w -s" -o $(GOBIN)/toolset.exe ./
|
|
|
|
build-all:
|
|
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-w -s" -o ./build/toolset-linux ./
|
|
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-w -s" -o ./build/toolset-win.exe ./
|
|
go build -ldflags="-w -s" -o ./build/toolset-mac ./
|
|
|
|
# toolset make:protoc -go_out=plugins=grpc:@root/generate/proto -debug=true
|