mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
13 lines
418 B
Ruby
13 lines
418 B
Ruby
dir = File.dirname(__FILE__).sub(%r|^\./|, '')
|
|
|
|
MRuby.each_target do
|
|
if bins.select { |s| s.to_s == 'mruby' }
|
|
exec = exefile("#{build_dir}/bin/mruby")
|
|
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_ldflags }, gems.map { |g| g.mruby_libs }
|
|
end
|
|
end
|
|
end
|