Skip to content

Commit

Permalink
Add oasis.exe rule and fix Makefile
Browse files Browse the repository at this point in the history
Add oasis.exe rule

Remove .exe extension which is handled by goreleaser

Move build-windows phony target

Change release-build option to previous version
  • Loading branch information
ZigaMr committed Jan 13, 2025
1 parent 782497c commit f35c069
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 f35c069

Please sign in to comment.