Skip to content

Commit

Permalink
Added cross-compilation make target
Browse files Browse the repository at this point in the history
Updated .gitignore
  • Loading branch information
SamusAranX committed May 11, 2023
1 parent 3f17814 commit a31f211
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ Icon
.com.apple.timemachine.donotpresent

# project files
/gbs2gb
/gbs2gb.exe
/gbs2gb*
/gbs2gb*.exe
/out
*.gb
*.gbs
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ GOBUILDEXT = $(GOBUILD) -o $(BINARY_NAME) $(LDFLAGS)
build:
$(GOBUILDEXT)
@echo Build completed
buildall:
@echo Building windows-x64…
@GOOS=windows GOARCH=amd64 $(GOBUILD) -o $(BINARY_NAME)-windows-x64.exe $(LDFLAGS)
@echo Building macos-x64…
@GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINARY_NAME)-macos-x64 $(LDFLAGS)
@echo Building macos-arm64…
@GOOS=darwin GOARCH=arm64 $(GOBUILD) -o $(BINARY_NAME)-macos-arm64 $(LDFLAGS)
@echo Building linux-x64…
@GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_NAME)-linux-x64 $(LDFLAGS)
@echo Building linux-arm64…
@GOOS=linux GOARCH=arm64 $(GOBUILD) -o $(BINARY_NAME)-linux-arm64 $(LDFLAGS)
@echo Builds completed
image:
docker buildx build --progress=plain -t $(BINARY_NAME) .
test: build
Expand Down

0 comments on commit a31f211

Please sign in to comment.