summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-12-10 11:16:45 +0000
committerbjarni <bjarni@openttd.org>2005-12-10 11:16:45 +0000
commit6a6e1450106f9944f74021edcd9aec54b3cc11ab (patch)
treeb00faf47a1ca2028f095a2c406983e4e94fd533e /Makefile
parentf1877b3fe9b03f34fdfa5aa7ef3cfd205e08ab29 (diff)
downloadopenttd-6a6e1450106f9944f74021edcd9aec54b3cc11ab.tar.xz
(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
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 24 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 9d9cf64ca..2680cbd49 100644
--- a/Makefile
+++ b/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