From a1235ecf4c0f5ee2f0329c9558ccb2e41efbcc93 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 25 Feb 2020 23:09:37 +0800 Subject: improve makefile for mingw32 --- core/makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)) -- cgit v1.3.1