瀏覽代碼

build: move SDL_image and SDL_mixer binaries to an i686-only directory.

legacy
Sam Hocevar sam 13 年之前
父節點
當前提交
7a3709ab53
共有 3 個檔案被更改,包括 76 行新增42 行删除
  1. +1
    -0
      build-ps3
  2. +26
    -19
      build/lol-build
  3. +49
    -23
      configure.ac

+ 1
- 0
build-ps3 查看文件

@@ -3,6 +3,7 @@
# This can't hurt
make distclean

set -e
./build/lol-build bootstrap ps3-ppu
./build/lol-build configure ps3-ppu
./build/lol-build build ps3-ppu


+ 26
- 19
build/lol-build 查看文件

@@ -27,9 +27,19 @@ set -e
action="$1"
platform="$2"

top_srcdir=$(dirname "$0")/..
cd $top_srcdir
top_srcdir="`pwd`"
__init__()
{
top_srcdir=$(dirname "$0")/..
cd $top_srcdir
top_srcdir="`pwd`"

case "${MSYSTEM}" in
MINGW32|MINGW64)
PATH="$PATH:./contrib/gtk-2.22.1/bin"
M4PATH="$M4PATH:./contrib/gtk-2.22.1/share/aclocal"
;;
esac
}

bootstrap()
{
@@ -41,13 +51,8 @@ bootstrap()
android-arm)
# No bootstrapping needed
;;
windows-i386|windows-amd64)
PATH="$PATH:./contrib/gtk-2.22.1/bin"
M4PATH="$M4PATH:./contrib/gtk-2.22.1/share/aclocal"
PATH="$PATH" M4PATH="$M4PATH" ./bootstrap
;;
*)
./bootstrap
PATH="$PATH" M4PATH="$M4PATH" ./bootstrap
;;
esac
}
@@ -69,8 +74,14 @@ configure()
echo "Error: could not find win32 compiler" >&2
false
fi
PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/contrib/gtkglarea-2.0.1/lib/pkgconfig"
LDFLAGS="$LDFLAGS -L$PWD/contrib/glew-1.7.0/lib/i686-w64-mingw32"
LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-1.2.14/lib/i686-w64-mingw32"
LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-image-1.2.10/lib/i686-w64-mingw32"
LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-mixer-1.2.11/lib/i686-w64-mingw32"
LDFLAGS="$LDFLAGS -L$PWD/contrib/gtk-2.22.1/lib"
LDFLAGS="$LDFLAGS -L$PWD/contrib/gtk-2.22.1/bin"
LDFLAGS="$LDFLAGS -L$PWD/contrib/gtkglarea-2.0.1/lib"
;;
windows-amd64)
if test "x${MSYSTEM}" = xMINGW64; then
@@ -84,6 +95,8 @@ configure()
fi
LDFLAGS="$LDFLAGS -L$PWD/contrib/glew-1.7.0/lib/x86_64-w64-mingw32"
LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-1.2.14/lib/x86_64-w64-mingw32"
LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-image-1.2.10/lib/x86_64-w64-mingw32"
LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-mixer-1.2.11/lib/x86_64-w64-mingw32"
;;
esac
case "$platform" in
@@ -95,10 +108,9 @@ configure()
android update project --path .
;;
ps3-ppu)
./configure CXX=ppu-lv2-g++ CC=ppu-lv2-gcc ac_cv_exeext=.elf --host=none
PATH="$PATH" ./configure CXX=ppu-lv2-g++ CC=ppu-lv2-gcc ac_cv_exeext=.elf --host=none
;;
windows-i386|windows-amd64)
PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/contrib/gtkglarea-2.0.1/lib/pkgconfig"
CPPFLAGS="$CPPFLAGS -I$PWD/contrib/sdl-1.2.14/include"
CPPFLAGS="$CPPFLAGS -I$PWD/contrib/sdl-image-1.2.10/include"
CPPFLAGS="$CPPFLAGS -I$PWD/contrib/sdl-mixer-1.2.11/include"
@@ -112,21 +124,15 @@ configure()
CPPFLAGS="$CPPFLAGS -I$PWD/contrib/gtk-2.22.1/include/gdk-pixbuf-2.0"
CPPFLAGS="$CPPFLAGS -I$PWD/contrib/gtk-2.22.1/include/atk-1.0"
CPPFLAGS="$CPPFLAGS -I$PWD/contrib/gtkglarea-2.0.1/include"
LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-image-1.2.10/lib"
LDFLAGS="$LDFLAGS -L$PWD/contrib/sdl-mixer-1.2.11/lib"
LDFLAGS="$LDFLAGS -L$PWD/contrib/gtk-2.22.1/lib"
LDFLAGS="$LDFLAGS -L$PWD/contrib/gtk-2.22.1/bin"
LDFLAGS="$LDFLAGS -L$PWD/contrib/gtkglarea-2.0.1/lib"
CPPFLAGS="$CPPFLAGS -mms-bitfields"
LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++"
GTK_LIBS="$GTK_LIBS -lgtkgl-2.0 -lopengl32 -lglew32 -lgdi32"
GTK_LIBS="$GTK_LIBS -lgtk-win32-2.0 -lgdk-win32-2.0"
GTK_LIBS="$GTK_LIBS -lglib-2.0 -lgthread-2.0 -lgobject-2.0"
LOL_LIBS="$LOL_LIBS -lSDL_image -lSDL_mixer -lSDLmain -lSDL -lopengl32 -lglew32"
PKG_CONFIG_PATH="$PKG_CONFIG_PATH" ./configure $HOSTFLAGS $BUILDFLAGS CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" GTK_LIBS="$GTK_LIBS" LOL_LIBS="$LOL_LIBS"
PATH="$PATH" PKG_CONFIG_PATH="$PKG_CONFIG_PATH" ./configure $HOSTFLAGS $BUILDFLAGS CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" GTK_LIBS="$GTK_LIBS"
;;
*)
./configure
PATH="$PATH" ./configure
;;
esac
}
@@ -185,6 +191,7 @@ clean()
esac
}

