2018-12-05 06:30:24 -05:00
|
|
|
# frozen_string_literal: false
|
|
|
|
require 'mkmf'
|
|
|
|
|
|
|
|
checking_for(checking_message("Windows")) do
|
|
|
|
case RUBY_PLATFORM
|
|
|
|
when /cygwin|mingw/
|
2018-12-26 03:17:30 -05:00
|
|
|
if ARGV.include?('-rdevkit') # check `rake -rdevkit compile` case
|
2018-12-05 06:30:24 -05:00
|
|
|
base_dir = File.expand_path('../../../..', __FILE__)
|
|
|
|
build_dir = File.join(base_dir, "tmp", RUBY_PLATFORM, "bigdecimal", RUBY_VERSION, "")
|
2018-12-26 03:17:30 -05:00
|
|
|
else
|
|
|
|
build_dir = "$(TARGET_SO_DIR)../"
|
2018-12-05 06:30:24 -05:00
|
|
|
end
|
|
|
|
$libs << " #{build_dir}bigdecimal.so"
|
|
|
|
true
|
|
|
|
when /mswin/
|
|
|
|
$DLDFLAGS << " -libpath:.."
|
|
|
|
$libs << " bigdecimal-$(arch).lib"
|
|
|
|
true
|
|
|
|
else
|
|
|
|
false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
create_makefile('bigdecimal/util')
|