56 lines
1.6 KiB
Text
56 lines
1.6 KiB
Text
![]() |
print "Using Microsoft tools configuration"
|
||
|
|
||
|
Import('defenv')
|
||
|
|
||
|
### flags
|
||
|
|
||
|
defenv['ENTRY_FLAG'] = lambda x: '/entry:' + x
|
||
|
defenv['MAP_FLAG'] = lambda x: '/map'
|
||
|
defenv['EXCEPTION_FLAG'] = '/GX'
|
||
|
defenv['NODEFLIBS_FLAG'] = '/NODEFAULTLIB'
|
||
|
defenv['C_FLAG'] = '/TC'
|
||
|
defenv['CPP_FLAG'] = '/TP'
|
||
|
|
||
|
### stub environment
|
||
|
|
||
|
stub_env = defenv.Copy()
|
||
|
|
||
|
stub_env.Append(CCFLAGS = '/O1') # optimize for size
|
||
|
stub_env.Append(CCFLAGS = '/W3') # level 3 warnings
|
||
|
|
||
|
stub_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
|
||
|
stub_env.Append(LINKFLAGS = '/entry:WinMain') # entry point
|
||
|
stub_env.Append(LINKFLAGS = '/NODEFAULTLIB') # no default libraries
|
||
|
|
||
|
### makensis environment
|
||
|
|
||
|
makensis_env = defenv.Copy()
|
||
|
|
||
|
makensis_env.Append(CCFLAGS = '/O2') # optimize for speed
|
||
|
makensis_env.Append(CCFLAGS = '/GX') # enable exceptions
|
||
|
makensis_env.Append(CCFLAGS = '/W3') # level 3 warnings
|
||
|
|
||
|
makensis_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
|
||
|
|
||
|
### plugin environment
|
||
|
|
||
|
plugin_env = defenv.Copy(no_import_lib = 1)
|
||
|
|
||
|
plugin_env.Append(CCFLAGS = '/O1') # optimize for size
|
||
|
plugin_env.Append(CCFLAGS = '/W3') # level 3 warnings
|
||
|
|
||
|
plugin_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
|
||
|
|
||
|
### util environment
|
||
|
|
||
|
util_env = defenv.Copy()
|
||
|
|
||
|
util_env.Append(CCFLAGS = '/O1') # optimize for speed
|
||
|
util_env.Append(CCFLAGS = '/W3') # level 3 warnings
|
||
|
|
||
|
util_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
|
||
|
|
||
|
# return
|
||
|
|
||
|
Return('stub_env makensis_env plugin_env util_env')
|