parent
f20f06af28
commit
fafc65ed6f
1 changed files with 6 additions and 2 deletions
8
Makefile
8
Makefile
|
@ -2,7 +2,7 @@ NAME=clash
|
||||||
BINDIR=bin
|
BINDIR=bin
|
||||||
GOBUILD=CGO_ENABLED=0 go build -ldflags '-w -s'
|
GOBUILD=CGO_ENABLED=0 go build -ldflags '-w -s'
|
||||||
|
|
||||||
all: linux macos win64
|
all: linux macos freebsd win64
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
GOARCH=amd64 GOOS=linux $(GOBUILD) -o $(BINDIR)/$(NAME)-$@
|
GOARCH=amd64 GOOS=linux $(GOBUILD) -o $(BINDIR)/$(NAME)-$@
|
||||||
|
@ -10,13 +10,17 @@ linux:
|
||||||
macos:
|
macos:
|
||||||
GOARCH=amd64 GOOS=darwin $(GOBUILD) -o $(BINDIR)/$(NAME)-$@
|
GOARCH=amd64 GOOS=darwin $(GOBUILD) -o $(BINDIR)/$(NAME)-$@
|
||||||
|
|
||||||
|
freebsd:
|
||||||
|
GOARCH=amd64 GOOS=freebsd $(GOBUILD) -o $(BINDIR)/$(NAME)-$@
|
||||||
|
|
||||||
win64:
|
win64:
|
||||||
GOARCH=amd64 GOOS=windows $(GOBUILD) -o $(BINDIR)/$(NAME)-$@.exe
|
GOARCH=amd64 GOOS=windows $(GOBUILD) -o $(BINDIR)/$(NAME)-$@.exe
|
||||||
|
|
||||||
releases: linux macos win64
|
releases: linux macos freebsd win64
|
||||||
chmod +x $(BINDIR)/$(NAME)-*
|
chmod +x $(BINDIR)/$(NAME)-*
|
||||||
gzip $(BINDIR)/$(NAME)-linux
|
gzip $(BINDIR)/$(NAME)-linux
|
||||||
gzip $(BINDIR)/$(NAME)-macos
|
gzip $(BINDIR)/$(NAME)-macos
|
||||||
|
gzip $(BINDIR)/$(NAME)-freebsd
|
||||||
zip -m -j $(BINDIR)/$(NAME)-win64.zip $(BINDIR)/$(NAME)-win64.exe
|
zip -m -j $(BINDIR)/$(NAME)-win64.zip $(BINDIR)/$(NAME)-win64.exe
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
Loading…
Reference in a new issue