Rakefile 689 B

12345678910111213141516171819202122232425262728293031
  1. require "rubygems"
  2. require "rake/extensiontask"
  3. current_dir = File.dirname(__FILE__)
  4. src_dir = current_dir + "/ext/rtruckboris"
  5. swig_dir = current_dir + "/swig"
  6. task :swig do
  7. puts "==> Generate the rtruckboris.cpp file with swig"
  8. sh "swig -c++ -ruby -o #{src_dir}/rtruckboris.cpp #{swig_dir}/rtruckboris.i"
  9. sh "ruby #{swig_dir}/swigCppFileGen.rb"
  10. end
  11. task :compile => :swig do
  12. puts "Compile time!! bitch..."
  13. end
  14. task :default => [:compile]
  15. spec = Gem::Specification.load('rtruckboris.gemspec')
  16. #Gem::PackageTask.new(spec) do |pkg|
  17. #end
  18. # feed the ExtensionTask with your spec
  19. Rake::ExtensionTask::new("rtruckboris", spec) do |ext|
  20. ext.lib_dir = "lib/rtruckboris"
  21. end