diff options
Diffstat (limited to 'py')
| -rw-r--r-- | py/mkrules.mk | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/py/mkrules.mk b/py/mkrules.mk index 038a49329..63f704967 100644 --- a/py/mkrules.mk +++ b/py/mkrules.mk @@ -178,6 +178,13 @@ endif ifneq ($(PROG),) # Build a standalone executable (unix does this) +# The executable should have an .exe extension for builds targetting 'pure' +# Windows, i.e. msvc or mingw builds, but not when using msys or cygwin's gcc. +COMPILER_TARGET := $(shell $(CC) -dumpmachine) +ifneq (,$(findstring mingw,$(COMPILER_TARGET))) +PROG := $(PROG).exe +endif + all: $(PROG) $(PROG): $(OBJ) @@ -186,9 +193,9 @@ $(PROG): $(OBJ) # we may want to compile using Thumb, but link with non-Thumb libc. $(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS) ifndef DEBUG - $(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $(PROG) + $(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $@ endif - $(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $(PROG) + $(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $@ clean: clean-prog clean-prog: |
