Skip to content

Commit

Permalink
Chore: 添加一个 Makefile 文件,同时编译出四个平台的可执行文件
Browse files Browse the repository at this point in the history
  • Loading branch information
dzpao committed Jul 8, 2019
1 parent c5e21e3 commit 2802b8e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
go-mud*
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
default: all

ALL=go-mud-linux-amd64 go-mud-linux-arm64 go-mud-macOS-amd64 go-mud-windows-amd64.exe
all: $(ALL)

SRCS=main.go

go-mud-linux-amd64: $(SRC)
GOOS=linux GOARCH=amd64 go build -o $@ main.go

go-mud-linux-arm64: $(SRC)
GOOS=linux GOARCH=arm64 go build -o $@ main.go

go-mud-macOS-amd64: $(SRC)
GOOS=darwin GOARCH=amd64 go build -o $@ main.go

go-mud-windows-amd64.exe: $(SRC)
GOOS=windows GOARCH=amd64 go build -o $@ main.go

zip: all
zip go-mud.zip go-mud-{linux,macOS,windows}-* *.lua

clean:
rm -f $(ALL)

0 comments on commit 2802b8e

Please sign in to comment.