2012-01-31 16:52:08 -05:00
|
|
|
require 'mkmf'
|
2012-06-14 08:24:40 -04:00
|
|
|
require File.expand_path '../build', __FILE__
|
2012-01-31 16:52:08 -05:00
|
|
|
|
2012-06-14 08:24:40 -04:00
|
|
|
have_library('pthread')
|
2012-01-31 16:52:08 -05:00
|
|
|
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"
|
|
|
|
$CPPFLAGS += " -fPIC" unless $CPPFLAGS.split.include? "-rdynamic" or RUBY_PLATFORM =~ /darwin/
|
|
|
|
|
|
|
|
CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/
|
2012-05-03 03:22:10 -04:00
|
|
|
if CONFIG['warnflags']
|
|
|
|
CONFIG['warnflags'].gsub!('-Wdeclaration-after-statement', '')
|
|
|
|
CONFIG['warnflags'].gsub!('-Wimplicit-function-declaration', '')
|
|
|
|
end
|
2012-01-31 16:52:08 -05:00
|
|
|
|
2012-06-14 08:24:40 -04:00
|
|
|
if have_rubygem_libv8?
|
|
|
|
build_with_rubygem_libv8
|
|
|
|
else
|
|
|
|
build_with_system_libv8
|
|
|
|
end
|
|
|
|
|
2012-06-14 06:00:48 -04:00
|
|
|
create_makefile('v8/init')
|