Sha256: ffe83c20bdfa197d5efa31522016079668907c72457ba412b1558319b0b5797f

Contents?: true

Size: 660 Bytes

Versions: 1

Compression:

Stored size: 660 Bytes

Contents

require "mkmf"
require "fileutils"

File.delete('cpu.c') if File.exists?('cpu.c')

case RUBY_PLATFORM
   when /hpux/i
      FileUtils.cp("hpux/hpux.c", "cpu.c")
   when /sunos|solaris/i
      FileUtils.cp("sunos/sunos.c", "cpu.c")
      unless have_func("getloadavg")
         have_library("kstat")
      end
   when /bsd|darwin/i
      FileUtils.cp("bsd/bsd.c", "cpu.c")
      have_func("sysctlbyname")
      have_library("kvm")
   when /linux|dos|windows|win32|mingw|cygwin/i
      STDERR.puts "Run 'ruby install.rb' instead for this platform"
   else
      STDERR.puts "This platform is not currently supported.  Exiting..."
end

create_makefile("sys/cpu")

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sys-cpu-0.6.0 ext/extconf.rb