(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
you can still use SDL drivers if you like and you have to run "make upgradeconf" to start using the cocoa drivers (or manually write WITH_COCOA:=1) since SDL breaks the cocoa drivers, you can't compile with both SDL and cocoa support Using cocoa drivers makes it easier to make universal binaries and it solves: -FS#18 [OSX] SDL is weird in universal binaries -FS#2 [OSX] lazy pointer crash on exit -FS#10 [OSX] linking error when linking statically to SDL 1.2.8 (needless to explain this, but it means it should be able to compile statically with the default settings now) -[ 1215073 ] Switching to large size out of fullscreen crashes Using SDL drivers will still have those issues though
This commit is contained in:
29
Makefile
29
Makefile
@@ -43,6 +43,7 @@
|
||||
# WITH_ZLIB: savegames using zlib
|
||||
# WITH_PNG: screenshots using PNG
|
||||
# WITH_SDL: SDL video driver support
|
||||
# WITH_COCOA: Cocoa video driver support
|
||||
#
|
||||
# Summary of other defines:
|
||||
# MANUAL_CONFIG: do not use Makefile.config, config options set manually
|
||||
@@ -206,6 +207,14 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef WITH_COCOA
|
||||
ifdef WITH_SDL
|
||||
$(error You can not use both the SDL video driver and the Cocoa video driver at the same time)
|
||||
endif
|
||||
ifdef DEDICATED
|
||||
$(error You can not use the Cocoa video driver in a dedicated server)
|
||||
endif
|
||||
else
|
||||
# Force SDL on UNIX platforms
|
||||
ifndef WITH_SDL
|
||||
ifdef UNIX
|
||||
@@ -214,6 +223,7 @@ $(error You need to have SDL installed in order to run OpenTTD on UNIX. Use DEDI
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# remove the dependancy for sdl if DEDICALTED is used
|
||||
# and add -lpthread to LDFLAGS, because SDL normally adds that...
|
||||
@@ -502,7 +512,6 @@ else
|
||||
STRGEN_FLAGS=
|
||||
endif
|
||||
|
||||
|
||||
# OSX specific setup
|
||||
ifdef OSX
|
||||
# set the endian flag for OSX, that can't fail
|
||||
@@ -519,6 +528,11 @@ ifdef OSX
|
||||
LIBS += -framework QuickTime
|
||||
endif
|
||||
|
||||
ifdef WITH_COCOA
|
||||
CDEFS += -DWITH_COCOA
|
||||
LIBS += -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit
|
||||
endif
|
||||
|
||||
# OSX path setup
|
||||
ifndef SECOND_DATA_PATH
|
||||
SECOND_DATA_PATH:="$(OSXAPP)/Contents/Data/"
|
||||
@@ -744,10 +758,15 @@ else
|
||||
endif
|
||||
|
||||
ifdef OSX
|
||||
SRCS += os/macosx/macos.m
|
||||
ifndef DEDICATED
|
||||
SRCS += music/qtmidi.c
|
||||
endif
|
||||
SRCS += os/macosx/macos.m
|
||||
ifndef DEDICATED
|
||||
SRCS += music/qtmidi.c
|
||||
endif
|
||||
ifdef WITH_COCOA
|
||||
SRCS += video/cocoa_v.m
|
||||
SRCS += sound/cocoa_s.c
|
||||
SRCS += os/macosx/splash.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef BEOS
|
||||
|
||||
Reference in New Issue
Block a user