Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan committed Oct 19, 2019
1 parent 4cc6839 commit b33f959
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*.test
client/client
server/server
/bin

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
Expand Down
17 changes: 17 additions & 0 deletions Makefile.cross-compiles
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
LDFLAGS := -s -w

all: build

build:
env GOOS=darwin GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o bin/client_darwin_amd64 ./client
env GOOS=darwin GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o bin/server_darwin_amd64 ./server
env GOOS=darwin GOARCH=386 go build -ldflags "$(LDFLAGS)" -o bin/client_darwin_386 ./client
env GOOS=darwin GOARCH=386 go build -ldflags "$(LDFLAGS)" -o bin/server_darwin_386 ./server
env GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o bin/client_linux_amd64 ./client
env GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o bin/server_linux_amd64 ./server
env GOOS=linux GOARCH=386 go build -ldflags "$(LDFLAGS)" -o bin/client_linux_386 ./client
env GOOS=linux GOARCH=386 go build -ldflags "$(LDFLAGS)" -o bin/server_linux_386 ./server
env GOOS=windows GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o bin/client_windows_amd64 ./client
env GOOS=windows GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o bin/server_windows_amd64 ./server
env GOOS=windows GOARCH=386 go build -ldflags "$(LDFLAGS)" -o bin/client_windows_386 ./client
env GOOS=windows GOARCH=386 go build -ldflags "$(LDFLAGS)" -o bin/server_windows_386 ./server

0 comments on commit b33f959

Please sign in to comment.