| 1 | {{{ |
| 2 | #!xml |
| 3 | <build xmlns:sh="http://bitten.edgewall.org/tools/sh" |
| 4 | xmlns:svn="http://bitten.edgewall.org/tools/svn" |
| 5 | xmlns:c="http://bitten.edgewall.org/tools/c"> |
| 6 | <step id="checkout" description="Checkout source from repository"> |
| 7 | <svn:checkout url="svn://svn.zoy.org/lolengine/" |
| 8 | path="${path}" revision="${revision}" /> |
| 9 | </step> |
| 10 | <step id="bootstrap" description="Bootstrap build system"> |
| 11 | <sh:exec file="sh" args="-c ' |
| 12 | case ${platform} in |
| 13 | android-arm|ios-arm) |
| 14 | : ; |
| 15 | ;; |
| 16 | windows-i386) |
| 17 | PATH="$''PATH:./contrib/gtk-2.22.1/bin" M4PATH="./contrib/gtk-2.22.1/share/aclocal" ./bootstrap; |
| 18 | ;; |
| 19 | *) |
| 20 | ./bootstrap |
| 21 | ;; |
| 22 | esac |
| 23 | '"/> |
| 24 | </step> |
| 25 | <step id="configure" description="Configure tree"> |
| 26 | <sh:exec file="sh" args="-c ' |
| 27 | case ${platform} in |
| 28 | android-arm) |
| 29 | cd monsterz/android && android update project --path . || exit 1; |
| 30 | ;; |
| 31 | ios-arm) |
| 32 | : ; |
| 33 | ;; |
| 34 | windows-i386) |
| 35 | CPPFLAGS="$''CPPFLAGS -I$''PWD/contrib/sdl-1.2.14/include"; |
| 36 | CPPFLAGS="$''CPPFLAGS -I$''PWD/contrib/sdl-image-1.2.10/include"; |
| 37 | CPPFLAGS="$''CPPFLAGS -I$''PWD/contrib/sdl-mixer-1.2.11/include"; |
| 38 | CPPFLAGS="$''CPPFLAGS -I$''PWD/contrib/glew-1.6.0/include -DGLEW_STATIC"; |
| 39 | CPPFLAGS="$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/lib/glib-2.0/include"; |
| 40 | CPPFLAGS="$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/lib/gtk-2.0/include"; |
| 41 | CPPFLAGS="$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/include/glib-2.0"; |
| 42 | CPPFLAGS="$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/include/gtk-2.0"; |
| 43 | CPPFLAGS="$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/include/cairo"; |
| 44 | CPPFLAGS="$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/include/pango-1.0"; |
| 45 | CPPFLAGS="$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/include/gdk-pixbuf-2.0"; |
| 46 | CPPFLAGS="$''CPPFLAGS -I$''PWD/contrib/gtk-2.22.1/include/atk-1.0"; |
| 47 | CPPFLAGS="$''CPPFLAGS -I$''PWD/contrib/gtkglarea-2.0.1/include"; |
| 48 | LDFLAGS="$''LDFLAGS -L$''PWD/contrib/sdl-1.2.14/lib"; |
| 49 | LDFLAGS="$''LDFLAGS -L$''PWD/contrib/sdl-image-1.2.10/lib"; |
| 50 | LDFLAGS="$''LDFLAGS -L$''PWD/contrib/sdl-mixer-1.2.11/lib"; |
| 51 | LDFLAGS="$''LDFLAGS -L$''PWD/contrib/glew-1.6.0/lib"; |
| 52 | LDFLAGS="$''LDFLAGS -L$''PWD/contrib/gtk-2.22.1/lib"; |
| 53 | LDFLAGS="$''LDFLAGS -L$''PWD/contrib/gtk-2.22.1/bin"; |
| 54 | LDFLAGS="$''LDFLAGS -L$''PWD/contrib/gtkglarea-2.0.1/lib"; |
| 55 | CPPFLAGS="$''CPPFLAGS -mms-bitfields"; |
| 56 | LDFLAGS="$''LDFLAGS -static-libgcc -static-libstdc++"; |
| 57 | GTK_LIBS="$''GTK_LIBS -lgtkgl-2.0 -lopengl32 -lglew32 -lgdi32"; |
| 58 | GTK_LIBS="$''GTK_LIBS -lgtk-win32-2.0 -lgdk-win32-2.0"; |
| 59 | GTK_LIBS="$''GTK_LIBS -lglib-2.0 -lgthread-2.0 -lgobject-2.0"; |
| 60 | LOL_LIBS="$''LOL_LIBS -lSDL_image -lSDL_mixer -lSDLmain -lSDL -lopengl32 -lglew32"; |
| 61 | if test "x$''{MSYSTEM}" != xMINGW32; then |
| 62 | HOSTFLAGS=--host=i586-mingw32msvc; |
| 63 | BUILDFLAGS=--build=none; |
| 64 | fi; |
| 65 | PKG_CONFIG_PATH="$''PKG_CONFIG_PATH:$''PWD/contrib/gtkglarea-2.0.1/lib/pkgconfig" ./configure $''HOSTFLAGS $''BUILDFLAGS CPPFLAGS="$''CPPFLAGS" LDFLAGS="$''LDFLAGS" GTK_LIBS="$''GTK_LIBS" LOL_LIBS="$''LOL_LIBS"; |
| 66 | ;; |
| 67 | ps3-ppu) |
| 68 | if test -f build-ps3; then ./configure CXX=ppu-lv2-g++ CC=ppu-lv2-gcc ac_cv_exeext=.elf --host=none; fi; |
| 69 | ;; |
| 70 | *) |
| 71 | ./configure; |
| 72 | ;; |
| 73 | esac |
| 74 | '"/> |
| 75 | </step> |
| 76 | <step id="build" description="Build tree"> |
| 77 | <sh:exec file="sh" args="-c ' |
| 78 | case ${platform} in |
| 79 | android-arm) |
| 80 | cd monsterz/android || exit 1; |
| 81 | ndk-build || exit 1; |
| 82 | ant compile || exit 1; |
| 83 | ;; |
| 84 | ios-arm) |
| 85 | cd monsterz/ios && xcodebuild -configuration Release -sdk iphonesimulator4.3; |
| 86 | ;; |
| 87 | ps3-ppu) |
| 88 | if test -f build-ps3; then make || exit 1; else cd monsterz/ps3 && make || exit 1; fi ; |
| 89 | ;; |
| 90 | *) |
| 91 | make; |
| 92 | ;; |
| 93 | esac |
| 94 | '"/> |
| 95 | </step> |
| 96 | <step id="test" description="Run tests"> |
| 97 | <sh:exec file="sh" args="-c ' |
| 98 | case ${platform} in |
| 99 | android-arm|ios-arm|ps3-ppu) : ; ;; |
| 100 | *) make check; ;; |
| 101 | esac |
| 102 | '"/> |
| 103 | </step> |
| 104 | <step id="clean" description="Clean tree"> |
| 105 | <sh:exec file="sh" args="-c ' |
| 106 | case ${platform} in |
| 107 | android-arm) |
| 108 | : ; |
| 109 | ;; |
| 110 | ios-arm) |
| 111 | cd monsterz/ios && xcodebuild -configuration Release -sdk iphonesimulator4.3 clean; |
| 112 | ;; |
| 113 | ps3-ppu) |
| 114 | if test -f build-ps3; then make distclean || exit 1; fi ; |
| 115 | ;; |
| 116 | *) |
| 117 | make distclean; |
| 118 | ;; |
| 119 | esac |
| 120 | '"/> |
| 121 | </step> |
| 122 | </build> |
| 123 | }}} |