diff options
-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']) |