Clash.Meta/Makefile

24 lines
515 B
Makefile
Raw Normal View History

2018-06-17 08:18:39 +08:00
NAME=clash
BINDIR=bin
GOBUILD=CGO_ENABLED=0 go build -ldflags '-w -s'
2018-08-12 14:06:50 +08:00
all: linux macos win64
2018-06-17 08:18:39 +08:00
linux:
GOARCH=amd64 GOOS=linux $(GOBUILD) -o $(BINDIR)/$(NAME)-$@
macos:
GOARCH=amd64 GOOS=darwin $(GOBUILD) -o $(BINDIR)/$(NAME)-$@
2018-06-20 23:00:16 +08:00
win64:
GOARCH=amd64 GOOS=windows $(GOBUILD) -o $(BINDIR)/$(NAME)-$@.exe
releases: linux macos win64
2018-06-17 08:18:39 +08:00
chmod +x $(BINDIR)/$(NAME)-*
gzip $(BINDIR)/$(NAME)-linux
gzip $(BINDIR)/$(NAME)-macos
2018-06-20 23:00:16 +08:00
zip -m -j $(BINDIR)/$(NAME)-win64.zip $(BINDIR)/$(NAME)-win64.exe
2018-06-17 08:18:39 +08:00
clean:
rm $(BINDIR)/*