summaryrefslogtreecommitdiffstatshomepage
path: root/makefile
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2025-04-19 00:30:54 +1000
committer Vas Crabb <vas@vastheman.com>2025-04-19 00:32:18 +1000
commitc5328f94c1139e050674382f63b3f43cb61eacfb (patch)
treecf662b9b8d8637a4038c20c20e9e433bc5e898a1 /makefile
parentaa3dc30a1838d3f0983b744b20834de4dd4ef836 (diff)
Avoid the need to set MINGW32 or MINGW64 environment variables when using a standard MSYS environment on Windows.
Diffstat (limited to 'makefile')
-rw-r--r--makefile22
1 files changed, 19 insertions, 3 deletions
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