summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/sgicc.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Tool/sgicc.py')
-rw-r--r--src/engine/SCons/Tool/sgicc.py35
1 files changed, 3 insertions, 32 deletions
diff --git a/src/engine/SCons/Tool/sgicc.py b/src/engine/SCons/Tool/sgicc.py
index 92ce92b..cc285e7 100644
--- a/src/engine/SCons/Tool/sgicc.py
+++ b/src/engine/SCons/Tool/sgicc.py
@@ -33,45 +33,16 @@ selection method.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os.path
-
-import SCons.Tool
-import SCons.Defaults
-import SCons.Util
-
-CSuffixes = ['.c']
-CXXSuffixes = ['.C', '.cpp', '.cc', '.cxx', '.c++', '.C++']
+import cc
def generate(env):
"""Add Builders and construction variables for gcc to an Environment."""
- static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
-
- for suffix in CSuffixes:
- static_obj.add_action(suffix, SCons.Defaults.CAction)
- shared_obj.add_action(suffix, SCons.Defaults.ShCAction)
- for suffix in CXXSuffixes:
- static_obj.add_action(suffix, SCons.Defaults.CXXAction)
- shared_obj.add_action(suffix, SCons.Defaults.ShCXXAction)
+ cc.generate(env)
- env['CC'] = 'cc'
- env['CCFLAGS'] = ''
- env['CCCOM'] = '$CC $CCFLAGS $CPPFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES'
- env['SHCC'] = '$CC'
- env['SHCCFLAGS'] = '$CCFLAGS'
- env['SHCCCOM'] = '$SHCC $SHCCFLAGS $CPPFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES'
-
env['CXX'] = 'CC'
env['CXXFLAGS'] = ['$CCFLAGS', '-LANG:std']
- env['CXXCOM'] = '$CXX $CXXFLAGS $CPPFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES'
- env['SHCXX'] = '$CXX'
- env['SHCXXFLAGS'] = '$CXXFLAGS'
- env['SHCXXCOM'] = '$SHCXX $SHCXXFLAGS $CPPFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES'
-
- env['INCPREFIX'] = '-I'
- env['INCSUFFIX'] = ''
+ env['SHOBJSUFFIX'] = '.o'
env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
- env['CFILESUFFIX'] = '.c'
-
def exists(env):
return env.Detect('CC')