Sha256: ddbc9659d8379dccceba8cd460129c5cbac0346cafb00a1faa0df1308fbc0a5c

Contents?: true

Size: 941 Bytes

Versions: 3

Compression:

Stored size: 941 Bytes

Contents

require 'mkmf'
require 'numo/narray'
require 'erb'

$LOAD_PATH.each do |x|
  if File.exist? File.join(x,'numo/numo/narray.h')
    $INCFLAGS = "-I#{x}/numo " + $INCFLAGS
    break
  end
end

srcs = %w(
lapack
lapack_s
lapack_d
lapack_c
lapack_z
)
$objs = srcs.collect{|i| i+".o"}

if !have_header('numo/narray.h')
  puts "
  Header numo/narray.h was not found. Give pathname as follows:
  % ruby extconf.rb --with-narray-include=narray_h_dir"
  exit(1)
end

if have_header("dlfcn.h")
  exit(1) unless have_library("dl")
  exit(1) unless have_func("dlopen")
elsif have_header("windows.h")
  exit(1) unless have_func("LoadLibrary")
end

dep_path = File.join(__dir__, "depend")
File.open(dep_path, "w") do |dep|
  dep_erb_path = File.join(__dir__, "depend.erb")
  File.open(dep_erb_path, "r") do |dep_erb|
    erb = ERB.new(dep_erb.read)
    erb.filename = dep_erb_path
    dep.print(erb.result)
  end
end

create_makefile('numo/linalg/lapack')

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
numo-linalg-0.1.1 ext/numo/linalg/lapack/extconf.rb
numo-linalg-0.1.0 ext/numo/linalg/lapack/extconf.rb
numo-linalg-0.0.1 ext/numo/linalg/lapack/extconf.rb