From 7b11fe4278eb1ff7d854ab789580e2b7dc361616 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 29 May 2011 12:41:25 +0200 Subject: Cross-compile with scons. --- SConstruct | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'SConstruct') 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']) -- cgit v1.2.3