Makefile.common: gate RetroArchPlaylistManager.o on HAVE_COCOATOUCH

GCC 4.0 (Xcode 3.1, PowerPC) reports:

    In file included from RetroArchPlaylistManager.m:8:
    RetroArchPlaylistManager.h:14: error: syntax error before
        'AT_NAME' token

Commit cc1a131 gated RetroArchPlaylistManager.m out of the griffin
unity build on non-COCOATOUCH targets, but missed this separate
object entry in Makefile.common, which adds the file to OBJ
unconditionally whenever HAVE_COCOA_COMMON is set (i.e. any Cocoa
build, including macOS desktop).

The qb/make build compiles each .o individually from this OBJ list,
so it never saw the griffin-side gate.  RetroArchPlaylistManager
uses Obj-C lightweight generics and nullability macros (Xcode 7+,
2015), which GCC 4.0 can't parse.

Wrap the line in ifeq ($(HAVE_COCOATOUCH), 1).  HAVE_COCOATOUCH
isn't currently set anywhere in Makefile.common — iOS builds go
through Xcode projects, not make — so this effectively drops the
file from the desktop make build.  The gate leaves the door open
for adding iOS make support later without another round-trip.
This commit is contained in:
U-DESKTOP-SPFP6AQ\twistedtechre committed 2026-04-21 02:24:43 +02:00
1 parent 5b9c5dc634
commit 345a2effcf
1 file changed
+9 -2
+9 -2
View File
@@ -2602,8 +2602,15 @@ ifeq ($(HAVE_COCOA_COMMON),1)
DEFINES += -DHAVE_MAIN -DOSX -DHAVE_COCOA
OBJ += input/drivers/cocoa_input.o \
ui/drivers/ui_cocoa.o \
ui/drivers/cocoa/cocoa_common.o \
ui/drivers/cocoa/RetroArchPlaylistManager.o
ui/drivers/cocoa/cocoa_common.o
# RetroArchPlaylistManager uses Obj-C lightweight generics and
# nullability macros (Xcode 7+, 2015). Its only consumer,
# cocoa_launch_game_by_filename(), is iOS/tvOS-only. Gate on
# HAVE_COCOATOUCH so desktop (macOS) make-builds don't try to
# compile it - GCC 4.0 on PPC can't parse the Xcode 7 syntax.
ifeq ($(HAVE_COCOATOUCH), 1)
OBJ += ui/drivers/cocoa/RetroArchPlaylistManager.o
endif
LIBS += -framework Cocoa -framework AppKit -framework Foundation
ifeq ($(HAVE_OPENGL), 1)