From b6e67af5bca9f54e0206fee595e94d6e0d2fa3de Mon Sep 17 00:00:00 2001 From: zu1k Date: Fri, 17 Jul 2020 11:47:52 +0800 Subject: [PATCH] update make file --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index fa10bda..8d11701 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ NAME=nali BINDIR=bin VERSION=$(hell git describe --tags || echo "unknown version") -BUILDTIME=$(hell date -u) -GOBUILD=CGO_ENABLED=0 go build -ldflags '-X "github.com/zu1k/nali/constant.Version=$(VERSION)" \ +BUILDTIME=$(shell date -u) +GOBUILD=CGO_ENABLED=0 go build -trimpath -ldflags '-X "github.com/zu1k/nali/constant.Version=$(VERSION)" \ -X "github.com/zu1k/nali/constant.BuildTime=$(BUILDTIME)" \ - -w -s' -trimpath + -w -s' PLATFORM_LIST = \ darwin-amd64 \ @@ -27,6 +27,8 @@ WINDOWS_ARCH_LIST = \ windows-386 \ windows-amd64 +all: linux-amd64 darwin-amd64 windows-amd64 # Most used + docker: $(GOBUILD) -o $(BINDIR)/$(NAME)-$@ @@ -80,6 +82,7 @@ windows-386: windows-amd64: GOARCH=amd64 GOOS=windows $(GOBUILD) -o $(BINDIR)/$(NAME)-$@.exe + gz_releases=$(addsuffix .gz, $(PLATFORM_LIST)) zip_releases=$(addsuffix .zip, $(WINDOWS_ARCH_LIST)) @@ -94,4 +97,4 @@ all-arch: $(PLATFORM_LIST) $(WINDOWS_ARCH_LIST) releases: $(gz_releases) $(zip_releases) clean: - rm $(BINDIR)/* \ No newline at end of file + rm $(BINDIR)/*