1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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_WINNT=0x0501', '-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
|