Skip to content

Commit

Permalink
Merge pull request #344 from oasisprotocol/ZigaMr/windows-build-suppo…
Browse files Browse the repository at this point in the history
…rt-2

feat: Windows build support 2
  • Loading branch information
ZigaMr authored Jan 13, 2025
2 parents 0f40354 + f35c069 commit b67f071
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ builds:
- arm64
- <<: *build-common
id: oasis-windows-amd64
binary: oasis.exe
binary: oasis
env:
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ all: build
# Build.
build: oasis

build-windows: $(shell find . -name "*.go" -type f) go.sum go.mod
@$(PRINT) "$(MAGENTA)*** Building for Windows...$(OFF)\n"
GOOS=windows GOARCH=amd64 $(GO) build -v -o oasis.exe $(GOFLAGS) $(GO_EXTRA_FLAGS)
build-windows: oasis.exe

oasis: $(shell find . -name "*.go" -type f) go.sum go.mod
@$(PRINT) "$(MAGENTA)*** Building Go code...$(OFF)\n"
@$(GO) build -v -o oasis $(GOFLAGS) $(GO_EXTRA_FLAGS)

oasis.exe: $(shell find . -name "*.go" -type f) go.sum go.mod
@$(PRINT) "$(MAGENTA)*** Building for Windows...$(OFF)\n"
GOOS=windows GOARCH=amd64 $(GO) build -v -o oasis.exe $(GOFLAGS) $(GO_EXTRA_FLAGS)

examples: $(EXAMPLES)

examples/%.out: examples/%.in oasis scripts/gen_example.sh
Expand Down Expand Up @@ -82,10 +84,10 @@ clean:
# List of targets that are not actual files.
.PHONY: \
all build \
build-windows \
examples \
clean-examples \
fmt \
$(lint-targets) lint \
$(test-targets) test \
clean
windows

0 comments on commit b67f071

Please sign in to comment.