Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
- Updated the Makefile to properly generate named executables when cross compiling
  • Loading branch information
manishmeganathan committed Jun 20, 2021
1 parent 2d6ada3 commit 4a2f148
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ install:

build-windows:
@echo Cross Compiling PeerChat for Windows x86
@GOOS=windows GOARCH=386 go build -o ./bin/windows/x32/
@GOOS=windows GOARCH=386 go build -o ./bin/peerchat-windows-x32.exe
@echo Cross Compiling PeerChat for Windows x64
@GOOS=windows GOARCH=amd64 go build -o ./bin/windows/x64/
@GOOS=windows GOARCH=amd64 go build -o ./bin/peerchat-windows-x64.exe

build-darwin:
@echo Cross Compiling PeerChat for MacOSX x64
@GOOS=darwin GOARCH=amd64 go build -o ./bin/darwin/x64/
@GOOS=darwin GOARCH=amd64 go build -o ./bin/peerchat-darwin-x64

build-linux:
@echo Cross Compiling PeerChat for Linux x32
@GOOS=linux GOARCH=386 go build -o ./bin/peerchat-linux-x32
@echo Cross Compiling PeerChat for Linux x64
@GOOS=linux GOARCH=386 go build -o ./bin/linux/x32/
@echo Cross Compiling PeerChat for Linux x64
@GOOS=linux GOARCH=amd64 go build -o ./bin/linux/x64/
@GOOS=linux GOARCH=amd64 go build -o ./bin/peerchat-linux-x64
@echo Cross Compiling PeerChat for Linux Arm32
@GOOS=linux GOARCH=arm go build -o ./bin/linux/arm32/
@GOOS=linux GOARCH=arm go build -o ./bin/peerchat-linux-arm32
@echo Cross Compiling PeerChat for Linux Arm64
@GOOS=linux GOARCH=arm64 go build -o ./bin/linux/arm64/
@GOOS=linux GOARCH=arm64 go build -o ./bin/peerchat-linux-arm64

build-all: build-windows build-darwin build-linux
@echo Cross Compiled PeerChat for all platforms
Expand Down

0 comments on commit 4a2f148

Please sign in to comment.