-# $Id: Rakefile 41 2005-05-19 19:18:21Z tilman $
+# $Id: Rakefile 55 2005-06-02 20:16:44Z tilman $
require "rbconfig"
require "rake/clean"
PKG_VERSION = File.read("lib/eet.rb").
match(/^\s*VERSION = \"(.*)\"\s$/).captures.first
+cc = ENV["CC"] || "cc"
ext_obj = "ext/ext.o"
ext_lib = "ext/eet_ext.so"
cflags = "#{ENV["CFLAGS"]} #{`eet-config --cflags`.strip} " +
"-I#{archdir}"
- sh "cc #{cflags} -fPIC #{t.source} -c -o #{t.name}"
+ sh "#{cc} #{cflags} -fPIC #{t.source} -c -o #{t.name}"
end
file ext_lib => ext_obj do |t|
ldflags = "#{ENV["LDFLAGS"]} #{`eet-config --libs`.strip} " +
"-L#{libdir} #{rubylib}"
- sh "cc #{ldflags} -shared -Wl #{t.prerequisites.join(" ")} " +
+ sh "#{cc} #{ldflags} -shared -Wl #{t.prerequisites.join(" ")} " +
"-o #{t.name}"
end