diff options
| author | ruki <[email protected]> | 2020-09-16 23:54:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-09-16 23:54:16 +0800 |
| commit | 92175acd1173b70cbd84ef5a80505cb30e00eeab (patch) | |
| tree | 95c4819cd35aaba1983b80524f6f806d9e9c2cd7 /core/makefile | |
| parent | 8290d48edda4098d0e76eb54e0c12e24218c53c0 (diff) | |
fix makefile for arm64
Diffstat (limited to 'core/makefile')
| -rw-r--r-- | core/makefile | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/core/makefile b/core/makefile index 3e1ebeb11..08a9bee4c 100644 --- a/core/makefile +++ b/core/makefile @@ -165,30 +165,31 @@ MSYSARCH := $(if $(findstring mingw32,$(shell which gcc)),i386,$(MSYSTEM_CARCH) else MSYSARCH := x$(shell getconf LONG_BIT) endif -BUILD_ARCH :=$(if $(findstring windows,$(PLAT)),x86,$(BUILD_ARCH)) -BUILD_ARCH :=$(if $(findstring msys,$(PLAT)),$(MSYSARCH),$(BUILD_ARCH)) -BUILD_ARCH :=$(if $(findstring cygwin,$(PLAT)),x$(shell getconf LONG_BIT),$(BUILD_ARCH)) -BUILD_ARCH :=$(if $(findstring macosx,$(PLAT)),x$(shell getconf LONG_BIT),$(BUILD_ARCH)) -BUILD_ARCH :=$(if $(findstring linux,$(PLAT)),$(shell uname -m),$(BUILD_ARCH)) -BUILD_ARCH :=$(if $(findstring bsd,$(PLAT)),x$(shell getconf LONG_BIT),$(BUILD_ARCH)) -BUILD_ARCH :=$(if $(findstring iphoneos,$(PLAT)),armv7,$(BUILD_ARCH)) -BUILD_ARCH :=$(if $(findstring android,$(PLAT)),armv7,$(BUILD_ARCH)) -BUILD_ARCH :=$(if $(findstring i686,$(BUILD_ARCH)),i386,$(BUILD_ARCH)) # from msys/mingw32 -BUILD_ARCH :=$(if $(findstring x32,$(BUILD_ARCH)),i386,$(BUILD_ARCH)) -BUILD_ARCH :=$(if $(findstring x64,$(BUILD_ARCH)),x86_64,$(BUILD_ARCH)) +BUILD_ARCH :=$(if $(findstring windows,$(PLAT)),x86,$(BUILD_ARCH)) +BUILD_ARCH :=$(if $(findstring msys,$(PLAT)),$(MSYSARCH),$(BUILD_ARCH)) +BUILD_ARCH :=$(if $(findstring cygwin,$(PLAT)),x$(shell getconf LONG_BIT),$(BUILD_ARCH)) +BUILD_ARCH :=$(if $(findstring macosx,$(PLAT)),x$(shell getconf LONG_BIT),$(BUILD_ARCH)) +BUILD_ARCH :=$(if $(findstring linux,$(PLAT)),$(shell uname -m),$(BUILD_ARCH)) +BUILD_ARCH :=$(if $(findstring bsd,$(PLAT)),x$(shell getconf LONG_BIT),$(BUILD_ARCH)) +BUILD_ARCH :=$(if $(findstring iphoneos,$(PLAT)),armv7,$(BUILD_ARCH)) +BUILD_ARCH :=$(if $(findstring android,$(PLAT)),armv7,$(BUILD_ARCH)) +BUILD_ARCH :=$(if $(findstring i686,$(BUILD_ARCH)),i386,$(BUILD_ARCH)) # from msys/mingw32 +BUILD_ARCH :=$(if $(findstring x32,$(BUILD_ARCH)),i386,$(BUILD_ARCH)) +BUILD_ARCH :=$(if $(findstring x64,$(BUILD_ARCH)),x86_64,$(BUILD_ARCH)) # on termux/ci ifneq ($(TERMUX_ARCH),) -BUILD_ARCH := $(TERMUX_ARCH) +BUILD_ARCH := $(TERMUX_ARCH) endif endif # translate architecture, e.g. armhf/armv7l -> arm, arm64-v8a -> arm64 -ARCHSTR := $(BUILD_ARCH) -BUILD_ARCH := $(if $(findstring aarch64,$(ARCHSTR)),arm64,$(BUILD_ARCH)) -BUILD_ARCH := $(if $(findstring arm64,$(ARCHSTR)),arm64,$(BUILD_ARCH)) -BUILD_ARCH := $(if $(findstring arm,$(ARCHSTR)),arm,$(BUILD_ARCH)) -BUILD_ARCH := $(if $(findstring i686,$(ARCHSTR)),i386,$(BUILD_ARCH)) +BUILD_ARCH := $(if $(findstring aarch64,$(BUILD_ARCH)),arm64,$(BUILD_ARCH)) +BUILD_ARCH := $(if $(findstring arm64,$(BUILD_ARCH)),arm64,$(BUILD_ARCH)) +ifneq ($(BUILD_ARCH),arm64) +BUILD_ARCH := $(if $(findstring arm,$(BUILD_ARCH)),arm,$(BUILD_ARCH)) +endif +BUILD_ARCH := $(if $(findstring i686,$(BUILD_ARCH)),i386,$(BUILD_ARCH)) # debug DEBUG :=$(if $(DEBUG),$(DEBUG),n) |
