mirror of
https://github.com/Elegycloud/clash-backup.git
synced 2024-12-23 02:47:23 +08:00
24 lines
509 B
Makefile
24 lines
509 B
Makefile
NAME=clash
|
|
BINDIR=bin
|
|
GOBUILD=CGO_ENABLED=0 go build -ldflags '-w -s'
|
|
|
|
all: linux macos
|
|
|
|
linux:
|
|
GOARCH=amd64 GOOS=linux $(GOBUILD) -o $(BINDIR)/$(NAME)-$@
|
|
|
|
macos:
|
|
GOARCH=amd64 GOOS=darwin $(GOBUILD) -o $(BINDIR)/$(NAME)-$@
|
|
|
|
win64:
|
|
GOARCH=amd64 GOOS=windows $(GOBUILD) -o $(BINDIR)/$(NAME)-$@.exe
|
|
|
|
releases: linux macos win64
|
|
chmod +x $(BINDIR)/$(NAME)-*
|
|
gzip $(BINDIR)/$(NAME)-linux
|
|
gzip $(BINDIR)/$(NAME)-macos
|
|
zip -m -j $(BINDIR)/$(NAME)-win64.zip $(BINDIR)/$(NAME)-win64.exe
|
|
|
|
clean:
|
|
rm $(BINDIR)/*
|