source: trunk/build-mingw @ 807

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

build: fix the editor building on mingw32.

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