summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct22
1 files changed, 16 insertions, 6 deletions
diff --git a/SConstruct b/SConstruct
index 962ac29..f140665 100644
--- a/SConstruct
+++ b/SConstruct
@@ -6,14 +6,24 @@ env = Environment(
AddOption('--release', action = 'store_true')
AddOption('--profiling', action = 'store_true')
+AddOption('--mingw32', action = 'store_true')
env.Append(CPPPATH = ['.'])
-env.Append(LIBS = ['GL', 'GLU', 'noise', 'boost_filesystem', 'tolua++', 'lua'])
-env.ParseConfig('sdl-config --cflags --libs')
-env.ParseConfig('pkg-config --cflags --libs SDL_image')
-env.ParseConfig('pkg-config --cflags --libs ftgl')
-env.ParseConfig('pkg-config --cflags --libs CEGUI')
-env.ParseConfig('pkg-config --cflags --libs CEGUI-OPENGL')
+
+# cross-compiling
+if GetOption('mingw32'):
+ env.Append(CPPPATH = ['/usr/i486-mingw32/include/' + x for x in ('SDL', 'CEGUI', 'freetype2')])
+ env.Append(LIBS = ['CEGUIOpenGLRenderer', 'CEGUIBase', 'CEGUITGAImageCodec', 'CEGUITinyXMLParser', 'CEGUIFalagardWRBase', 'CEGUISILLYImageCodec',
+ 'SDL_image', 'ftgl', 'freetype-s', 'z', 'pcre', 'opengl32', 'glu32', 'winmm', 'mingw32', 'SDLmain', 'SDL', 'jpeg', 'noise',
+ 'lua', 'tolua++_Static', 'boost_filesystem-mt-s', 'boost_system-mt-s'])
+ env['CXX'] = 'i486-mingw32-g++'
+else:
+ env.Append(LIBS = ['GL', 'GLU', 'noise', 'boost_filesystem', 'tolua++', 'lua'])
+ env.ParseConfig('sdl-config --cflags --libs')
+ env.ParseConfig('pkg-config --cflags --libs SDL_image')
+ env.ParseConfig('pkg-config --cflags --libs ftgl')
+ env.ParseConfig('pkg-config --cflags --libs CEGUI')
+ env.ParseConfig('pkg-config --cflags --libs CEGUI-OPENGL')
if not GetOption('release'):
env.Append(CPPFLAGS = ['-Wall', '-g'])