diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-05-29 12:41:25 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-05-29 12:41:25 +0200 |
commit | 7b11fe4278eb1ff7d854ab789580e2b7dc361616 (patch) | |
tree | 1c802d8f78a6fc5f54d7e540c3158a78bda3e9aa /SConstruct | |
parent | d1a668afd0e0b3fe096969aac9eb3096e9098907 (diff) |
Cross-compile with scons.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 22 |
1 files changed, 16 insertions, 6 deletions
@@ -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']) |