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:
parent
69d5fd5eea
commit
b6e67af5bc
11
Makefile
11
Makefile
@ -1,10 +1,10 @@
|
|||||||
NAME=nali
|
NAME=nali
|
||||||
BINDIR=bin
|
BINDIR=bin
|
||||||
VERSION=$(hell git describe --tags || echo "unknown version")
|
VERSION=$(hell git describe --tags || echo "unknown version")
|
||||||
BUILDTIME=$(hell date -u)
|
BUILDTIME=$(shell date -u)
|
||||||
GOBUILD=CGO_ENABLED=0 go build -ldflags '-X "github.com/zu1k/nali/constant.Version=$(VERSION)" \
|
GOBUILD=CGO_ENABLED=0 go build -trimpath -ldflags '-X "github.com/zu1k/nali/constant.Version=$(VERSION)" \
|
||||||
-X "github.com/zu1k/nali/constant.BuildTime=$(BUILDTIME)" \
|
-X "github.com/zu1k/nali/constant.BuildTime=$(BUILDTIME)" \
|
||||||
-w -s' -trimpath
|
-w -s'
|
||||||
|
|
||||||
PLATFORM_LIST = \
|
PLATFORM_LIST = \
|
||||||
darwin-amd64 \
|
darwin-amd64 \
|
||||||
@ -27,6 +27,8 @@ WINDOWS_ARCH_LIST = \
|
|||||||
windows-386 \
|
windows-386 \
|
||||||
windows-amd64
|
windows-amd64
|
||||||
|
|
||||||
|
all: linux-amd64 darwin-amd64 windows-amd64 # Most used
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
$(GOBUILD) -o $(BINDIR)/$(NAME)-$@
|
$(GOBUILD) -o $(BINDIR)/$(NAME)-$@
|
||||||
|
|
||||||
@ -80,6 +82,7 @@ windows-386:
|
|||||||
|
|
||||||
windows-amd64:
|
windows-amd64:
|
||||||
GOARCH=amd64 GOOS=windows $(GOBUILD) -o $(BINDIR)/$(NAME)-$@.exe
|
GOARCH=amd64 GOOS=windows $(GOBUILD) -o $(BINDIR)/$(NAME)-$@.exe
|
||||||
|
|
||||||
gz_releases=$(addsuffix .gz, $(PLATFORM_LIST))
|
gz_releases=$(addsuffix .gz, $(PLATFORM_LIST))
|
||||||
zip_releases=$(addsuffix .zip, $(WINDOWS_ARCH_LIST))
|
zip_releases=$(addsuffix .zip, $(WINDOWS_ARCH_LIST))
|
||||||
|
|
||||||
@ -94,4 +97,4 @@ all-arch: $(PLATFORM_LIST) $(WINDOWS_ARCH_LIST)
|
|||||||
|
|
||||||
releases: $(gz_releases) $(zip_releases)
|
releases: $(gz_releases) $(zip_releases)
|
||||||
clean:
|
clean:
|
||||||
rm $(BINDIR)/*
|
rm $(BINDIR)/*
|
||||||
|
Loading…
Reference in New Issue
Block a user