Class: PaperHouse::RubyExtensionTask

Inherits:
LibraryTask show all
Includes:
LinkerOptions, Platform
Defined in:
lib/paper_house/ruby_extension_task.rb

Overview

Compiles *.c files into a Ruby extension library.

Constant Summary

Constants included from Platform

Platform::LDSHARED, Platform::MAC, Platform::RUBY_INCLUDES, Platform::RUBY_LIBDIR, Platform::SHARED_EXT, Platform::SONAME_OPTION

Instance Attribute Summary collapse

Attributes included from LinkerOptions

#ldflags

Attributes inherited from BuildTask

#cc, #name, #target_directory

Attributes included from CcOptions

#cflags, #includes, #sources

Instance Method Summary collapse

Methods included from Platform

name

Methods included from LinkerOptions

#library_dependencies=

Methods inherited from LibraryTask

find_by_name, #initialize, #library_name, #lname

Methods inherited from BuildTask

#initialize, #target_path

Constructor Details

This class inherits a constructor from PaperHouse::LibraryTask

Instance Attribute Details

#library_name=(value) ⇒ Object (writeonly)

Name of target library.


15
16
17
# File 'lib/paper_house/ruby_extension_task.rb', line 15

def library_name=(value)
  @library_name = value
end

Instance Method Details

#library_dependenciesObject

List of libraries to link.


23
24
25
# File 'lib/paper_house/ruby_extension_task.rb', line 23

def library_dependencies
  MAC ? ([@library_dependencies] << 'ruby').flatten.compact : super
end

#target_file_nameObject

Name of target library file.


18
19
20
# File 'lib/paper_house/ruby_extension_task.rb', line 18

def target_file_name
  library_name.to_s + SHARED_EXT
end