File: Rakefile

package info (click to toggle)
ruby-unf-ext 0.0.7.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 5,472 kB
  • sloc: cpp: 14,118; lisp: 1,180; ruby: 94; makefile: 4
file content (31 lines) | stat: -rw-r--r-- 746 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- coding: utf-8 -*-
require 'bundler/gem_tasks'

gemspec = Bundler::GemHelper.gemspec

require 'rake/extensiontask'
Rake::ExtensionTask.new('unf_ext', gemspec) do |ext|
  ext.cross_compile = true
  ext.cross_platform = %w[x86-mingw32 x64-mingw32]
  ext.cross_config_options << '--with-ldflags="-static-libgcc"' << '--with-static-libstdc++'
end

namespace :gem do
  task :native do
    require 'rake_compiler_dock'
    RakeCompilerDock.sh "(bundle --local --quiet || bundle) && rake cross native gem"
  end

  task :all => [:build, :native]
end

task :gems => :'gem:all'

require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
  test.libs << 'test'
  test.test_files = gemspec.test_files
  test.verbose = true
end

task :default => :test