Browse Source

build: update Bitten configuration for Windows cross-compilation.

legacy
Sam Hocevar sam 13 years ago
parent
commit
8493bedaaa
2 changed files with 76 additions and 13 deletions
  1. +8
    -1
      build-mingw
  2. +68
    -12
      build/bitten.xml

+ 8
- 1
build-mingw View File

@@ -57,7 +57,14 @@ LOL_LIBS="$LOL_LIBS -lSDL_image -lSDL_mixer -lSDLmain -lSDL -lopengl32 -lglew32"

# Bootstrap, configure and make
./bootstrap
./configure CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" \
# Only on Windows
if test "x${MSYSTEM}" != xMINGW32; then
HOSTFLAGS=--host=i586-mingw32msvc
BUILDFLAGS=--build=none
fi

./configure $HOSTFLAGS $BUILDFLAGS \
CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" \
GTK_LIBS="$GTK_LIBS" LOL_LIBS="$LOL_LIBS"
make


+ 68
- 12
build/bitten.xml View File

@@ -8,33 +8,82 @@
<step id="bootstrap" description="Bootstrap build system">
<sh:exec file="sh" args="-c '
case ${platform} in
android-arm|ios-arm|ps3-ppu) : ; ;;
*) ./bootstrap ;;
android-arm|ios-arm)
: ;
;;
windows-i386)
PATH=&quot;$''PATH:./contrib/gtk-2.22.1/bin&quot; M4PATH=&quot;./contrib/gtk-2.22.1/share/aclocal&quot; ./bootstrap;
;;
*)
./bootstrap
;;
esac
'"/>
</step>
<step id="configure" description="Configure tree">
<sh:exec file="sh" args="-c '
case ${platform} in
android-arm|ios-arm|ps3-ppu) : ; ;;
*) ./configure ;;
android-arm)
cd monsterz/android &amp;&amp; android update project --path . || exit 1;
;;
ios-arm)
: ;
;;
windows-i386)
CPPFLAGS=&quot;$''CPPFLAGS -I$''PWD/contrib/sdl-1.2.14/include&quot;;
CPPFLAGS=&quot;$''CPPFLAGS -I$''PWD/contrib/sdl-image-1.2.10/include&quot;;
CPPFLAGS=&quot;$''CPPFLAGS -I$''PWD/contrib/sdl-mixer-1.2.11/include&quot;;
CPPFLAGS=&quot;$''CPPFLAGS -I$''PWD/contrib/glew-1.6.0/include -DGLEW_STATIC&quot;;
CPPFLAGS=&quot;$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/lib/glib-2.0/include&quot;;
CPPFLAGS=&quot;$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/lib/gtk-2.0/include&quot;;
CPPFLAGS=&quot;$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/include/glib-2.0&quot;;
CPPFLAGS=&quot;$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/include/gtk-2.0&quot;;
CPPFLAGS=&quot;$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/include/cairo&quot;;
CPPFLAGS=&quot;$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/include/pango-1.0&quot;;
CPPFLAGS=&quot;$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/include/gdk-pixbuf-2.0&quot;;
CPPFLAGS=&quot;$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/include/atk-1.0&quot;;
CPPFLAGS=&quot;$''CPPFLAGS -I$''PWD/contrib/gtkglarea-2.0.1/include&quot;;
LDFLAGS=&quot;$''LDFLAGS -L$''PWD/contrib/sdl-1.2.14/lib&quot;;
LDFLAGS=&quot;$''LDFLAGS -L$''PWD/contrib/sdl-image-1.2.10/lib&quot;;
LDFLAGS=&quot;$''LDFLAGS -L$''PWD/contrib/sdl-mixer-1.2.11/lib&quot;;
LDFLAGS=&quot;$''LDFLAGS -L$''PWD/contrib/glew-1.6.0/lib&quot;;
LDFLAGS=&quot;$''LDFLAGS -L$''PWD/contrib/gtk-2.22.1/lib&quot;;
LDFLAGS=&quot;$''LDFLAGS -L$''PWD/contrib/gtk-2.22.1/bin&quot;;
LDFLAGS=&quot;$''LDFLAGS -L$''PWD/contrib/gtkglarea-2.0.1/lib&quot;;
CPPFLAGS=&quot;$''CPPFLAGS -mms-bitfields&quot;;
LDFLAGS=&quot;$''LDFLAGS -static-libgcc -static-libstdc++&quot;;
GTK_LIBS=&quot;$''GTK_LIBS -lgtkgl-2.0 -lopengl32 -lglew32 -lgdi32&quot;;
GTK_LIBS=&quot;$''GTK_LIBS -lgtk-win32-2.0 -lgdk-win32-2.0&quot;;
GTK_LIBS=&quot;$''GTK_LIBS -lglib-2.0 -lgthread-2.0 -lgobject-2.0&quot;;
LOL_LIBS=&quot;$''LOL_LIBS -lSDL_image -lSDL_mixer -lSDLmain -lSDL -lopengl32 -lglew32&quot;;
if test &quot;x$''{MSYSTEM}&quot; != xMINGW32; then
HOSTFLAGS=--host=i586-mingw32msvc;
BUILDFLAGS=--build=none;
fi;
PKG_CONFIG_PATH=&quot;$''PKG_CONFIG_PATH:$''PWD/contrib/gtkglarea-2.0.1/lib/pkgconfig&quot; ./configure $''HOSTFLAGS $''BUILDFLAGS CPPFLAGS=&quot;$''CPPFLAGS&quot; LDFLAGS=&quot;$''LDFLAGS&quot; GTK_LIBS=&quot;$''GTK_LIBS&quot; LOL_LIBS=&quot;$''LOL_LIBS&quot;;
;;
ps3-ppu)
if test -f build-ps3; then ./configure CXX=ppu-lv2-g++ CC=ppu-lv2-gcc ac_cv_exeext=.elf --host=none; fi;
;;
*)
./configure;
;;
esac
'"/>
<sh:exec file="./configure" args=""/>
</step>
<step id="build" description="Build tree">
<sh:exec file="sh" args="-c '
case ${platform} in
android-arm)
cd monsterz/android;
ndk-build;
ant compile;
cd monsterz/android || exit 1;
ndk-build || exit 1;
ant compile || exit 1;
;;
ios-arm)
:;
: ;
;;
ps3-ppu)
./build-ps3;
if test -f build-ps3; then make || exit 1; else cd monsterz/ps3 &amp;&amp; make || exit 1; fi ;
;;
*)
make;
@@ -53,8 +102,15 @@
<step id="clean" description="Clean tree">
<sh:exec file="sh" args="-c '
case ${platform} in
android-arm|ios-arm) : ; ;;
*) make distclean; ;;
android-arm|ios-arm)
: ;
;;
ps3-ppu)
if test -f build-ps3; then make distclean || exit 1; fi ;
;;
*)
make distclean;
;;
esac
'"/>
</step>


Loading…
Cancel
Save