class PaperHouse::RubyExtensionTask

Compiles *.c files into a Ruby extension library.

Attributes

library_name[W]

Name of target library.

Public Instance Methods

library_dependencies() click to toggle source

List of libraries to link.

# File lib/paper_house/ruby_extension_task.rb, line 23
def library_dependencies
  MAC ? ([@library_dependencies] << 'ruby').flatten.compact : super
end
target_file_name() click to toggle source

Name of target library file.

# File lib/paper_house/ruby_extension_task.rb, line 18
def target_file_name
  library_name.to_s + SHARED_EXT
end

Private Instance Methods

cc_options() click to toggle source
# File lib/paper_house/ruby_extension_task.rb, line 29
def cc_options
  [LDSHARED, o_option, objects, ldflags, libdir_option, l_options].flatten
end
include_directories() click to toggle source
# File lib/paper_house/ruby_extension_task.rb, line 41
def include_directories
  (includes + auto_includes + RUBY_INCLUDES).uniq
end
libdir_option() click to toggle source
# File lib/paper_house/ruby_extension_task.rb, line 37
def libdir_option
  "-L#{RUBY_LIBDIR}"
end
o_option() click to toggle source
# File lib/paper_house/ruby_extension_task.rb, line 33
def o_option
  "-o #{target_path}"
end