Ignore:
Timestamp:
Sep 10, 2011, 9:33:10 PM (9 years ago)
Author:
sam
Message:

build: new lol-build script for easier autobuilds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/build-mingw64

    r944 r945  
    11#!/bin/sh
    2 
    3 ##  Native MinGW compilation for Lol Engine -- Sam Hocevar <sam@hocevar.net>
    42
    53# This can't hurt
    64make distclean
    75
    8 set -e
     6./build/lol-build bootstrap windows-amd64
     7./build/lol-build configure windows-amd64
     8./build/lol-build build windows-amd64
    99
    10 PATH="$PATH:./contrib/gtk-2.22.1/bin"
    11 
    12 M4PATH="$M4PATH:./contrib/gtk-2.22.1/share/aclocal"
    13 export M4PATH # This looks necessary
    14 
    15 PKG_CONFIG_PATH="$PKG_CONFIG_PATH:`pwd`/contrib/gtkglarea-2.0.1/lib/pkgconfig"
    16 export PKG_CONFIG_PATH # This looks necessary, too
    17 
    18 # SDL include path
    19 CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/sdl-1.2.14/include"
    20 CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/sdl-image-1.2.10/include"
    21 CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/sdl-mixer-1.2.11/include"
    22 
    23 # Glew include path
    24 CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/glew-1.7.0/include -DGLEW_STATIC"
    25 
    26 # GTK include path
    27 CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/lib/glib-2.0/include"
    28 CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/lib/gtk-2.0/include"
    29 CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/glib-2.0"
    30 CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/gtk-2.0"
    31 CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/cairo"
    32 CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/pango-1.0"
    33 CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/gdk-pixbuf-2.0"
    34 CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/atk-1.0"
    35 CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtkglarea-2.0.1/include"
    36 
    37 # SDL library path
    38 LDFLAGS="$LDFLAGS -L`pwd`/contrib/sdl-1.2.14/lib"
    39 LDFLAGS="$LDFLAGS -L`pwd`/contrib/sdl-image-1.2.10/lib"
    40 LDFLAGS="$LDFLAGS -L`pwd`/contrib/sdl-mixer-1.2.11/lib"
    41 
    42 # Glew library path
    43 LDFLAGS="$LDFLAGS -L`pwd`/contrib/glew-1.7.0/lib/x86_64-w64-mingw32"
    44 
    45 # GTK library path
    46 LDFLAGS="$LDFLAGS -L`pwd`/contrib/gtk-2.22.1/lib"
    47 LDFLAGS="$LDFLAGS -L`pwd`/contrib/gtk-2.22.1/bin"
    48 LDFLAGS="$LDFLAGS -L`pwd`/contrib/gtkglarea-2.0.1/lib"
    49 
    50 # Prevent issues with GTK+ internals
    51 CPPFLAGS="$CPPFLAGS -mms-bitfields"
    52 
    53 # We don't want our binaries to depend on MinGW
    54 LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++"
    55 
    56 # Help our build scripts a bit here
    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 
    61 LOL_LIBS="$LOL_LIBS -lSDL_image -lSDL_mixer -lSDLmain -lSDL -lopengl32 -lglew32"
    62 
    63 # Bootstrap, configure and make
    64 ./bootstrap
    65 # Only on Windows
    66 if test "x${MSYSTEM}" != xMINGW32; then
    67   HOSTFLAGS=--host=x86_64-w64-mingw32
    68   BUILDFLAGS=--build=none
    69 fi
    70 
    71 ./configure $HOSTFLAGS $BUILDFLAGS \
    72             CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" \
    73             GTK_LIBS="$GTK_LIBS" LOL_LIBS="$LOL_LIBS"
    74 make -j6
    75 
Note: See TracChangeset for help on using the changeset viewer.