Added conf.bins for defining bulding binaries

This commit is contained in:
Yuichiro MASUI
2013-01-09 22:40:08 +09:00
parent eab894e5be
commit 33350251ae
7 changed files with 39 additions and 31 deletions
+6 -4
View File
@@ -1,10 +1,12 @@
dir = File.dirname(__FILE__).sub(%r|^\./|, '')
MRuby.each_target do
exec = exefile("#{build_dir}/bin/mruby")
objs = Dir.glob("#{dir}/*.{c}").map { |f| f.pathmap("#{build_dir}/%X.o") }
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 }
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