diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-06-01 19:28:24 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-06-01 19:28:24 +0200 |
commit | 9fa6460f22be5482239d0b903af985a519f77166 (patch) | |
tree | 7f4be0d51977ad90b184cd01aa9300f8efd2eb4d /SConstruct |
Initial commit.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 33 |
1 files changed, 33 insertions, 0 deletions
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 |