Makefile
changeset 2736 3d6487cbbb69
parent 2735 07adb417aa05
child 2742 a85da8a7fac8
--- a/Makefile	Sat Dec 10 07:29:31 2005 +0000
+++ b/Makefile	Sat Dec 10 11:16:45 2005 +0000
@@ -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
 
+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 @@
 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 @@
 STRGEN_FLAGS=
 endif
 
-
 # OSX specific setup
 ifdef OSX
 	# set the endian flag for OSX, that can't fail
@@ -519,6 +528,11 @@
 		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 @@
 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