Sha256: ac9275e46ef06f18dee57f154d6946f17958763909758ecb9ffd98037c65bae3
Contents?: true
Size: 810 Bytes
Versions: 8
Compression:
Stored size: 810 Bytes
Contents
require 'fileutils' module Rscons # A default RScons builder that produces a static library archive. class Library < Builder def default_variables(env) { 'AR' => 'ar', 'LIBSUFFIX' => '.a', 'ARFLAGS' => [], 'ARCOM' => ['$AR', 'rcs', '$ARFLAGS', '$_TARGET', '$_SOURCES'] } end def run(target, sources, cache, env, vars = {}) # build sources to linkable objects objects = env.build_sources(sources, [env['OBJSUFFIX'], env['LIBSUFFIX']].flatten, cache, vars) if objects vars = vars.merge({ '_TARGET' => target, '_SOURCES' => objects, }) command = env.build_command(env['ARCOM'], vars) standard_build("AR #{target}", target, command, objects, env, cache) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems