From 9fa6460f22be5482239d0b903af985a519f77166 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 1 Jun 2011 19:28:24 +0200 Subject: Initial commit. --- SConstruct | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 SConstruct (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct new file mode 100644 index 0000000..2952dbc --- /dev/null +++ b/SConstruct @@ -0,0 +1,33 @@ +import os + +env = Environment( + ENV = os.environ, +) + +AddOption('--release', action = 'store_true') +AddOption('--profiling', action = 'store_true') +AddOption('--mingw32', action = 'store_true') + +env.Append(CPPPATH = ['.', 'common']) + +# cross-compiling +if GetOption('mingw32'): + env.Append(LIBS = ['winmm', 'wsock32', 'ws2_32', 'mingw32', 'noise', 'boost_filesystem-mt-s', 'boost_system-mt-s', 'boost_thread_win32-mt-s']) + env.Append(LINKFLAGS = ['-static-libgcc', '-static-libstdc++']) + env.Append(CPPFLAGS = ['-D_WIN32_WINDOWS', '-DBOOST_THREAD_USE_LIB']) + env['CXX'] = 'i486-mingw32-g++' +else: + env.Append(LIBS = ['noise', 'boost_filesystem', 'boost_thread']) + +if not GetOption('release'): + env.Append(CPPFLAGS = ['-Wall', '-g']) + +if GetOption('profiling'): + env.Append(CPPFLAGS = ['-pg']) + env.Append(LINKFLAGS = ['-pg']) + +Export('env') + +env.Program('gressd.exe' if GetOption('mingw32') else 'gressd', Glob('*.cpp') + Glob('common/*.cpp') + ['noiseutils/noiseutils.cpp']) + +# vim: syn=python -- cgit v1.2.3