1
0
mirror of https://github.com/zu1k/nali.git synced 2025-01-22 13:19:02 +08:00

update make file

This commit is contained in:
zu1k 2020-07-17 11:47:52 +08:00
parent 69d5fd5eea
commit b6e67af5bc

View File

@ -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)/*
rm $(BINDIR)/*