X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=Rakefile;h=fcb465420711f0bf481aa88eb38dbcfb64b03391;hb=4f7cb64bdabb4d2c060644301bacf3fd3f46f053;hp=cc83c7f029672d1338198102b6fc32077e69178a;hpb=c734b73a56afdc7bcb59d339e554e37d2506243e;p=ruby-ecore.git diff --git a/Rakefile b/Rakefile index cc83c7f..fcb4654 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,4 @@ -# $Id: Rakefile 318 2005-04-26 11:11:48Z tilman $ +# $Id: Rakefile 338 2005-05-07 11:01:57Z tilman $ require "library" require "rake/clean" @@ -11,31 +11,29 @@ require "rake/contrib/sshpublisher" CLOBBER.include("src/*/*.{s,}o") ext_libs = ["ecore", "ecore_evas", "ecore_job", "ecore_x"].map do |lib| - Library.new(lib) + Library.new(lib, ENV["ECORE_PREFIX"] || "/usr/local", "src/#{lib}") end task :default => ext_libs.map { |l| l.so } ext_libs.each do |lib| file lib.so => lib.objects do |t| - sh "cc #{lib.ldflags} -shared -Wl " + - "-L #{Config::CONFIG['libdir']} " + - Config::CONFIG["LIBRUBYARG_SHARED"] + - " #{t.prerequisites.join(" ")} -o #{t.name}" + sh "cc #{lib.ldflags} #{t.prerequisites.join(" ")} -o #{t.name}" end lib.objects.each do |object| file object => object.sub(/\.[^.]+$/, ".c") do |t| - source = t.prerequisites.first - sh "cc #{lib.cflags} -fPIC #{source} -c -o #{t.name}" + sh "cc #{lib.cflags} #{t.prerequisites.first} " + + "-c -o #{t.name}" end end end task :install => ext_libs.map { |l| l.so } do |t| destdir = "#{ENV["DESTDIR"]}" + sitearchdir = ENV["RUBYARCHDIR"] || Config::CONFIG['sitearchdir'] - FileUtils::Verbose.install(t.prerequisites, destdir + sitearchdir, + FileUtils::Verbose.install(t.prerequisites.to_a, destdir + sitearchdir, :mode => 0755) ddir = destdir + sitearchdir + "/ecore"