1 # $Id: library.rb 326 2005-04-27 14:25:18Z tilman $
6 def initialize(name, prefix, dir, lib = name)
14 s = "#{ENV["LDFLAGS"]} -L #{@prefix}/lib -L " +
15 Config::CONFIG["libdir"] + " " +
16 Config::CONFIG["LIBRUBYARG_SHARED"] +
18 s << " -l#{@lib}" unless @lib.nil?
23 "#{ENV["CFLAGS"]} -I #{@prefix}/include " +
24 "-I #{Config::CONFIG['archdir']} " +
25 "-I #{Config::CONFIG['sitearchdir']} -fPIC"
33 Dir["#{@dir}/*.c"].map { |f| f.sub(/\.[^.]+$/, ".o") }