- 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.
- TARGETS="sv-debug sdl-debug"
+ elif [ x"`uname`" = x"Darwin" ]; then
+ case "`uname -r`" in
+ ?.*)
+ TARGETS="sv-debug cl-debug sdl-debug"
+ ;;
+ *)
+ # AGL cannot be compiled on systems with a kernel > 10.x (Snow Leopard)
+ TARGETS="sv-debug sdl-debug"
+ ;;
+ esac
+ 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"