Sha256: 7738447eaf68028fd361a7c114eaa2ffd19d5023ad196266ecca9da720f90d2e

Contents?: true

Size: 571 Bytes

Versions: 11

Compression:

Stored size: 571 Bytes

Contents

require "mkmf"

def run(command)
  puts ">> #{command}"
  unless system(command)
    raise "Command failed"
  end
end

def inreplace(file, pattern, replacement)
  contents = File.read(file)
  File.write(file, contents.gsub(pattern, replacement))
end

arch = RbConfig::CONFIG["arch"]
puts "Arch: #{arch}"

scs = File.expand_path("../../vendor/scs", __dir__)
Dir.chdir(scs) do
  case arch
  when /mingw/
    inreplace("scs.mk", "USE_LAPACK = 1", "USE_LAPACK = 0")
    run "ridk exec make"
  else
    run "make"
  end
end

File.write("Makefile", dummy_makefile("scs").join)

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
scs-0.5.0 ext/scs/extconf.rb
scs-0.4.3 ext/scs/extconf.rb
scs-0.4.2 ext/scs/extconf.rb
scs-0.4.1 ext/scs/extconf.rb
scs-0.4.0 ext/scs/extconf.rb
scs-0.3.2 ext/scs/extconf.rb
scs-0.3.1 ext/scs/extconf.rb
scs-0.3.0 ext/scs/extconf.rb
scs-0.2.3 ext/scs/extconf.rb
scs-0.2.2 ext/scs/extconf.rb
scs-0.2.1 ext/scs/extconf.rb