From 95852c466cb6d0afff97bc3cc213790c37a6ab27 Mon Sep 17 00:00:00 2001 From: Yamagi Date: Sat, 4 Nov 2023 14:05:02 +0100 Subject: [PATCH] Normalize arm64 to aarch 64 on not MacOS and Windows. This makes sure that 64 bit and 32 bit aren't endig up as `arm`, making it possible to load 32 bit savegames on 64 bit binaries and vise versa. This is a theoretical issue with ctf, because the mod doesn't support savegames. For MacOS just use what the system calls itself. Closes #18. --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d616d6f..1c1ebfe 100755 --- a/Makefile +++ b/Makefile @@ -47,8 +47,12 @@ YQ2_ARCH ?= $(PROCESSOR_ARCHITECTURE) endif endif # windows but MINGW_CHOST not defined else +ifneq ($(YQ2_OSTYPE), Darwin) # Normalize some abiguous YQ2_ARCH strings -YQ2_ARCH ?= $(shell uname -m | sed -e 's/i.86/i386/' -e 's/amd64/x86_64/' -e 's/^arm.*/arm/') +YQ2_ARCH ?= $(shell uname -m | sed -e 's/i.86/i386/' -e 's/amd64/x86_64/' -e 's/arm64/aarch64/' -e 's/^arm.*/arm/') +else +YQ2_ARCH ?= $(shell uname -m) +endif endif # On Windows / MinGW $(CC) is undefined by default.