2 file libmruby_static => libmruby_objs.flatten do |t|
3 archiver.run t.name, t.prerequisites
6 file "#{build_dir}/lib/libmruby.flags.mak" => [__FILE__, libmruby_static] do |t|
7 mkdir_p File.dirname t.name
8 open(t.name, 'w') do |f|
9 f.puts "MRUBY_CFLAGS = #{cc.all_flags}"
11 gem_flags = gems.map { |g| g.linker.flags }
12 gem_library_paths = gems.map { |g| g.linker.library_paths }
13 f.puts "MRUBY_LDFLAGS = #{linker.all_flags(gem_library_paths, gem_flags)} #{linker.option_library_path % "#{build_dir}/lib"}"
15 gem_flags_before_libraries = gems.map { |g| g.linker.flags_before_libraries }
16 f.puts "MRUBY_LDFLAGS_BEFORE_LIBS = #{[linker.flags_before_libraries, gem_flags_before_libraries].flatten.join(' ')}"
18 gem_libraries = gems.map { |g| g.linker.libraries }
19 f.puts "MRUBY_LIBS = #{linker.option_library % 'mruby'} #{linker.library_flags(gem_libraries)}"
21 f.puts "MRUBY_LIBMRUBY_PATH = #{libmruby_static}"
24 task :all => "#{build_dir}/lib/libmruby.flags.mak"