code: def generate(env):
      
      static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
  
      if 'CXX' not in env:
          env['CXX']    = env.Detect(compilers) or compilers[0]
  
      cxx.generate(env)
  
      # platform specific settings
      if env['PLATFORM'] == 'aix':
          env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS -mminimal-toc')
          env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
          env['SHOBJSUFFIX'] = '$OBJSUFFIX'
      elif env['PLATFORM'] == 'hpux':
          env['SHOBJSUFFIX'] = '.pic.o'
      elif env['PLATFORM'] == 'sunos':
          env['SHOBJSUFFIX'] = '.pic.o'
      # determine compiler version
      version = gcc.detect_version(env, env['CXX'])
      if version:
          env['CXXVERSION'] = version
docs: Add Builders and construction variables for g++ to an Environment.