Skip to content

Commit

Permalink
.build/go.mk: create windows binaries with .exe extension
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Salgado <mariozalgo@gmail.com>
Signed-off-by: zalgonoise <mariozalgo@gmail.com>
  • Loading branch information
zalgonoise committed May 9, 2024
1 parent 81e77d2 commit d776aec
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .build/go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ mk_go_build_clean:

$(CROSS_COMPILED_BINARIES): $(GOFILES) $(TARGET_DIST)
$(info *** compiling $@)
@GOOS=$(call get_os_from_binary_file,$@) \
@os=$(call get_os_from_binary_file,$@); \
filename=$@ ; \
if [[ $${os} == 'windows' ]]; then filename=$@.exe; fi; \
GOOS=$${os} \
GOARCH=$(call get_arch_from_binary_file,$@) \
$(GO_BUILD) $(BUILD_MODE) $(LDFLAGS) -o $@;
$(GO_BUILD) $(BUILD_MODE) $(LDFLAGS) -o $${filename};

##### =====> Compile Tests <===== #####

Expand Down

0 comments on commit d776aec

Please sign in to comment.