2011-05-24 14:17:58 -04:00
|
|
|
require 'libv8/version'
|
|
|
|
|
|
|
|
module Libv8
|
2012-04-25 23:46:30 -04:00
|
|
|
|
|
|
|
module_function
|
|
|
|
|
|
|
|
def libv8(name)
|
2012-04-26 11:28:27 -04:00
|
|
|
path = File.expand_path "../../vendor/v8/out/native/libv8_#{name}.a", __FILE__
|
|
|
|
if File.exists? path
|
|
|
|
path
|
|
|
|
else
|
|
|
|
File.expand_path "../../vendor/v8/out/native/obj.target/tools/gyp/libv8_#{name}.a", __FILE__
|
|
|
|
end
|
2012-04-25 23:46:30 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def libv8_base
|
|
|
|
libv8 :base
|
|
|
|
end
|
|
|
|
|
|
|
|
def libv8_snapshot
|
|
|
|
libv8 :snapshot
|
|
|
|
end
|
|
|
|
|
|
|
|
def libv8_nosnapshot
|
|
|
|
libv8 :nosnapshot
|
|
|
|
end
|
|
|
|
|
|
|
|
def libv8_ldflags
|
|
|
|
"-l#{libv8_base} -l#{libv8_snapshot}"
|
2011-05-24 14:17:58 -04:00
|
|
|
end
|
|
|
|
end
|