File: mruby_core.rake

package info (click to toggle)
mruby 1.2.0%2B20161228%2Bgit30d5424a-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,792 kB
  • ctags: 4,125
  • sloc: ansic: 29,570; ruby: 13,100; yacc: 5,883; sh: 16; makefile: 12
file content (19 lines) | stat: -rw-r--r-- 673 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
MRuby.each_target do
  current_dir = File.dirname(__FILE__).relative_path_from(Dir.pwd)
  relative_from_root = File.dirname(__FILE__).relative_path_from(MRUBY_ROOT)
  current_build_dir = "#{build_dir}/#{relative_from_root}"

  objs = Dir.glob("#{current_dir}/*.c").map { |f|
    next nil if cxx_abi_enabled? and f =~ /(error|vm).c$/
    objfile(f.pathmap("#{current_build_dir}/%n"))
  }.compact

  if cxx_abi_enabled?
    objs += %w(vm error).map { |v| compile_as_cxx "#{current_dir}/#{v}.c", "#{current_build_dir}/#{v}.cxx" }
  end
  self.libmruby << objs

  file libfile("#{build_dir}/lib/libmruby_core") => objs do |t|
    archiver.run t.name, t.prerequisites
  end
end