Sha256: 007803ae00e094b1646d995614474803b917937f12f525756f1c28e31eccf376

Contents?: true

Size: 845 Bytes

Versions: 4

Compression:

Stored size: 845 Bytes

Contents

require 'mkmf-rice'

QUARRY_H      = 'quarry.h'
MARKER        = 'mkmf_marker'
quarry_dir    = File.join(File.dirname(__FILE__), '..', 'lib', 'quarry')
quarry_obj    = File.join(quarry_dir, 'obj')
quarry_src    = File.join(quarry_dir, 'src')
quarry_header = File.join(quarry_src, QUARRY_H)

# compile quarry as a static lib
Dir.chdir(quarry_dir) do
  if RUBY_PLATFORM =~ /darwin/
    puts "Compiling quarry (OS X mode)"
    `make -f Makefile.osx clean`
    `make -f Makefile.osx`
  else
    puts "Compiling quarry (linux mode)"
    `make -f Makefile.linux clean`
    `make -f Makefile.linux`
  end
end

# the cflags are required to make mkmf compile in c++ mode
with_cflags("-x c++") do
  find_header(QUARRY_H, quarry_src)
  $LIBPATH << quarry_obj
  have_library('quarry', MARKER, quarry_header)
  create_makefile('quarry_toolkit', 'quarry')
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
thera-0.0.4 ext/extconf.rb
thera-0.0.3 ext/extconf.rb
thera-0.0.2 ext/extconf.rb
thera-0.0.1 ext/extconf.rb