]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - all
compile against shipped SDL
[xonotic/xonotic.git] / all
diff --git a/all b/all
index 1c4838550a006c6fcc57d7be3071b08cd5ea946a..1f939e9e66fbee40e9d1716f9915fff87aa38d8e 100755 (executable)
--- a/all
+++ b/all
@@ -25,7 +25,6 @@ case "$0" in
                case "`uname`" in
                        MINGW*|Win*)
                                # Windows hates users. So this script has to copy itself elsewhere first...
-                               tname=
                                cp "$SELF" ../all.xonotic.sh
                                export WE_HATE_OUR_USERS=1
                                exec ../all.xonotic.sh "$@"
@@ -425,9 +424,13 @@ case "$cmd" in
                        if [ -z "$CC" ]; then
                                export CC=gcc
                        fi
-               elif [ x"`uname`" = x"Darwin" ] && { [ -d /Library/Frameworks/SDL.framework ] || [ -d "$HOME/Library/Frameworks/SDL.framework" ]; }; then
-                       # AGL is broken in Snow Leopard, so let's default to SDL if it is available.
+               elif [ x"`uname`" = x"Darwin" ] && [ x"`uname -r`" = x"10.3.0" ]; then
                        TARGETS="sv-debug sdl-debug"
+                       # AGL is broken in Snow Leopard, so default to SDL.
+                       if  [ x"`uname -r`" != x"10.3.0" ]; then
+                               TARGETS="$TARGETS cl-debug"
+                       fi
+                       export CC="gcc -I$PWD/misc/buildfiles/osx/Xonotic-SDL.app/Contents/Frameworks/SDL.framework/Headers -F$PWD/misc/buildfiles/osx/Xonotic-SDL.app/Contents/Frameworks"
                else
                        TARGETS="sv-debug cl-debug sdl-debug"
                fi
@@ -512,6 +515,7 @@ case "$cmd" in
                        export PATH="$d0/misc/buildfiles/w32:$PATH"
                elif [ x"`uname`" = x"Darwin" ]; then
                        export DYLD_LIBRARY_PATH="$d0/misc/buildfiles/osx/Xonotic-SDL.app/Contents/MacOS"
+                       export DYLD_FRAMEWORK_PATH="$d0/misc/buildfiles/osx/Xonotic-SDL.app/Contents/Frameworks"
                        client=-sdl
                else
                        client=-sdl