__init__
echo "lol-build: executing action '$action' on platform '$platform'" >&2
eval "$action"


+ 49
- 23
configure.ac 查看文件

@@ -173,33 +173,59 @@ LIBS="${save_LIBS}"

dnl Use SDL? (always required on Linux or Win32)
ac_cv_my_have_sdl="no"
if test "x$cross_compiling" != xyes; then
ac_cv_my_have_sdl="yes"
ac_cv_my_have_sdl_image="no"
ac_cv_my_have_sdl_mixer="no"
dnl
dnl First, try the proper pkg-config check
PKG_CHECK_MODULES(SDL, sdl, [ac_cv_my_have_sdl="yes"], [:])
PKG_CHECK_MODULES(SDLMIXER, SDL_mixer, [ac_cv_my_have_sdl_mixer="yes"], [:])
PKG_CHECK_MODULES(SDLIMAGE, SDL_image, [ac_cv_my_have_sdl_image="yes"], [:])
dnl
dnl Then the old sdl-config method
if test "x${cross_compiling}" != xyes -a "${ac_cv_my_have_sdl}" != yes; then
AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
if test "${SDL_CONFIG}" != "no" -a "x$cross_compiling" != xyes; then
SDL_CFLAGS="${SDL_CFLAGS} `sdl-config --cflags`"
SDL_LIBS="${SDL_LIBS} `sdl-config --libs`"
fi
PKG_CHECK_MODULES(SDL, sdl, [:],
[SDL_LIBS="${SDL_LIBS} -lSDL"])
PKG_CHECK_MODULES(SDLMIXER, SDL_mixer, [:],
[SDLMIXER_LIBS="${SDLMIXER_LIBS} -lSDL_mixer"])
PKG_CHECK_MODULES(SDLIMAGE, SDL_image, [:],
[SDLIMAGE_LIBS="${SDLIMAGE_LIBS} -lSDL_image"])
SDL_CFLAGS="${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}"
SDL_LIBS="${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}"
save_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS}"
AC_CHECK_HEADERS(SDL_mixer.h, [:], [ac_cv_my_have_sdl="no"])
AC_CHECK_HEADERS(SDL_image.h, [:], [ac_cv_my_have_sdl="no"])
CPPFLAGS="${save_CPPFLAGS}"
if test "${ac_cv_my_have_sdl}" = "no"; then
AC_MSG_WARN([[One of SDL, SDL_Image or SDL_Mixer not found]])
else
AC_DEFINE(USE_SDL, 1, Define to 1 to use SDL)
if test "${SDL_CONFIG}" != "no"; then
SDL_CFLAGS="${SDL_CFLAGS} `${SDL_CONFIG} --cflags`"
SDL_LIBS="${SDL_LIBS} `${SDL_CONFIG} --libs`"
ac_cv_my_have_sdl="yes"
fi
fi
dnl
dnl Maybe all this has failed, try direct inclusion
save_CPPFLAGS="${CPPFLAGS}"
save_LIBS="${LIBS}"
CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}"
LIBS="${LIBS} ${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}"
AC_CHECK_HEADERS(SDL.h SDL/SDL.h, [ac_cv_my_have_sdl="yes"])
AC_CHECK_HEADERS(SDL_mixer.h, [ac_cv_my_have_sdl_mixer="yes"])
AC_CHECK_HEADERS(SDL_image.h, [ac_cv_my_have_sdl_image="yes"])
AC_CHECK_LIB(SDL, main,
[SDL_LIBS="${SDL_LIBS} -lSDL"],
[ac_cv_my_have_sdl="no"])
AC_CHECK_LIB(SDL_mixer, main,
[SDLMIXER_LIBS="${SDLMIXER_LIBS} -lSDL_mixer"],
[ac_cv_my_have_sdl_mixer="no"])
AC_CHECK_LIB(SDL_image, main,
[SDLIMAGE_LIBS="${SDLIMAGE_LIBS} -lSDL_image"],
[ac_cv_my_have_sdl_image="no"])
SDL_CFLAGS="${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}"
SDL_LIBS="${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}"
CPPFLAGS="${save_CPPFLAGS}"
LIBS="${save_LIBS}"
if test "${ac_cv_my_have_sdl}" = "no"; then
AC_MSG_WARN([SDL not found])
else
AC_DEFINE(USE_SDL, 1, Define to 1 to use SDL)
fi
if test "${ac_cv_my_have_sdl_mixer}" = "no"; then
AC_MSG_WARN([SDL_mixer not found])
fi
if test "${ac_cv_my_have_sdl_image}" = "no"; then
AC_MSG_WARN([SDL_image not found])
fi
AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")
AM_CONDITIONAL(USE_SDL_MIXER, test "${ac_cv_my_have_sdl_mixer}" = "yes")
AM_CONDITIONAL(USE_SDL_IMAGE, test "${ac_cv_my_have_sdl_image}" = "yes")


dnl Use EGL?


Loading…
取消
儲存