-# $Id: Rakefile 318 2005-04-26 11:11:48Z tilman $
+# $Id: Rakefile 319 2005-04-26 21:19:30Z tilman $
require "library"
require "rake/clean"
CLOBBER.include("src/*/*.{s,}o")
ext_libs = ["ecore", "ecore_evas", "ecore_job", "ecore_x"].map do |lib|
- Library.new(lib)
+ Library.new(lib, "src/#{lib}")
end
task :default => ext_libs.map { |l| l.so }
-# $Id: library.rb 318 2005-04-26 11:11:48Z tilman $
+# $Id: library.rb 319 2005-04-26 21:19:30Z tilman $
require "rbconfig"
class Library
PREFIX = ENV["ECORE_PREFIX"] || "/usr/local/"
- def initialize(name)
+ def initialize(name, dir)
@name = name
+ @dir = dir
end
def ldflags
end
def so
- "src/#{@name}/#{@name}.so"
+ "#{@dir}/#{@name}.so"
end
def objects
- Dir["src/#{@name}/*.c"].map { |f| f.sub(/\.[^.]+$/, ".o") }
+ Dir["#{@dir}/*.c"].map { |f| f.sub(/\.[^.]+$/, ".o") }
end
end