summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-05-29 12:41:25 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-05-29 12:41:25 +0200
commit7b11fe4278eb1ff7d854ab789580e2b7dc361616 (patch)
tree1c802d8f78a6fc5f54d7e540c3158a78bda3e9aa /SConstruct
parentd1a668afd0e0b3fe096969aac9eb3096e9098907 (diff)
Cross-compile with scons.
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'])