diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
1 files changed, 24 insertions, 5 deletions
@@ -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 |