Module: LibSqreen::Paths
- Defined in:
- ext/libsqreen/paths.rb
Class Method Summary collapse
- .config ⇒ Object
- .cpu ⇒ Object
- .header_files ⇒ Object
- .include_paths ⇒ Object
- .libname ⇒ Object
- .object_paths ⇒ Object
- .platform ⇒ Object
- .vendored_source_path ⇒ Object
Class Method Details
.config ⇒ Object
33 34 35 |
# File 'ext/libsqreen/paths.rb', line 33 def config RbConfig::MAKEFILE_CONFIG end |
.cpu ⇒ Object
41 42 43 |
# File 'ext/libsqreen/paths.rb', line 41 def cpu RUBY_PLATFORM =~ /^(universal\.|)(.*?)-/ && $2 end |
.header_files ⇒ Object
29 30 31 |
# File 'ext/libsqreen/paths.rb', line 29 def header_files ['waf.h'] end |
.include_paths ⇒ Object
11 12 13 |
# File 'ext/libsqreen/paths.rb', line 11 def include_paths [Shellwords.escape(File.join(vendored_source_path, 'libsqreen', 'include'))] end |
.libname ⇒ Object
45 46 47 |
# File 'ext/libsqreen/paths.rb', line 45 def libname "libsqreen.#{config['LIBEXT']}" end |
.object_paths ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'ext/libsqreen/paths.rb', line 15 def object_paths objects = [ File.join(vendored_source_path, 'libsqreen', cpu, platform, libname), ] return objects if platform == 'darwin' objects << File.join(vendored_source_path, 'libc++', cpu, platform, 'libc++.a') objects << File.join(vendored_source_path, 'libc++', cpu, platform, 'libc++abi.a') objects << File.join(vendored_source_path, 'libc++', cpu, platform, 'libunwind.a') objects end |
.platform ⇒ Object
37 38 39 |
# File 'ext/libsqreen/paths.rb', line 37 def platform RUBY_PLATFORM =~ /(solaris|darwin|linux(?=-.*$)|linux$)/ && $1 end |
.vendored_source_path ⇒ Object
49 50 51 |
# File 'ext/libsqreen/paths.rb', line 49 def vendored_source_path File.('../../../vendor', __FILE__) end |