X-Git-Url: http://git.code-monkey.de/?p=ruby-esmart.git;a=blobdiff_plain;f=library.rb;fp=library.rb;h=0000000000000000000000000000000000000000;hp=21edae16118dba9593eea4d4e9d0716a1e09ceca;hb=0ca950a97b7bdff5a7d13b318e3c896794cdf860;hpb=dccedf9d07ab5273aa158c7216cc488b839b549d diff --git a/library.rb b/library.rb deleted file mode 100644 index 21edae1..0000000 --- a/library.rb +++ /dev/null @@ -1,33 +0,0 @@ -require "rbconfig" - -class Library - def initialize(name, prefix, dir, lib = name) - @name = name - @prefix = prefix - @dir = dir - @lib = lib - end - - def ldflags - s = "#{ENV["LDFLAGS"]} -L #{@prefix}/lib -L " + - Config::CONFIG["libdir"] + " " + - Config::CONFIG["LIBRUBYARG_SHARED"] + - " -shared -Wl" - s << " -l#{@lib}" unless @lib.nil? - s - end - - def cflags - "#{ENV["CFLAGS"]} -I #{@prefix}/include " + - "-I #{Config::CONFIG['archdir']} " + - "-I #{Config::CONFIG['sitearchdir']} -fPIC" - end - - def so - "#{@dir}/#{@name}.so" - end - - def objects - Dir["#{@dir}/*.c"].map { |f| f.sub(/\.[^.]+$/, ".o") } - end -end