summaryrefslogtreecommitdiffhomepage
path: root/tools/mirb/mirb.rake
blob: 045f6ab906322bae38218121906a0313ba54d4ae (plain)
1
2
3
4
5
6
7
8
9
10
dir = File.dirname(__FILE__).sub(%r|^\./|, '')

MRuby.each_target do
  exec = exefile("#{build_dir}/bin/mirb")
  objs = Dir.glob("#{dir}/*.{c}").map { |f| f.pathmap("#{build_dir}/%X.o") }

  file exec => objs + ["#{build_dir}/lib/libmruby.a"] do |t|
    link t.name, t.prerequisites, [], gems.map { |g| g.mruby_libs }
  end
end