Whitespace tweaks

This commit is contained in:
Joshua Leung
2011-11-10 10:34:26 +00:00
parent afeb0eeaf0
commit 9111213a98
2 changed files with 223 additions and 223 deletions

View File

@@ -162,7 +162,7 @@ if cxx:
if sys.platform=='win32': if sys.platform=='win32':
if env['CC'] in ['cl', 'cl.exe']: if env['CC'] in ['cl', 'cl.exe']:
platform = 'win64-vc' if bitness == 64 else 'win32-vc' platform = 'win64-vc' if bitness == 64 else 'win32-vc'
elif env['CC'] in ['gcc']: elif env['CC'] in ['gcc']:
platform = 'win32-mingw' platform = 'win32-mingw'

View File

@@ -49,198 +49,198 @@ CSuffixes = ['.c', '.C']
CXXSuffixes = ['.cc', '.cpp', '.cxx', '.c++', '.C++'] CXXSuffixes = ['.cc', '.cpp', '.cxx', '.c++', '.C++']
def get_msvctoolkit_paths(): def get_msvctoolkit_paths():
"""Return a 4-tuple of (INCLUDE, LIB, PATH, TOOLKIT) as the values of those """Return a 4-tuple of (INCLUDE, LIB, PATH, TOOLKIT) as the values of those
three environment variables that should be set in order to execute three environment variables that should be set in order to execute
the MSVC .NET tools properly, if the information wasn't available the MSVC .NET tools properly, if the information wasn't available
from the registry.""" from the registry."""
MSToolkitDir = None MSToolkitDir = None
paths = {} paths = {}
exe_path = '' exe_path = ''
lib_path = '' lib_path = ''
include_path = '' include_path = ''
# First, we get the shell folder for this user: # First, we get the shell folder for this user:
if not SCons.Util.can_read_reg: if not SCons.Util.can_read_reg:
raise SCons.Errors.InternalError, "No Windows registry module was found" raise SCons.Errors.InternalError, "No Windows registry module was found"
# look for toolkit # look for toolkit
if os.environ.has_key('VCToolkitInstallDir'): if os.environ.has_key('VCToolkitInstallDir'):
MSToolkitDir = os.path.normpath(os.environ['VCToolkitInstallDir']) MSToolkitDir = os.path.normpath(os.environ['VCToolkitInstallDir'])
else: else:
# last resort -- default install location # last resort -- default install location
MSToolkitDir = r'C:\Program Files\Microsoft Visual C++ Toolkit 2003' MSToolkitDir = r'C:\Program Files\Microsoft Visual C++ Toolkit 2003'
# look for platform sdk # look for platform sdk
if os.environ.has_key('MSSdk'): if os.environ.has_key('MSSdk'):
PlatformSDKDir = os.path.normpath(os.environ['MSSdk']) PlatformSDKDir = os.path.normpath(os.environ['MSSdk'])
else: else:
try: try:
PlatformSDKDir = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\MicrosoftSDK\Directories\Install Dir')[0] PlatformSDKDir = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\MicrosoftSDK\Directories\Install Dir')[0]
PlatformSDKDir = str(PlatformSDKDir) PlatformSDKDir = str(PlatformSDKDir)
except SCons.Util.RegError: except SCons.Util.RegError:
raise SCons.Errors.InternalError, "The Platform SDK directory was not found in the registry or in the `MSSdk` environment variable." raise SCons.Errors.InternalError, "The Platform SDK directory was not found in the registry or in the `MSSdk` environment variable."
# look for DX Sdk (expecting DX9) # look for DX Sdk (expecting DX9)
# dxsdk docs have a directory key, look for it, extract path # dxsdk docs have a directory key, look for it, extract path
#dxsdkdocs = "" #dxsdkdocs = ""
DXsdkDir = "" DXsdkDir = ""
#try: #try:
# dxsdkdocs = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\DirectX SDK\DX9SDK Doc Path') # dxsdkdocs = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\DirectX SDK\DX9SDK Doc Path')
#except SCons.Util.RegError: #except SCons.Util.RegError:
# raise SCons.Errors.InternalError, "The DXSDK directory was not found in the registry." # raise SCons.Errors.InternalError, "The DXSDK directory was not found in the registry."
if os.environ.has_key('DXSDK_DIR'): if os.environ.has_key('DXSDK_DIR'):
DXsdkDir = os.path.normpath(os.environ['DXSDK_DIR']) DXsdkDir = os.path.normpath(os.environ['DXSDK_DIR'])
#DXsdkDir = os.path.split(dxsdkdocs[0])[0] #DXsdkDir = os.path.split(dxsdkdocs[0])[0]
DXsdkDir = os.path.split(DXsdkDir)[0] DXsdkDir = os.path.split(DXsdkDir)[0]
include_path = r'%s\include;%s\include;%s\include' % (MSToolkitDir, PlatformSDKDir, DXsdkDir) include_path = r'%s\include;%s\include;%s\include' % (MSToolkitDir, PlatformSDKDir, DXsdkDir)
lib_path = r'%s\lib;%s\lib;%s\lib' % (MSToolkitDir, PlatformSDKDir, DXsdkDir) lib_path = r'%s\lib;%s\lib;%s\lib' % (MSToolkitDir, PlatformSDKDir, DXsdkDir)
exe_path = r'%s\bin;%s\bin\win95;%s\bin' % (MSToolkitDir, PlatformSDKDir, PlatformSDKDir) exe_path = r'%s\bin;%s\bin\win95;%s\bin' % (MSToolkitDir, PlatformSDKDir, PlatformSDKDir)
return (include_path, lib_path, exe_path, PlatformSDKDir) return (include_path, lib_path, exe_path, PlatformSDKDir)
def validate_vars(env): def validate_vars(env):
"""Validate the PDB, PCH, and PCHSTOP construction variables.""" """Validate the PDB, PCH, and PCHSTOP construction variables."""
if env.has_key('PCH') and env['PCH']: if env.has_key('PCH') and env['PCH']:
if not env.has_key('PCHSTOP'): if not env.has_key('PCHSTOP'):
raise SCons.Errors.UserError, "The PCHSTOP construction must be defined if PCH is defined." raise SCons.Errors.UserError, "The PCHSTOP construction must be defined if PCH is defined."
if not SCons.Util.is_String(env['PCHSTOP']): if not SCons.Util.is_String(env['PCHSTOP']):
raise SCons.Errors.UserError, "The PCHSTOP construction variable must be a string: %r"%env['PCHSTOP'] raise SCons.Errors.UserError, "The PCHSTOP construction variable must be a string: %r"%env['PCHSTOP']
def pch_emitter(target, source, env): def pch_emitter(target, source, env):
"""Sets up the PDB dependencies for a pch file, and adds the object """Sets up the PDB dependencies for a pch file, and adds the object
file target.""" file target."""
validate_vars(env) validate_vars(env)
pch = None pch = None
obj = None obj = None
for t in target: for t in target:
if SCons.Util.splitext(str(t))[1] == '.pch': if SCons.Util.splitext(str(t))[1] == '.pch':
pch = t pch = t
if SCons.Util.splitext(str(t))[1] == '.obj': if SCons.Util.splitext(str(t))[1] == '.obj':
obj = t obj = t
if not obj: if not obj:
obj = SCons.Util.splitext(str(pch))[0]+'.obj' obj = SCons.Util.splitext(str(pch))[0]+'.obj'
target = [pch, obj] # pch must be first, and obj second for the PCHCOM to work target = [pch, obj] # pch must be first, and obj second for the PCHCOM to work
if env.has_key('PDB') and env['PDB']: if env.has_key('PDB') and env['PDB']:
env.SideEffect(env['PDB'], target) env.SideEffect(env['PDB'], target)
env.Precious(env['PDB']) env.Precious(env['PDB'])
return (target, source) return (target, source)
def object_emitter(target, source, env, parent_emitter): def object_emitter(target, source, env, parent_emitter):
"""Sets up the PDB and PCH dependencies for an object file.""" """Sets up the PDB and PCH dependencies for an object file."""
validate_vars(env) validate_vars(env)
parent_emitter(target, source, env) parent_emitter(target, source, env)
if env.has_key('PDB') and env['PDB']: if env.has_key('PDB') and env['PDB']:
env.SideEffect(env['PDB'], target) env.SideEffect(env['PDB'], target)
env.Precious(env['PDB']) env.Precious(env['PDB'])
if env.has_key('PCH') and env['PCH']: if env.has_key('PCH') and env['PCH']:
env.Depends(target, env['PCH']) env.Depends(target, env['PCH'])
return (target, source) return (target, source)
def static_object_emitter(target, source, env): def static_object_emitter(target, source, env):
return object_emitter(target, source, env, return object_emitter(target, source, env,
SCons.Defaults.StaticObjectEmitter) SCons.Defaults.StaticObjectEmitter)
def shared_object_emitter(target, source, env): def shared_object_emitter(target, source, env):
return object_emitter(target, source, env, return object_emitter(target, source, env,
SCons.Defaults.SharedObjectEmitter) SCons.Defaults.SharedObjectEmitter)
pch_builder = SCons.Builder.Builder(action='$PCHCOM', suffix='.pch', emitter=pch_emitter) pch_builder = SCons.Builder.Builder(action='$PCHCOM', suffix='.pch', emitter=pch_emitter)
res_builder = SCons.Builder.Builder(action='$RCCOM', suffix='.res') res_builder = SCons.Builder.Builder(action='$RCCOM', suffix='.res')
def pdbGenerator(env, target, source, for_signature): def pdbGenerator(env, target, source, for_signature):
if target and env.has_key('PDB') and env['PDB']: if target and env.has_key('PDB') and env['PDB']:
return ['/PDB:%s'%target[0].File(env['PDB']).get_string(for_signature), return ['/PDB:%s'%target[0].File(env['PDB']).get_string(for_signature),
'/DEBUG'] '/DEBUG']
def win32ShlinkTargets(target, source, env, for_signature): def win32ShlinkTargets(target, source, env, for_signature):
listCmd = [] listCmd = []
dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX') dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
if dll: listCmd.append("/out:%s"%dll.get_string(for_signature)) if dll: listCmd.append("/out:%s"%dll.get_string(for_signature))
implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX') implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX')
if implib: listCmd.append("/implib:%s"%implib.get_string(for_signature)) if implib: listCmd.append("/implib:%s"%implib.get_string(for_signature))
return listCmd return listCmd
def win32ShlinkSources(target, source, env, for_signature): def win32ShlinkSources(target, source, env, for_signature):
listCmd = [] listCmd = []
deffile = env.FindIxes(source, "WIN32DEFPREFIX", "WIN32DEFSUFFIX") deffile = env.FindIxes(source, "WIN32DEFPREFIX", "WIN32DEFSUFFIX")
for src in source: for src in source:
if src == deffile: if src == deffile:
# Treat this source as a .def file. # Treat this source as a .def file.
listCmd.append("/def:%s" % src.get_string(for_signature)) listCmd.append("/def:%s" % src.get_string(for_signature))
else: else:
# Just treat it as a generic source file. # Just treat it as a generic source file.
listCmd.append(src) listCmd.append(src)
return listCmd return listCmd
def win32LibEmitter(target, source, env): def win32LibEmitter(target, source, env):
# SCons.Tool.msvc.validate_vars(env) # SCons.Tool.msvc.validate_vars(env)
dll = env.FindIxes(target, "SHLIBPREFIX", "SHLIBSUFFIX") dll = env.FindIxes(target, "SHLIBPREFIX", "SHLIBSUFFIX")
no_import_lib = env.get('no_import_lib', 0) no_import_lib = env.get('no_import_lib', 0)
if not dll: if not dll:
raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX") raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")
if env.get("WIN32_INSERT_DEF", 0) and \ if env.get("WIN32_INSERT_DEF", 0) and \
not env.FindIxes(source, "WIN32DEFPREFIX", "WIN32DEFSUFFIX"): not env.FindIxes(source, "WIN32DEFPREFIX", "WIN32DEFSUFFIX"):
# append a def file to the list of sources # append a def file to the list of sources
source.append(env.ReplaceIxes(dll, source.append(env.ReplaceIxes(dll,
"SHLIBPREFIX", "SHLIBSUFFIX", "SHLIBPREFIX", "SHLIBSUFFIX",
"WIN32DEFPREFIX", "WIN32DEFSUFFIX")) "WIN32DEFPREFIX", "WIN32DEFSUFFIX"))
if env.has_key('PDB') and env['PDB']: if env.has_key('PDB') and env['PDB']:
env.SideEffect(env['PDB'], target) env.SideEffect(env['PDB'], target)
env.Precious(env['PDB']) env.Precious(env['PDB'])
if not no_import_lib and \ if not no_import_lib and \
not env.FindIxes(target, "LIBPREFIX", "LIBSUFFIX"): not env.FindIxes(target, "LIBPREFIX", "LIBSUFFIX"):
# Append an import library to the list of targets. # Append an import library to the list of targets.
target.append(env.ReplaceIxes(dll, target.append(env.ReplaceIxes(dll,
"SHLIBPREFIX", "SHLIBSUFFIX", "SHLIBPREFIX", "SHLIBSUFFIX",
"LIBPREFIX", "LIBSUFFIX")) "LIBPREFIX", "LIBSUFFIX"))
# and .exp file is created if there are exports from a DLL # and .exp file is created if there are exports from a DLL
target.append(env.ReplaceIxes(dll, target.append(env.ReplaceIxes(dll,
"SHLIBPREFIX", "SHLIBSUFFIX", "SHLIBPREFIX", "SHLIBSUFFIX",
"WIN32EXPPREFIX", "WIN32EXPSUFFIX")) "WIN32EXPPREFIX", "WIN32EXPSUFFIX"))
return (target, source) return (target, source)
def prog_emitter(target, source, env): def prog_emitter(target, source, env):
#SCons.Tool.msvc.validate_vars(env) #SCons.Tool.msvc.validate_vars(env)
if env.has_key('PDB') and env['PDB']: if env.has_key('PDB') and env['PDB']:
env.SideEffect(env['PDB'], target) env.SideEffect(env['PDB'], target)
env.Precious(env['PDB']) env.Precious(env['PDB'])
return (target,source) return (target,source)
def RegServerFunc(target, source, env): def RegServerFunc(target, source, env):
if env.has_key('register') and env['register']: if env.has_key('register') and env['register']:
ret = regServerAction([target[0]], [source[0]], env) ret = regServerAction([target[0]], [source[0]], env)
if ret: if ret:
raise SCons.Errors.UserError, "Unable to register %s" % target[0] raise SCons.Errors.UserError, "Unable to register %s" % target[0]
else: else:
print "Registered %s sucessfully" % target[0] print "Registered %s sucessfully" % target[0]
return ret return ret
return 0 return 0
regServerAction = SCons.Action.Action("$REGSVRCOM") regServerAction = SCons.Action.Action("$REGSVRCOM")
regServerCheck = SCons.Action.Action(RegServerFunc, None) regServerCheck = SCons.Action.Action(RegServerFunc, None)
@@ -248,106 +248,106 @@ shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK
compositeLinkAction = shlibLinkAction + regServerCheck compositeLinkAction = shlibLinkAction + regServerCheck
def generate(env): def generate(env):
"""Add Builders and construction variables for MSVC++ to an Environment.""" """Add Builders and construction variables for MSVC++ to an Environment."""
static_obj, shared_obj = SCons.Tool.createObjBuilders(env) static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
for suffix in CSuffixes: for suffix in CSuffixes:
static_obj.add_action(suffix, SCons.Defaults.CAction) static_obj.add_action(suffix, SCons.Defaults.CAction)
shared_obj.add_action(suffix, SCons.Defaults.ShCAction) shared_obj.add_action(suffix, SCons.Defaults.ShCAction)
for suffix in CXXSuffixes: for suffix in CXXSuffixes:
static_obj.add_action(suffix, SCons.Defaults.CXXAction) static_obj.add_action(suffix, SCons.Defaults.CXXAction)
shared_obj.add_action(suffix, SCons.Defaults.ShCXXAction) shared_obj.add_action(suffix, SCons.Defaults.ShCXXAction)
SCons.Tool.createStaticLibBuilder(env) SCons.Tool.createStaticLibBuilder(env)
SCons.Tool.createSharedLibBuilder(env) SCons.Tool.createSharedLibBuilder(env)
SCons.Tool.createProgBuilder(env) SCons.Tool.createProgBuilder(env)
env['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Zi /Fd%s"%File(PDB)) or ""}']) env['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Zi /Fd%s"%File(PDB)) or ""}'])
env['CCPCHFLAGS'] = SCons.Util.CLVar(['${(PCH and "/Yu%s /Fp%s"%(PCHSTOP or "",File(PCH))) or ""}']) env['CCPCHFLAGS'] = SCons.Util.CLVar(['${(PCH and "/Yu%s /Fp%s"%(PCHSTOP or "",File(PCH))) or ""}'])
env['CCCOMFLAGS'] = '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Fo$TARGET $CCPCHFLAGS $CCPDBFLAGS' env['CCCOMFLAGS'] = '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Fo$TARGET $CCPCHFLAGS $CCPDBFLAGS'
env['CC'] = 'cl' env['CC'] = 'cl'
env['CCFLAGS'] = SCons.Util.CLVar('/nologo') env['CCFLAGS'] = SCons.Util.CLVar('/nologo')
env['CCCOM'] = '$CC $CCFLAGS $CCCOMFLAGS' env['CCCOM'] = '$CC $CCFLAGS $CCCOMFLAGS'
env['SHCC'] = '$CC' env['SHCC'] = '$CC'
env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS') env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
env['SHCCCOM'] = '$SHCC $SHCCFLAGS $CCCOMFLAGS' env['SHCCCOM'] = '$SHCC $SHCCFLAGS $CCCOMFLAGS'
env['CXX'] = '$CC' env['CXX'] = '$CC'
env['CXXFLAGS'] = SCons.Util.CLVar('$CCFLAGS $( /TP $)') env['CXXFLAGS'] = SCons.Util.CLVar('$CCFLAGS $( /TP $)')
env['CXXCOM'] = '$CXX $CXXFLAGS $CCCOMFLAGS' env['CXXCOM'] = '$CXX $CXXFLAGS $CCCOMFLAGS'
env['SHCXX'] = '$CXX' env['SHCXX'] = '$CXX'
env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS') env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
env['SHCXXCOM'] = '$SHCXX $SHCXXFLAGS $CCCOMFLAGS' env['SHCXXCOM'] = '$SHCXX $SHCXXFLAGS $CCCOMFLAGS'
env['CPPDEFPREFIX'] = '/D' env['CPPDEFPREFIX'] = '/D'
env['CPPDEFSUFFIX'] = '' env['CPPDEFSUFFIX'] = ''
env['INCPREFIX'] = '/I' env['INCPREFIX'] = '/I'
env['INCSUFFIX'] = '' env['INCSUFFIX'] = ''
env['OBJEMITTER'] = static_object_emitter env['OBJEMITTER'] = static_object_emitter
env['SHOBJEMITTER'] = shared_object_emitter env['SHOBJEMITTER'] = shared_object_emitter
env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1 env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
env['RC'] = 'rc' env['RC'] = 'rc'
env['RCFLAGS'] = SCons.Util.CLVar('') env['RCFLAGS'] = SCons.Util.CLVar('')
env['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS $RCFLAGS /fo$TARGET $SOURCES' env['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS $RCFLAGS /fo$TARGET $SOURCES'
CScan = env.get_scanner('.c') CScan = env.get_scanner('.c')
if CScan: if CScan:
CScan.add_skey('.rc') CScan.add_skey('.rc')
env['BUILDERS']['RES'] = res_builder env['BUILDERS']['RES'] = res_builder
include_path, lib_path, exe_path, sdk_path = get_msvctoolkit_paths() include_path, lib_path, exe_path, sdk_path = get_msvctoolkit_paths()
env.PrependENVPath('INCLUDE', include_path) env.PrependENVPath('INCLUDE', include_path)
env.PrependENVPath('LIB', lib_path) env.PrependENVPath('LIB', lib_path)
env.PrependENVPath('PATH', exe_path) env.PrependENVPath('PATH', exe_path)
env['ENV']['CPU'] = 'i386' env['ENV']['CPU'] = 'i386'
env['ENV']['MSSDK'] = sdk_path env['ENV']['MSSDK'] = sdk_path
env['ENV']['BkOffice'] = sdk_path env['ENV']['BkOffice'] = sdk_path
env['ENV']['Basemake'] = sdk_path + "\\Include\\BKOffice.Mak" env['ENV']['Basemake'] = sdk_path + "\\Include\\BKOffice.Mak"
env['ENV']['INETSDK'] = sdk_path env['ENV']['INETSDK'] = sdk_path
env['ENV']['MSSDK'] = sdk_path env['ENV']['MSSDK'] = sdk_path
env['ENV']['MSTOOLS'] = sdk_path env['ENV']['MSTOOLS'] = sdk_path
env['ENV']['TARGETOS'] = 'WINNT' env['ENV']['TARGETOS'] = 'WINNT'
env['ENV']['APPVER'] = '5.0' env['ENV']['APPVER'] = '5.0'
env['CFILESUFFIX'] = '.c' env['CFILESUFFIX'] = '.c'
env['CXXFILESUFFIX'] = '.cc' env['CXXFILESUFFIX'] = '.cc'
env['PCHCOM'] = '$CXX $CXXFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Fo${TARGETS[1]} /Yc$PCHSTOP /Fp${TARGETS[0]} $CCPDBFLAGS' env['PCHCOM'] = '$CXX $CXXFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Fo${TARGETS[1]} /Yc$PCHSTOP /Fp${TARGETS[0]} $CCPDBFLAGS'
env['BUILDERS']['PCH'] = pch_builder env['BUILDERS']['PCH'] = pch_builder
env['AR'] = 'lib.exe' #'"' +sdk_path + '\\bin\\Win64\\lib.exe"' env['AR'] = 'lib.exe' #'"' +sdk_path + '\\bin\\Win64\\lib.exe"'
env['ARFLAGS'] = SCons.Util.CLVar('/nologo') env['ARFLAGS'] = SCons.Util.CLVar('/nologo')
env['ARCOM'] = "${TEMPFILE('$AR $ARFLAGS /OUT:$TARGET $SOURCES')}" env['ARCOM'] = "${TEMPFILE('$AR $ARFLAGS /OUT:$TARGET $SOURCES')}"
env['SHLINK'] = '$LINK' env['SHLINK'] = '$LINK'
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS /dll') env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS /dll')
env['_SHLINK_TARGETS'] = win32ShlinkTargets env['_SHLINK_TARGETS'] = win32ShlinkTargets
env['_SHLINK_SOURCES'] = win32ShlinkSources env['_SHLINK_SOURCES'] = win32ShlinkSources
env['SHLINKCOM'] = compositeLinkAction env['SHLINKCOM'] = compositeLinkAction
env['SHLIBEMITTER']= win32LibEmitter env['SHLIBEMITTER']= win32LibEmitter
env['LINK'] = 'link.exe' #'"' +sdk_path + '\\bin\\Win64\\' + 'link.exe"' env['LINK'] = 'link.exe' #'"' +sdk_path + '\\bin\\Win64\\' + 'link.exe"'
env['LINKFLAGS'] = SCons.Util.CLVar('/nologo') env['LINKFLAGS'] = SCons.Util.CLVar('/nologo')
env['_PDB'] = pdbGenerator env['_PDB'] = pdbGenerator
env["TEMPFILE"] = SCons.Platform.win32.TempFileMunge env["TEMPFILE"] = SCons.Platform.win32.TempFileMunge
env['LINKCOM'] = '${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET $( $_LIBDIRFLAGS $) $_LIBFLAGS $_PDB $SOURCES")}' env['LINKCOM'] = '${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET $( $_LIBDIRFLAGS $) $_LIBFLAGS $_PDB $SOURCES")}'
env['PROGEMITTER'] = prog_emitter env['PROGEMITTER'] = prog_emitter
env['LIBDIRPREFIX']='/LIBPATH:' env['LIBDIRPREFIX']='/LIBPATH:'
env['LIBDIRSUFFIX']='' env['LIBDIRSUFFIX']=''
env['LIBLINKPREFIX']='' env['LIBLINKPREFIX']=''
env['LIBLINKSUFFIX']='$LIBSUFFIX' env['LIBLINKSUFFIX']='$LIBSUFFIX'
env['WIN32DEFPREFIX'] = '' env['WIN32DEFPREFIX'] = ''
env['WIN32DEFSUFFIX'] = '.def' env['WIN32DEFSUFFIX'] = '.def'
env['WIN32_INSERT_DEF'] = 0 env['WIN32_INSERT_DEF'] = 0
env['WIN32EXPPREFIX'] = '' env['WIN32EXPPREFIX'] = ''
env['WIN32EXPSUFFIX'] = '.exp' env['WIN32EXPSUFFIX'] = '.exp'
env['REGSVRACTION'] = regServerCheck env['REGSVRACTION'] = regServerCheck
env['REGSVR'] = os.path.join(SCons.Platform.win32.get_system_root(),'System32','regsvr32') env['REGSVR'] = os.path.join(SCons.Platform.win32.get_system_root(),'System32','regsvr32')
env['REGSVRFLAGS'] = '/s ' env['REGSVRFLAGS'] = '/s '
env['REGSVRCOM'] = '$REGSVR $REGSVRFLAGS $TARGET' env['REGSVRCOM'] = '$REGSVR $REGSVRFLAGS $TARGET'
def exists(env): def exists(env):
return env.Detect('cl') return env.Detect('cl')