def dep(params = {})
    extension = File.extname(params[:source])
    dep       = params[:dep]
    source    = params[:source]
    incs      = compiler_incs_for(params[:includes]) + " #{@settings['LIB_INC']}"
    case
      when cpp_source_extensions.include?(extension)
        flags = @settings['CXXFLAGS'] + ' ' + params[:settings]['ADD_CXXFLAGS']
        compiler = "#{@settings['CXX']} -x c++ "
      when c_source_extensions.include?(extension)
        flags  = @settings['CFLAGS'] + ' ' + params[:settings]['ADD_CFLAGS']
        compiler = "#{@settings['CC']} -x c "
      when as_source_extensions.include?(extension)
        flags = ''
        compiler = "#{@settings['AS']}"
      else
        raise "unsupported source file extension (#{extension}) for creating dependency!"
    end
    sh "#{compiler} -MM #{flags} #{incs} -c #{source} -MT #{dep.ext('.o')} -MF #{dep}", silent: true
  end
def dep(params = {})
    extension = File.extname(params[:source])
    dep       = params[:dep]
    source    = params[:source]
    incs      = compiler_incs_for(params[:includes]) + " #{@settings['LIB_INC']}"
    case
      when cpp_source_extensions.include?(extension)
        flags = @settings['CXXFLAGS'] + ' ' + params[:settings]['ADD_CXXFLAGS']
        compiler = "#{@settings['CXX']} -x c++ "
      when c_source_extensions.include?(extension)
        flags  = @settings['CFLAGS'] + ' ' + params[:settings]['ADD_CFLAGS']
        compiler = "#{@settings['CC']} -x c "
      when as_source_extensions.include?(extension)
        flags = ''
        compiler = "#{@settings['AS']}"
      else
        raise "unsupported source file extension (#{extension}) for creating dependency!"
    end
    sh "#{compiler} -MM #{flags} #{incs} -c #{source} -MT #{dep.ext('.o')} -MF #{dep}", silent: true
  end
Creates dependency

 @param  [Hash] params
 @option params [String] :source   source filename with path
 @option params [String] :dep      dependency filename path
 @option params [Hash]   :settings project specific settings
 @option params [Array]  :includes include paths used