From 2cb2d203867cf1c42740109e09c4586a8beeac51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Sun, 17 Mar 2024 16:04:01 -0400
Subject: [PATCH] Apparently -framework is a link flag, not a compile one

---
 src/build/Common.gmake | 18 ++++++------------
 src/conio/Common.gmake |  2 +-
 src/xpdev/Common.gmake |  2 +-
 3 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/src/build/Common.gmake b/src/build/Common.gmake
index a1dda3c422..c49f17fa5e 100644
--- a/src/build/Common.gmake
+++ b/src/build/Common.gmake
@@ -436,19 +436,13 @@ else
 endif
 
 SHLIBOPTS   :=  -shared
-ifeq ($(os),darwin)
- MKSHLIB        :=  libtool -dynamic -framework System -lcc_dynamic
- MKSHPPLIB      :=  libtool -dynamic -framework System -lcc_dynamic -lstdc++
- SHLIBOPTS  :=
+ifeq ($(os),sunos)
+ MKSHLIB       :=  /usr/ccs/bin/ld -G
+ MKSHPPLIB     :=  /usr/ccs/bin/ld -G
+ SHLIBOPTS :=
 else
- ifeq ($(os),sunos)
-  MKSHLIB       :=  /usr/ccs/bin/ld -G
-  MKSHPPLIB     :=  /usr/ccs/bin/ld -G
-  SHLIBOPTS :=
- else
-  MKSHLIB       :=  $(CC)
-  MKSHPPLIB     :=  $(CXX)
- endif
+ MKSHLIB       :=  $(CC)
+ MKSHPPLIB     :=  $(CXX)
 endif
 
 # Paths
diff --git a/src/conio/Common.gmake b/src/conio/Common.gmake
index 6dcd786fc2..3103231602 100644
--- a/src/conio/Common.gmake
+++ b/src/conio/Common.gmake
@@ -103,7 +103,7 @@ ifdef USE_SDL
   ifeq ($(os),darwin)
    ifeq ($(shell if [ -d /Library/Frameworks/SDL2.framework ] ; then echo YES ; fi),YES)
     SDL_FRAMEWORK_PATH ?= /Library/Frameworks
-    CFLAGS += -F${SDL_FRAMEWORK_PATH} -framework SDL2
+    CFLAGS += -F${SDL_FRAMEWORK_PATH}
    endif
    ifdef SDL_FRAMEWORK_PATH
     WITH_SDL	:=	1
diff --git a/src/xpdev/Common.gmake b/src/xpdev/Common.gmake
index a1224c63e8..1ce8175ab5 100644
--- a/src/xpdev/Common.gmake
+++ b/src/xpdev/Common.gmake
@@ -105,7 +105,7 @@ ifdef USE_SDL_AUDIO
   ifeq ($(os),darwin)
    ifeq ($(shell if [ -d /Library/Frameworks/SDL2.framework ] ; then echo YES ; fi),YES)
     SDL_FRAMEWORK_PATH ?= /Library/Frameworks
-    CFLAGS += -F${SDL_FRAMEWORK_PATH} -framework SDL2
+    CFLAGS += -F${SDL_FRAMEWORK_PATH}
    endif
    ifdef SDL_FRAMEWORK_PATH
     WITH_SDL_AUDIO	:=	1
-- 
GitLab