diff options
author | Lars Kanis <kanis@comcard.de> | 2013-04-02 15:42:34 +0200 |
---|---|---|
committer | Lars Kanis <kanis@comcard.de> | 2013-04-02 15:42:34 +0200 |
commit | 5b018eb1c1261092f89e7e6a4523aee453a738b8 (patch) | |
tree | 7c7c90e42405d33f630c65803c5aff0d6398f7a2 /Rakefile | |
parent | b517696fb2f5cb91475ba5ad93594ea20b555ced (diff) | |
download | ffi-5b018eb1c1261092f89e7e6a4523aee453a738b8.tar.gz |
Add x64-mingw32 target to win32 cross compilation tasks.
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -200,15 +200,16 @@ if USE_RAKE_COMPILER # ext.lib_dir = BUILD_DIR # put binaries into this folder. ext.tmp_dir = BUILD_DIR # temporary folder used during compilation. ext.cross_compile = true # enable cross compilation (requires cross compile toolchain) - ext.cross_platform = 'i386-mingw32' # forces the Windows platform instead of the default one + ext.cross_platform = ['i386-mingw32', 'x64-mingw32'] # forces the Windows platform instead of the default one end - task 'copy:ffi_c:i386-mingw32:1.9.3' do |t| - sh "i686-w64-mingw32-strip -S lib/1.9/ffi_c.so" - end - - task 'copy:ffi_c:i386-mingw32:2.0.0' do |t| - sh "i686-w64-mingw32-strip -S lib/2.0/ffi_c.so" + ENV['RUBY_CC_VERSION'].to_s.split(':').each do |ruby_version| + task "copy:ffi_c:i386-mingw32:#{ruby_version}" do |t| + sh "i686-w64-mingw32-strip -S build/i386-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so" + end + task "copy:ffi_c:x64-mingw32:#{ruby_version}" do |t| + sh "x86_64-w64-mingw32-strip -S build/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so" + end end end |