def lib(params = {})
    ldflags   = params[:settings]['ADD_LDFLAGS'] + ' ' + @settings['LDFLAGS']
    objs      = params[:objects].join(' ')
    dep_libs = (params[:libs] + libs_for_binary(params[:lib])).uniq
    libs      = linker_line_for(dep_libs)
    extension = File.extname(params[:lib])

    case extension
      when ('.a')
        # need to use 'touch' for correct timestamp, ar doesn't update the timestamp
        # if archive hasn't changed
        success = sh("#{@settings['AR']} curv #{params[:lib]} #{objs}")
        touch(params[:lib]) if success
      when '.so'
        sh "#{@settings['CXX']} -shared  #{ldflags} #{libs} #{objs} -o #{params[:lib]}"

        if (@config.stripped) && File.exist?(params[:lib])
          FileUtils.cp(params[:lib], "#{params[:lib]}.unstripped", :verbose => true)
          sh "#{@settings['STRIP']} #{params[:lib]}"
        end
      else
        raise "unsupported library extension (#{extension})!"
    end
  end
def lib(params = {})
    ldflags   = params[:settings]['ADD_LDFLAGS'] + ' ' + @settings['LDFLAGS']
    objs      = params[:objects].join(' ')
    dep_libs = (params[:libs] + libs_for_binary(params[:lib])).uniq
    libs      = linker_line_for(dep_libs)
    extension = File.extname(params[:lib])

    case extension
      when ('.a')
        # need to use 'touch' for correct timestamp, ar doesn't update the timestamp
        # if archive hasn't changed
        success = sh("#{@settings['AR']} curv #{params[:lib]} #{objs}")
        touch(params[:lib]) if success
      when '.so'
        sh "#{@settings['CXX']} -shared  #{ldflags} #{libs} #{objs} -o #{params[:lib]}"

        if (@config.stripped) && File.exist?(params[:lib])
          FileUtils.cp(params[:lib], "#{params[:lib]}.unstripped", :verbose => true)
          sh "#{@settings['STRIP']} #{params[:lib]}"
        end
      else
        raise "unsupported library extension (#{extension})!"
    end
  end
Creates library

 @param  [Hash] params
 @option params [Array]  :objects  object filename paths
 @option params [String] :lib      library filename path
 @option params [Hash]   :settings project specific settings