diff --git a/tools/goctl/Makefile b/tools/goctl/Makefile index c42e1a97..859d5325 100644 --- a/tools/goctl/Makefile +++ b/tools/goctl/Makefile @@ -2,3 +2,9 @@ version := $(shell /bin/date "+%Y-%m-%d %H:%M") build: go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" goctl.go && upx goctl +mac: + GOOS=darwin go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" -o goctl-darwin goctl.go +win: + GOOS=windows go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" -o goctl-windows goctl.go +linux: + GOOS=linux go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" -o goctl-linux goctl.go diff --git a/tools/goctl/Makefile.linux b/tools/goctl/Makefile.linux deleted file mode 100644 index ecd6eb6d..00000000 --- a/tools/goctl/Makefile.linux +++ /dev/null @@ -1,4 +0,0 @@ -version := $(shell /bin/date "+%Y-%m-%d %H:%M") - -build: - GOOS=linux go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" goctl.go && upx goctl