source: trunk/build-mingw.sh @ 624

Last change on this file since 624 was 624, checked in by sam, 10 years ago

Add a build-mingw.sh script for Win32 builds.

File size: 1.9 KB
Line 
1#!/bin/sh
2
3set -e
4
5PATH="$PATH:./contrib/gtk-2.22.1/bin"
6M4PATH="./contrib/gtk-2.22.1/share/aclocal"
7export M4PATH # This looks necessary
8
9# SDL include path
10CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/sdl-1.2.14/include"
11CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/sdl-image-1.2.10/include"
12CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/sdl-mixer-1.2.11/include"
13
14# GTK include path
15CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/lib/glib-2.0/include"
16CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/lib/gtk-2.0/include"
17CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/glib-2.0"
18CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/gtk-2.0"
19CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/cairo"
20CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/pango-1.0"
21CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/gdk-pixbuf-2.0"
22CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/atk-1.0"
23CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtkglarea-2.0.1/include"
24
25# SDL library path
26LDFLAGS="$LDFLAGS -L`pwd`/contrib/sdl-1.2.14/lib"
27LDFLAGS="$LDFLAGS -L`pwd`/contrib/sdl-image-1.2.10/lib"
28LDFLAGS="$LDFLAGS -L`pwd`/contrib/sdl-mixer-1.2.11/lib"
29
30# GTK library path
31LDFLAGS="$LDFLAGS -L`pwd`/contrib/gtk-2.22.1/lib"
32LDFLAGS="$LDFLAGS -L`pwd`/contrib/gtk-2.22.1/bin"
33LDFLAGS="$LDFLAGS -L`pwd`/contrib/gtkglarea-2.0.1/lib"
34
35# Prevent issues with GTK+ internals
36CPPFLAGS="$CPPFLAGS -mms-bitfields"
37
38# We don't want our binaries to depend on MinGW
39LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++"
40
41# Help our build scripts a bit here
42GTK_LIBS="$GTK_LIBS -lgtkgl-2.0 -lopengl32 -lgdi32"
43GTK_LIBS="$GTK_LIBS -lgtk-win32-2.0 -lgdk-win32-2.0"
44GTK_LIBS="$GTK_LIBS -lglib-2.0 -lgthread-2.0 -lgobject-2.0"
45
46LOL_LIBS="$LOL_LIBS -lSDL_image -lSDL_mixer -lSDLmain -lSDL -lopengl32"
47
48# Bootstrap, configure and make
49./bootstrap
50./configure CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" \
51            GTK_LIBS="$GTK_LIBS" LOL_LIBS="$LOL_LIBS"
52make
53
Note: See TracBrowser for help on using the repository browser.