1 MRuby::Build.new do |conf|
3 # Gets set by the VS command prompts.
4 if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
12 # include the default GEMs
17 # Cross Compiling configuration for RX630
18 # http://gadget.renesas.com/
20 # Requires gnurx_v14.03
21 MRuby::CrossBuild.new("RX630") do |conf|
25 BIN_PATH = "/usr/share/gnurx_v14.03_elf-1/bin"
28 cc.command = "#{BIN_PATH}/rx-elf-gcc"
29 cc.flags = "-Wall -g -O2 -flto -mcpu=rx600 -m64bit-doubles"
30 cc.compile_options = "%{flags} -o %{outfile} -c %{infile}"
32 #configuration for low memory environment
33 cc.defines << %w(MRB_USE_FLOAT)
34 cc.defines << %w(MRB_HEAP_PAGE_SIZE=64)
35 cc.defines << %w(KHASH_DEFAULT_SIZE=8)
36 cc.defines << %w(MRB_STR_BUF_MIN_SIZE=20)
37 cc.defines << %w(MRB_GC_STRESS)
38 cc.defines << %w(MRB_DISABLE_STDIO) #if you dont need stdio.
39 #cc.defines << %w(POOL_PAGE_SIZE=1000) #effective only for use with mruby-eval
43 cxx.command = conf.cc.command.dup
44 cxx.include_paths = conf.cc.include_paths.dup
45 cxx.flags = conf.cc.flags.dup
46 cxx.defines = conf.cc.defines.dup
47 cxx.compile_options = conf.cc.compile_options.dup
50 conf.linker do |linker|
51 linker.command="#{BIN_PATH}/rx-elf-ld"
54 conf.archiver do |archiver|
55 archiver.command = "#{BIN_PATH}/rx-elf-ar"
56 archiver.archive_options = 'rcs %{outfile} %{objs}'
62 #do not build executable test
63 conf.build_mrbtest_lib_only
65 #disable C++ exception
66 conf.disable_cxx_exception
69 conf.gem :core => "mruby-sprintf"
70 conf.gem :core => "mruby-print"
71 conf.gem :core => "mruby-math"
72 conf.gem :core => "mruby-enum-ext"
73 conf.gem :core => "mruby-numeric-ext"
75 #light-weight regular expression
76 #conf.gem :github => "masamitsu-murase/mruby-hs-regexp", :branch => "master"
79 #conf.gem :github =>"kyab/mruby-arduino", :branch => "master"