From c5328f94c1139e050674382f63b3f43cb61eacfb Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 19 Apr 2025 00:30:54 +1000 Subject: Avoid the need to set MINGW32 or MINGW64 environment variables when using a standard MSYS environment on Windows. --- makefile | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 24adcc8151d..2094e226d3b 100644 --- a/makefile +++ b/makefile @@ -234,12 +234,28 @@ $(error Unable to detect OS from uname -a: $(UNAME)) endif endif -MINGW:= +ifdef MSYSTEM +MINGW := $(MINGW_PREFIX) +ifeq ($(MSYSTEM),MINGW32) + MINGW32 := $(MINGW_PREFIX) +endif +ifeq ($(MSYSTEM),MINGW64) + MINGW64 := $(MINGW_PREFIX) +endif +ifeq ($(MSYSTEM),CLANGARM64) + MINGW64 := $(MINGW_PREFIX) +endif +ifndef TOOLCHAIN + TOOLCHAIN := $(MINGW_PREFIX)/bin/ +endif +else # MSYSTEM +MINGW := ifdef MINGW64 MINGW := $(MINGW64) -else +else # MINGW64 MINGW := $(MINGW32) -endif +endif # MINGW64 +endif # MSYSTEM #------------------------------------------------- # specify core target: mame, ldplayer -- cgit v1.2.3