diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0f99378..d1f3f80 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,6 +34,11 @@ include: - project: 'libretro-infrastructure/ci-templates' file: '/osx-x64.yml' + # MacOS ARM 64-bit + - project: 'libretro-infrastructure/ci-templates' + ref: 'macosx-arm64' + file: '/osx-arm64.yml' + ################################## CELLULAR ################################ # Android - project: 'libretro-infrastructure/ci-templates' @@ -126,6 +131,12 @@ libretro-build-osx-x64: - .libretro-osx-x64-make-default - .core-defs +# MacOS ARM 64-bit +libretro-build-osx-arm64: + extends: + - .libretro-osx-arm64-make-default + - .core-defs + ################################### CELLULAR ################################# # Android ARMv7a android-armeabi-v7a: diff --git a/Makefile.libretro b/Makefile.libretro index db37a02..9d9d6f7 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -41,10 +41,15 @@ ifeq ($(shell uname -a),) system_platform = win else ifneq ($(findstring Darwin,$(shell uname -a)),) system_platform = osx - arch = intel - ifeq ($(shell uname -p),powerpc) - arch = ppc +ifeq ($(shell uname -p),powerpc) + arch = ppc +else + ifeq ($(shell uname -p),arm) + arch = arm + else + arch = intel endif +endif else ifneq ($(findstring MINGW,$(shell uname -a)),) system_platform = win endif @@ -86,9 +91,11 @@ else ifeq ($(platform), osx) ifeq ($(arch),ppc) ENDIANNESS_DEFINES += -DMSB_FIRST -DHAVE_NO_LANGEXTRA endif + ifneq ($(arch),arm) + fpic += -mmacosx-version-min=10.1 + endif OSXVER = `sw_vers -productVersion | cut -d. -f 2` OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"` - fpic += -mmacosx-version-min=10.1 ifndef ($(NOUNIVERSAL)) CFLAGS += $(ARCHFLAGS) LDFLAGS += $(ARCHFLAGS)