Improved build scripts and config files

This commit is contained in:
Yuichiro MASUI
2013-01-20 22:48:42 +09:00
parent 583983385b
commit ced80d2b4b
25 changed files with 792 additions and 521 deletions
+10 -7
View File
@@ -1,12 +1,15 @@
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") }
dir = File.dirname(__FILE__).relative_path_from(root)
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 }
if bins.find { |s| s.to_s == 'mruby' }
exec = exefile("#{build_dir}/bin/mruby")
objs = Dir.glob("#{dir}/*.c").map { |f| objfile(f.pathmap("#{build_dir}/%X")) }
file exec => objs + [libfile("#{build_dir}/lib/libmruby")] do |t|
gem_flags = gems.map { |g| g.linker.flags }
gem_libraries = gems.map { |g| g.linker.libraries }
gem_library_paths = gems.map { |g| g.linker.library_paths }
linker.run t.name, t.prerequisites, gem_libraries, gem_library_paths, gem_flags
end
end
end