module PaperHouse::LinkerOptions
Linker option utilities.
Attributes
ldflags[W]
@!attribute ldflags
Linker options pass to C compiler.
Public Instance Methods
ldflags()
click to toggle source
# File lib/paper_house/linker_options.rb, line 12 def ldflags @ldflags ||= [] [@ldflags].flatten.compact end
library_dependencies()
click to toggle source
List of libraries to link.
# File lib/paper_house/linker_options.rb, line 27 def library_dependencies @library_dependencies ||= [] [@library_dependencies].flatten.compact end
library_dependencies=(name)
click to toggle source
List of libraries to link.
# File lib/paper_house/linker_options.rb, line 20 def library_dependencies=(name) @library_dependencies = [name].flatten.compact end
Private Instance Methods
enhance(library_task)
click to toggle source
# File lib/paper_house/linker_options.rb, line 45 def enhance(library_task) @library_dependencies ||= [] @library_dependencies |= [library_task.lname] Rake::Task[target_path].enhance [library_task.target_path] end
find_prerequisites(task, klass_list)
click to toggle source
# File lib/paper_house/linker_options.rb, line 34 def find_prerequisites(task, klass_list) klass_list.each do |klass| maybe_enhance task, klass end end
l_options()
click to toggle source
# File lib/paper_house/linker_options.rb, line 51 def l_options library_dependencies.map do |each| "-l#{each}" end end
maybe_enhance(name, klass)
click to toggle source
# File lib/paper_house/linker_options.rb, line 40 def maybe_enhance(name, klass) task = klass.find_by_name(name) enhance task if task end