Sha256: 76ee4bb87ddc94dba858db4031629ab7f5d45ffc71886cc21adbbf5944d9588d

Contents?: true

Size: 1.19 KB

Versions: 14

Compression:

Stored size: 1.19 KB

Contents

require 'mkmf'
require 'rbconfig'

extension_name = 'oj'
dir_config(extension_name)

parts = RUBY_DESCRIPTION.split(' ')
type = parts[0]
type = type[4..-1] if type.start_with?('tcs-')
is_windows = RbConfig::CONFIG['host_os'] =~ /(mingw|mswin)/
platform = RUBY_PLATFORM
version = RUBY_VERSION.split('.')
puts ">>>>> Creating Makefile for #{type} version #{RUBY_VERSION} on #{platform} <<<<<"

dflags = {
  'RUBY_TYPE' => type,
  (type.upcase + '_RUBY') => nil,
  'RUBY_VERSION' => RUBY_VERSION,
  'RUBY_VERSION_MAJOR' => version[0],
  'RUBY_VERSION_MINOR' => version[1],
  'RUBY_VERSION_MICRO' => version[2],
  'IS_WINDOWS' => is_windows ? 1 : 0,
  'RSTRUCT_LEN_RETURNS_INTEGER_OBJECT' => ('ruby' == type && '2' == version[0] && '4' == version[1] && '1' >= version[2]) ? 1 : 0,
}

have_func('rb_time_timespec')
have_func('rb_ivar_count')
have_func('rb_ivar_foreach')
have_func('stpcpy')
have_func('rb_data_object_wrap')

dflags['OJ_DEBUG'] = true unless ENV['OJ_DEBUG'].nil?

dflags.each do |k,v|
  if v.nil?
    $CPPFLAGS += " -D#{k}"
  else
    $CPPFLAGS += " -D#{k}=#{v}"
  end
end

$CPPFLAGS += ' -Wall'
#puts "*** $CPPFLAGS: #{$CPPFLAGS}"

create_makefile(File.join(extension_name, extension_name))

%x{make clean}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
oj-3.8.1 ext/oj/extconf.rb
oj-3.8.0 ext/oj/extconf.rb
oj-3.7.12 ext/oj/extconf.rb
oj-3.7.11 ext/oj/extconf.rb
oj-3.7.10 ext/oj/extconf.rb
oj-3.7.9 ext/oj/extconf.rb
oj-3.7.8 ext/oj/extconf.rb
oj-3.7.7 ext/oj/extconf.rb
oj-3.7.6 ext/oj/extconf.rb
oj-3.7.5 ext/oj/extconf.rb
oj-3.7.4 ext/oj/extconf.rb
oj-3.7.3 ext/oj/extconf.rb
oj-3.7.2 ext/oj/extconf.rb
oj-3.7.1 ext/oj/extconf.rb