1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00
therubyracer/ext/v8/extconf.rb

26 lines
606 B
Ruby
Raw Normal View History

2009-10-01 22:17:06 -04:00
require 'mkmf'
require 'set'
begin
require 'libv8'
rescue LoadError
require 'rubygems'
require 'libv8'
end
2009-10-01 22:17:06 -04:00
2011-05-27 13:37:02 -04:00
puts "Compiling The Ruby Racer..."
2011-05-27 13:37:02 -04:00
find_header('v8.h', Libv8.include_path)
have_library('pthread')
have_library('objc') if RUBY_PLATFORM =~ /darwin/
$CPPFLAGS += " -Wall" unless $CPPFLAGS.split.include? "-Wall"
$CPPFLAGS += " -g" unless $CPPFLAGS.split.include? "-g"
$CPPFLAGS += " -rdynamic" unless $CPPFLAGS.split.include? "-rdynamic"
2011-05-27 13:37:02 -04:00
$DEFLIBPATH.unshift(Libv8.library_path)
2010-06-02 06:05:32 -04:00
$LIBS << ' -lv8'
CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/
2010-02-16 00:12:34 -05:00
create_makefile('v8')