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

put the built v8 at the front of the linker path in case we have a system wide copy of libv8

This commit is contained in:
Charles Lowell 2010-06-02 11:55:54 +03:00
parent a312182d47
commit c81ea28856

View file

@ -1,4 +1,5 @@
require 'mkmf'
require 'set'
UPSTREAM = File.expand_path(File.dirname(__FILE__) + "/upstream")
BUILD = "#{UPSTREAM}/build/v8"
@ -8,8 +9,7 @@ puts "Compiling V8"
system("cd #{UPSTREAM} && make") or raise "Error compiling V8"
dir_config('v8', "#{BUILD}/include", "#{BUILD}")
have_library('v8') or raise "Unable to find libv8 in #{BUILD}, was there an error compiling it?"
find_header('v8.h', "#{BUILD}/include")
have_library('pthread')
have_library('objc') if RUBY_PLATFORM =~ /darwin/
@ -17,6 +17,9 @@ $CPPFLAGS += " -Wall" unless $CPPFLAGS.split.include? "-Wall"
$CPPFLAGS += " -g" unless $CPPFLAGS.split.include? "-g"
$CPPFLAGS += " -rdynamic" unless $CPPFLAGS.split.include? "-rdynamic"
$DEFLIBPATH.unshift(BUILD)
$LIBS << '-lv8'
CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/
create_makefile('v8')