Class: Cpp::Darwin

Inherits:
GccToolsetBase show all
Defined in:
lib/bake/cpp_scheme.rb

Instance Method Summary collapse

Methods inherited from GccToolsetBase

#compile, #link, #output, #run

Methods inherited from CppToolsetBase

#build, #clean, #output_files, #stale?

Methods inherited from Bake::Toolset

#sh

Instance Method Details

#ar(lib) ⇒ Object



185
186
187
188
189
190
191
192
193
194
# File 'lib/bake/cpp_scheme.rb', line 185

def ar(lib)
    obj_str, lib_str, flags = process_inputs(lib)
    
    output = lib_fn(lib)
    if lib[:libtype] == 'dynamic'
        sh("g++ #{flags} -dynamiclib -o #{output} #{obj_str} #{lib_str}")
    else
        sh("ar rcs #{output} #{obj_str}")
    end
end