module Hoe::Compiler

def activate_compiler_deps

def activate_compiler_deps
  dependency "rake-compiler", "~> 0.7", :development
  gem "rake-compiler", "~> 0.7"
end

def define_compiler_tasks

def define_compiler_tasks
  require "rake/extensiontask"
  Rake::ExtensionTask.new self.name, spec do |ext|
    ext.lib_dir = File.join(*["lib", self.name, ENV["FAT_DIR"]].compact)
  end
  compile_tasks.each do |t|
    task t => :compile
  end
end

def initialize_compiler

def initialize_compiler
  self.compile_tasks = [:multi, :test, :check_manifest]
  self.spec_extras   = { :extensions => ["ext/#{self.name}/extconf.rb"] }
  clean_globs << "lib/#{self.name}/*.{so,bundle,dll}"
end