From 76eab0b4b1d0d9392b4f38de89d9d1cc4159a1bd Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Fri, 2 Sep 2022 18:37:34 -0500 Subject: [PATCH] Update to SDL 2.24.0 and add separate macOS UB2 dylib Update mingw and macOS SDL libraries to 2.24.0. (MSVC .lib files and Xcode project haven't been updated.) There is now a separate SDL dylib for macOS Universal Binary 1 and 2 because SDL 2.24.0 dropped support for macOS 10.6 (which is last to support x86). Documentation says SDL 2.24.0 also dropped macOS 10.7 and 10.8 too. So UB2 is now 10.9 or later while 10.5 to 10.8 live in UB1. Compiled using osxcross with macOS 11.3 SDK. Ran "strip -x" on Windows and macOS libraries. Ad-hoc signed dylib using PyOxidizer rcodesign to fix digest checksums after strip. --- Makefile | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8be991c97..ae07d0761 100644 --- a/Makefile +++ b/Makefile @@ -294,10 +294,31 @@ ifeq ($(PLATFORM),darwin) # Default minimum Mac OS X version ifeq ($(MACOSX_VERSION_MIN),) - MACOSX_VERSION_MIN=10.7 + MACOSX_VERSION_MIN=10.9 ifneq ($(findstring $(ARCH),ppc ppc64),) MACOSX_VERSION_MIN=10.5 endif + ifeq ($(ARCH),x86) + MACOSX_VERSION_MIN=10.6 + endif + ifeq ($(ARCH),x86_64) + # trying to find default SDK version is hard + # macOS 10.15 requires -sdk macosx but 10.11 doesn't support it + # macOS 10.6 doesn't have -show-sdk-version + DEFAULT_SDK=$(shell xcrun -sdk macosx -show-sdk-version 2> /dev/null) + ifeq ($(DEFAULT_SDK),) + DEFAULT_SDK=$(shell xcrun -show-sdk-version 2> /dev/null) + endif + ifeq ($(DEFAULT_SDK),) + $(error Error: Unable to determine macOS SDK version. On macOS 10.6 to 10.8 run: make MACOSX_VERSION_MIN=10.6 On macOS 10.9 or later run: make MACOSX_VERSION_MIN=10.9 ); + endif + + ifneq ($(findstring $(DEFAULT_SDK),10.6 10.7 10.8),) + MACOSX_VERSION_MIN=10.6 + else + MACOSX_VERSION_MIN=10.9 + endif + endif ifeq ($(ARCH),arm64) MACOSX_VERSION_MIN=11.0 endif