sdl2-compat: further minor update to Makefile.darwin.

From 9eaa8a04dc0d8c526cb22a527f42de04a3c5018d Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Wed, 30 Nov 2022 20:50:40 +0300
Subject: [PATCH] further minor update to Makefile.darwin.

it builds the dylib even with the very old gcc-4.2 and even against the
10.6 sdk, but things may change in future..
---
 src/Makefile.darwin | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/Makefile.darwin b/src/Makefile.darwin
index ddefec0..bad223f 100644
--- a/src/Makefile.darwin
+++ b/src/Makefile.darwin
@@ -4,7 +4,7 @@
 # change INCLUDES so it points to SDL3 headers directory:
 INCLUDES = -Iinclude
 
-# to specify a minimum macOS target:
+# minimum Mac OS X target
 DEPLOYMENT_TARGET = 10.9
 
 ifeq ($(CROSS),)
@@ -21,8 +21,10 @@ CFLAGS  = -fPIC -fvisibility=hidden -O3 -Wall
 LDFLAGS = -dynamiclib -Wl,-undefined,error -Wl,-single_module
 #LDFLAGS+= -Wl,-headerpad_max_install_names
 LDFLAGS+= -Wl,-install_name,"/usr/local/lib/$(DYLIB)"
-LDFLAGS+= -Wl,-compatibility_version,9000.0 -Wl,-current_version,9001.0
+LDFLAGS+= -Wl,-compatibility_version,9001.0 -Wl,-current_version,9001.0
 LDLIBS  = -Wl,-framework,AppKit
+# this is needed for x86_64 - cross-gcc might not add it.
+#LDLIBS += -Wl,-lbundle1.o
 ifneq ($(DEPLOYMENT_TARGET),)
 CFLAGS += -mmacosx-version-min=$(DEPLOYMENT_TARGET)
 LDFLAGS+= -mmacosx-version-min=$(DEPLOYMENT_TARGET)
@@ -30,7 +32,7 @@ endif
 
 DYLIB = libSDL2-2.0.0.dylib
 
-OBJ = sdl2_compat.o sdl2_compat_objc.o dynapi/SDL_dynapi.o
+OBJ = sdl2_compat.o dynapi/SDL_dynapi.o sdl2_compat_objc.o
 
 .SUFFIXES:
 .SUFFIXES: .o .c .m