source: trunk/build/bitten.xml @ 900

Last change on this file since 900 was 876, checked in by sam, 9 years ago

contrib: add a precompiled Win32 version of CppUnit and update build system
accordingly.

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