about summary refs log tree commit diff
path: root/default.bam
diff options
context:
space:
mode:
authorJoel de Vahl <joel@stalverk80.se>2008-10-21 15:59:32 +0000
committerJoel de Vahl <joel@stalverk80.se>2008-10-21 15:59:32 +0000
commit8edfa800280d49c51c56e044d75b0858c20ed0a2 (patch)
tree1dca72b1783bcdc4f6ae44aca3c722d29014437c /default.bam
parent39b0b6cbf85d8f1b4fe97ff9ad6939905a5bfc22 (diff)
downloadzcatch-8edfa800280d49c51c56e044d75b0858c20ed0a2.tar.gz
zcatch-8edfa800280d49c51c56e044d75b0858c20ed0a2.zip
Use SDL on OSX
Diffstat (limited to 'default.bam')
-rw-r--r--default.bam24
1 files changed, 12 insertions, 12 deletions
diff --git a/default.bam b/default.bam
index debea93f..346a6102 100644
--- a/default.bam
+++ b/default.bam
@@ -352,6 +352,12 @@ function build(settings)
 				client_settings.linker.frameworks:add("AudioToolbox")
 				client_settings.linker.frameworks:add("AudioUnit")
 			end
+
+			if use_sdl then
+				client_settings.linker.frameworks:add("SDL")
+				client_settings.cc.includes:add("SDL.framework/Headers")
+				client_settings.linker.frameworkpath:add(".")
+			end
 		else
 			if config.alsa.value == 1 then
             	client_settings.linker.libs:add("asound")
@@ -393,7 +399,10 @@ function build(settings)
 	-- build tools (TODO: fix this so we don't get double _d_d stuff)
 	tools_src = Collect("src/tools/*.cpp", "src/tools/*.c")
 
-	osxlaunch_src = Collect("src/osxlaunch/*.m")
+	osxlaunch = {}
+	if platform == "macosx" and use_sdl then
+		osxlaunch = Compile(client_settings, Collect("src/osxlaunch/*.m"))
+	end
 	
 	objs = Compile(settings, tools_src)
 	tools = {}
@@ -405,7 +414,7 @@ function build(settings)
 	-- build client, server, version server and master server
 	client_exe = Link(client_settings, "teeworlds", game_shared, game_client,
 		engine, client, game_editor, glfw, portaudio, zlib, pnglite, wavpack,
-		client_link_other)
+		client_link_other, osxlaunch)
 
 	server_exe = Link(server_settings, "teeworlds_srv", engine, server,
 		game_shared, game_server, zlib)
@@ -416,10 +425,6 @@ function build(settings)
 	masterserver_exe = Link(server_settings, "mastersrv", masterserver,
 		engine, zlib)
 
-	if platform == "macosx" then
-		osxlaunch_exe = Link(client_settings, "osxlaunch", osxlaunch_src)
-	end
-
 	-- make targets
 	c = PseudoTarget("client".."_"..settings.config_name, client_exe)
 	s = PseudoTarget("server".."_"..settings.config_name, server_exe)
@@ -433,12 +438,7 @@ function build(settings)
 	Target(m)
 	Target(t)
 	
-	if platform == "macosx" then
-		o = PseudoTarget("osxlaunch".."_"..settings.config_name, osxlaunch_exe)
-		all = PseudoTarget(settings.config_name, c, s, v, m, t, o)
-	else
-		all = PseudoTarget(settings.config_name, c, s, v, m, t)
-	end
+	all = PseudoTarget(settings.config_name, c, s, v, m, t)
 
 	Target(all)
 	return all