1 MRuby::Build.new do |conf|
2 # load specific toolchain settings
4 # Gets set by the VS command prompts.
5 if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
11 # Turn on `enable_debug` for better debugging
15 # conf.gem 'examples/mrbgems/ruby_extension_example'
16 # conf.gem 'examples/mrbgems/c_extension_example' do |g|
17 # g.cc.flags << '-g' # append cflags in this gem
19 # conf.gem 'examples/mrbgems/c_and_ruby_extension_example'
20 # conf.gem :core => 'mruby-eval'
21 # conf.gem :mgem => 'mruby-io'
22 # conf.gem :github => 'iij/mruby-io'
23 # conf.gem :git => 'git@github.com:iij/mruby-io.git', :branch => 'master', :options => '-v'
25 # include the default GEMs
29 # cc.command = ENV['CC'] || 'gcc'
30 # cc.flags = [ENV['CFLAGS'] || %w()]
31 # cc.include_paths = ["#{root}/include"]
33 # cc.option_include_path = '-I%s'
34 # cc.option_define = '-D%s'
35 # cc.compile_options = "%{flags} -MMD -o %{outfile} -c %{infile}"
40 # mrbc.compile_options = "-g -B%{funcname} -o-" # The -g option is required for line numbers
44 # conf.linker do |linker|
45 # linker.command = ENV['LD'] || 'gcc'
46 # linker.flags = [ENV['LDFLAGS'] || []]
47 # linker.flags_before_libraries = []
48 # linker.libraries = %w()
49 # linker.flags_after_libraries = []
50 # linker.library_paths = []
51 # linker.option_library = '-l%s'
52 # linker.option_library_path = '-L%s'
53 # linker.link_options = "%{flags} -o %{outfile} %{objs} %{libs}"
57 # conf.archiver do |archiver|
58 # archiver.command = ENV['AR'] || 'ar'
59 # archiver.archive_options = 'rs %{outfile} %{objs}'
62 # Parser generator settings
64 # yacc.command = ENV['YACC'] || 'bison'
65 # yacc.compile_options = '-o %{outfile} %{infile}'
69 # conf.gperf do |gperf|
70 # gperf.command = 'gperf'
71 # gperf.compile_options = '-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" %{infile} > %{outfile}'
77 # exts.executable = '' # '.exe' if Windows
82 # conf.file_separator = '/'
88 MRuby::Build.new('host-debug') do |conf|
89 # load specific toolchain settings
91 # Gets set by the VS command prompts.
92 if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
100 # include the default GEMs
101 conf.gembox 'default'
103 # C compiler settings
104 conf.cc.defines = %w(MRB_ENABLE_DEBUG_HOOK)
106 # Generate mruby debugger command (require mruby-eval)
107 conf.gem :core => "mruby-bin-debugger"
110 # conf.enable_bintest
113 MRuby::Build.new('test') do |conf|
114 # Gets set by the VS command prompts.
115 if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
125 conf.gembox 'default'
128 #MRuby::Build.new('bench') do |conf|
129 # # Gets set by the VS command prompts.
130 # if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
131 # toolchain :visualcpp
134 # conf.cc.flags << '-O3'
137 # conf.gembox 'default'
140 # Define cross build settings
141 # MRuby::CrossBuild.new('32bit') do |conf|
144 # conf.cc.flags << "-m32"
145 # conf.linker.flags << "-m32"
147 # conf.build_mrbtest_lib_only
149 # conf.gem 'examples/mrbgems/c_and_ruby_extension_example'
151 # conf.test_runner.command = 'env'