-#
-# TODO: put the compiler specific settings in separate files
-# TODO: auto-detect as much as possible
-
-
-if platform == 'winddk':
- import ntpath
- escape = env['ESCAPE']
- env.Tool('winddk', '.')
- if 'BASEDIR' in os.environ:
- WINDDK = os.environ['BASEDIR']
- else:
- WINDDK = "C:\\WINDDK\\3790.1830"
- # NOTE: We need this elaborate construct to get the absolute paths and
- # forward slashes to msvc unharmed when cross compiling from posix platforms
- #env.Append(CPPFLAGS = [
- # escape('/I' + ntpath.join(WINDDK, 'inc\\wxp')),
- # escape('/I' + ntpath.join(WINDDK, 'inc\\ddk\\wxp')),
- # escape('/I' + ntpath.join(WINDDK, 'inc\\ddk\\wdm\\wxp')),
- # escape('/I' + ntpath.join(WINDDK, 'inc\\crt')),
- #])
-
- env.Append(CFLAGS = '/W3')
- if debug:
- env.Append(CPPDEFINES = [
- ('DBG', '1'),
- ('DEBUG', '1'),
- ('_DEBUG', '1'),
- ])
- env.Append(CFLAGS = '/Od /Zi')
- env.Append(CXXFLAGS = '/Od /Zi')
-
-
-# Optimization flags
-if gcc:
- if debug:
- env.Append(CFLAGS = '-O0 -g3')
- env.Append(CXXFLAGS = '-O0 -g3')
- else:
- env.Append(CFLAGS = '-O3 -g3')
- env.Append(CXXFLAGS = '-O3 -g3')
-
- env.Append(CFLAGS = '-Wall -Wmissing-prototypes -Wno-long-long -ffast-math -pedantic')
- env.Append(CXXFLAGS = '-Wall -pedantic')
-
- # Be nice to Eclipse
- env.Append(CFLAGS = '-fmessage-length=0')
- env.Append(CXXFLAGS = '-fmessage-length=0')
-
-
-# Defines
-if debug:
- env.Append(CPPDEFINES = ['DEBUG'])
-else:
- env.Append(CPPDEFINES = ['NDEBUG'])
-