Sha256: d5ee8decdbf4ae4bf2637ba7040f78e6c7b62b898a23ad891cd28f7f0cfb92db

Contents?: true

Size: 875 Bytes

Versions: 3

Compression:

Stored size: 875 Bytes

Contents

require 'rbconfig'
require File.expand_path '../arch', __FILE__

module Libv8
  module Paths
    module_function

    def include_paths
      ["#{vendored_source_path}/include"]
    end

    def object_paths
      [libv8_object(:base), libv8_object(:snapshot)]
    end

    def config
      RbConfig::MAKEFILE_CONFIG
    end

    def libv8_object(name)
      filename = "#{libv8_profile}/libv8_#{name}.#{config['LIBEXT']}"
      unless File.exist? filename
        filename = "#{libv8_profile}/obj.target/tools/gyp/libv8_#{name}.#{config['LIBEXT']}"
      end
      return filename
    end

    def libv8_profile
      base = "#{vendored_source_path}/out/#{Libv8::Arch.libv8_arch}"
      debug = "#{base}.debug"
      File.exist?(debug) ? debug : "#{base}.release"
    end

    def vendored_source_path
      File.expand_path "../../../vendor/v8", __FILE__
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
libv8-3.16.14.8.rc1-armv7l-linux ext/libv8/paths.rb
libv8-3.16.14.8.rc1 ext/libv8/paths.rb
libv8-3.16.14.7-arm-linux ext/libv8/paths.rb