diff options
Diffstat (limited to 'common.py')
-rw-r--r-- | common.py | 38 |
1 files changed, 30 insertions, 8 deletions
@@ -34,7 +34,7 @@ default_machine = _machine_map.get(default_machine, 'generic') if default_platform in ('linux', 'freebsd', 'darwin'): default_dri = 'yes' -elif default_platform in ('winddk', 'windows'): +elif default_platform in ('winddk', 'windows', 'wince'): default_dri = 'no' else: default_dri = 'no' @@ -58,7 +58,7 @@ def AddOptions(opts): opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine, allowed_values=('generic', 'x86', 'x86_64'))) opts.Add(EnumOption('platform', 'target platform', default_platform, - allowed_values=('linux', 'cell', 'windows', 'winddk'))) + allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince'))) opts.Add(BoolOption('llvm', 'use LLVM', 'no')) opts.Add(BoolOption('dri', 'build DRI drivers', default_dri)) @@ -149,7 +149,7 @@ def generate(env): platform = env['platform'] x86 = env['machine'] == 'x86' gcc = env['platform'] in ('linux', 'freebsd', 'darwin') - msvc = env['platform'] in ('windows', 'winddk') + msvc = env['platform'] in ('windows', 'winddk', 'wince') # C preprocessor options cppdefines = [] @@ -196,10 +196,25 @@ def generate(env): ] if debug: cppdefines += [('DBG', 1)] + if platform == 'wince': + cppdefines += [ + ('_WIN32_WCE', '500'), + 'WCE_PLATFORM_STANDARDSDK_500', + '_i386_', + ('UNDER_CE', '500'), + 'UNICODE', + '_UNICODE', + '_X86_', + 'x86', + '_USRDLL', + 'TEST_EXPORTS' , + ] if platform == 'windows': - cppdefines += ['PIPE_SUBSYSTEM_USER'] + cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_USER'] if platform == 'winddk': - cppdefines += ['PIPE_SUBSYSTEM_KERNEL'] + cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_DISPLAY'] + if platform == 'wince': + cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_CE'] env.Append(CPPDEFINES = cppdefines) # C compiler options @@ -240,10 +255,13 @@ def generate(env): '/Gh', # enable _penter hook function '/GH', # enable _pexit hook function ] + cflags += [ + '/W3', # warning level + #'/Wp64', # enable 64 bit porting warnings + ] if platform == 'windows': cflags += [ # TODO - #'/Wp64', # enable 64 bit porting warnings ] if platform == 'winddk': cflags += [ @@ -251,7 +269,6 @@ def generate(env): '/Zp8', # 8bytes struct member alignment '/Gy', # separate functions for linker '/Gm-', # disable minimal rebuild - '/W3', # warning level '/WX', # treat warnings as errors '/Gz', # __stdcall Calling convention '/GX-', # disable C++ EH @@ -264,8 +281,13 @@ def generate(env): '/hotpatch', # prepares an image for hotpatching. #'/Z7', #enable old-style debug info ] + if platform == 'wince': + cflags += [ + '/Gs8192', + '/GF', # enable read-only string pooling + ] # Put debugging information in a separate .pdb file for each object file as - # descrived in the scons manpage + # described in the scons manpage env['CCPDBFLAGS'] = '/Zi /Fd${TARGET}.pdb' env.Append(CFLAGS = cflags) env.Append(CXXFLAGS = cflags) |