import os env = Environment( ENV = os.environ, ) engine = Glob('engine/*.cpp') AddOption('--release', action = 'store_true') AddOption('--profiling', action = 'store_true') if env['PLATFORM'] == 'darwin': env.Append(CPPFLAGS = '') env.Append(LINKFLAGS = '') env.Append(CPPPATH = ['.', '/opt/local/include', '/opt/local/include/freetype2']) env.Append(LIBS = ['ftgl']) env.Append(LIBPATH = ['/opt/local/lib']) env.Append(FRAMEWORKS = ['sfml-system', 'sfml-window', 'OpenGL']) else: env.Append(CPPPATH = ['.']) env.Append(LIBS = ['GL', 'GLU', 'SDL', 'SDL_image']) env.ParseConfig('sdl-config --cflags --libs') env.ParseConfig('pkg-config --cflags --libs ftgl') if not GetOption('release'): env.Append(CPPFLAGS = ['-Wall', '-g']) if GetOption('profiling'): env.Append(CPPFLAGS = ['-pg']) env.Append(LINKFLAGS = ['-pg']) Export('env') env.SConscript('wriggle/SConscript') env.Append(LIBS = ['wriggle']) env.Append(LIBPATH = ['wriggle']) env.Library('engine/engine', engine) env.Prepend(LIBS = ['engine']) env.Append(LIBPATH = ['engine']) env.Program('foo', ['main.cpp']) # vim: syn=python