Skip to content

Commit

Permalink
Makefile update to support cross-compiling AMD64 binaries on Apple Si…
Browse files Browse the repository at this point in the history
…licon (M1/M2 chips, etc)
  • Loading branch information
jieyilong committed Nov 19, 2023
1 parent c3dffec commit ecc302f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ docker:

install: gen_version release

# Cross compile AMD64 binaries on Apple Silicon (M1/M2 chips, etc)
install_as: gen_version
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o ${GOBIN}/thetasubchain ./cmd/theta/
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o ${GOBIN}/thetasubcli ./cmd/thetacli/
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o ${GOBIN}/subchain_generate_genesis ./integration/tools/subchain_generate_genesis

exe:
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -o thetasubchain.exe ./cmd/thetasubchain/
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -o thetasubcli.exe ./cmd/thetasubcli/
Expand Down

0 comments on commit ecc302f

Please sign in to comment.