summaryrefslogtreecommitdiff
path: root/core/makefile
diff options
context:
space:
mode:
authorruki <[email protected]>2020-02-25 23:09:37 +0800
committerruki <[email protected]>2020-02-25 12:57:43 +0800
commita1235ecf4c0f5ee2f0329c9558ccb2e41efbcc93 (patch)
treee6e185d571c832e654c9bae571c8811b11ee54be /core/makefile
parentce6f3fbf261e55584fba8501d0307bd23ca859b7 (diff)
improve makefile for mingw32
Diffstat (limited to 'core/makefile')
-rw-r--r--core/makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/makefile b/core/makefile
index 44d334871..4293b9c57 100644
--- a/core/makefile
+++ b/core/makefile
@@ -159,11 +159,17 @@ PLAT :=$(if $(PLAT),$(PLAT),linux)
# architecture
ifeq ($(ARCH),)
+ifneq ($(MSYSTEM_CARCH),)
+MSYSARCH := $(MSYSTEM_CARCH)
+else
+MSYSARCH := x$(shell getconf LONG_BIT)
+endif
ARCH :=$(if $(findstring windows,$(PLAT)),x86,$(ARCH))
-ARCH :=$(if $(findstring msys,$(PLAT)),x$(shell getconf LONG_BIT),$(ARCH))
+ARCH :=$(if $(findstring msys,$(PLAT)),$(MSYSARCH),$(ARCH))
ARCH :=$(if $(findstring cygwin,$(PLAT)),x$(shell getconf LONG_BIT),$(ARCH))
ARCH :=$(if $(findstring macosx,$(PLAT)),x$(shell getconf LONG_BIT),$(ARCH))
ARCH :=$(if $(findstring linux,$(PLAT)),x$(shell getconf LONG_BIT),$(ARCH))
+ARCH :=$(if $(findstring i686,$(ARCH)),i386,$(ARCH))
ARCH :=$(if $(findstring x32,$(ARCH)),i386,$(ARCH))
ARCH :=$(if $(findstring x64,$(ARCH)),x86_64,$(ARCH))
ARCH :=$(if $(findstring iphoneos,$(PLAT)),armv7,$(ARCH))