Cocoa hooks for MacOS X.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1433 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -105,9 +105,9 @@ build_rec_dependancies() {
|
||||
mv -f -- "$DEPEND_FILE".tmp "$DEPEND_FILE"
|
||||
}
|
||||
|
||||
# Output the .o file for a .c file.
|
||||
# Output the .o file for a given .c or .m (Objective-C) file
|
||||
build_collect_o_files() {
|
||||
eval echo "\$BUILD_WORK_ESC/\${${BUILD_PROJECT}_OBJS}\${1%.c}.o"
|
||||
eval echo "\$BUILD_WORK_ESC/\${${BUILD_PROJECT}_OBJS}\${1%.[cm]}.o"
|
||||
}
|
||||
|
||||
# Output the extra .o file with the complete path
|
||||
|
||||
@@ -99,18 +99,27 @@ LIB_SDL_NAME="Simple DirectMedia Layer"
|
||||
|
||||
case "$OSNAME" in
|
||||
FreeBSD) LIB_SDL_CFLAGS='$(sdl11-config --cflags)' ;;
|
||||
Darwin) LIB_SDL_CFLAGS='-I/System/Library/Frameworks/SDL.framework/Headers
|
||||
-I/Library/Frameworks/SDL.framework/Headers
|
||||
-I$HOME/Library/Frameworks/SDL.framework/Headers'
|
||||
;;
|
||||
*) LIB_SDL_CFLAGS='$(sdl-config --cflags)' ;;
|
||||
esac
|
||||
case "$OSNAME" in
|
||||
FreeBSD) LIB_SDL_LDFLAGS='$(sdl11-config --libs)' ;;
|
||||
Darwin) LIB_SDL_LDFLAGS='-framework SDL -framework Cocoa -lobjc' ;;
|
||||
*) LIB_SDL_LDFLAGS='$(sdl-config --libs)' ;;
|
||||
esac
|
||||
case "$OSNAME" in
|
||||
FreeBSD) LIB_SDL_VERSION='$(sdl11-config --version)' ;;
|
||||
Darwin) LIB_SDL_VERSION=$(echo \
|
||||
"SDL_MAJOR_VERSION.SDL_MINOR_VERSION.SDL_PATCHLEVEL" | \
|
||||
gcc -E -include SDL_version.h $LIB_SDL_CFLAGS - | \
|
||||
tail -1 | tr -d ' ') ;;
|
||||
*) LIB_SDL_VERSION='$(sdl-config --version)' ;;
|
||||
esac
|
||||
case "$OSNAME" in
|
||||
Darwin)
|
||||
Disabled)
|
||||
LIB_SDL_DETECT="Darwin_SDL_detect SDL"
|
||||
Darwin_SDL_detect() {
|
||||
local LIB TEMP_LDFLAGS TEMP_CFLAGS
|
||||
@@ -135,15 +144,24 @@ LIB_SDL_mixer_CFLAGS="$LIB_SDL_CFLAGS"
|
||||
LIB_SDL_mixer_LDFLAGS="$LIB_SDL_LDFLAGS -lSDL_mixer"
|
||||
LIB_SDL_mixer_VERSION=""
|
||||
case "$OSNAME" in
|
||||
Darwin) LIB_SDL_mixer_DETECT="Darwin_SDL_detect SDL_mixer" ;;
|
||||
Disabled) LIB_SDL_mixer_DETECT="Darwin_SDL_detect SDL_mixer" ;;
|
||||
esac
|
||||
|
||||
LIB_SDL_image_NAME="SDL_image"
|
||||
LIB_SDL_image_CFLAGS="$LIB_SDL_CFLAGS"
|
||||
LIB_SDL_image_LDFLAGS="$LIB_SDL_LDFLAGS -lSDL_image"
|
||||
case "$OSNAME" in
|
||||
Darwin) LIB_SDL_image_CFLAGS="-I/System/Library/Frameworks/SDL_image.framework/Headers
|
||||
-I/Library/Frameworks/SDL_image.framework/Headers
|
||||
-I$HOME/Library/Frameworks/SDL_image.framework/Headers"
|
||||
;;
|
||||
*) LIB_SDL_image_CFLAGS="$LIB_SDL_CFLAGS" ;;
|
||||
esac
|
||||
case "$OSNAME" in
|
||||
Darwin) LIB_SDL_image_LDFLAGS="-framework SDL_image" ;;
|
||||
*) LIB_SDL_image_LDFLAGS="$LIB_SDL_LDFLAGS -lSDL_image" ;;
|
||||
esac
|
||||
LIB_SDL_image_VERSION=""
|
||||
case "$OSNAME" in
|
||||
Darwin) LIB_SDL_image_DETECT="Darwin_SDL_detect SDL_image" ;;
|
||||
Disabled) LIB_SDL_image_DETECT="Darwin_SDL_detect SDL_image" ;;
|
||||
esac
|
||||
|
||||
LIB_openal_NAME="OpenAL"
|
||||
|
||||
Reference in New Issue
Block a user