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']
14 # conf.gem 'examples/mrbgems/ruby_extension_example'
15 # conf.gem 'examples/mrbgems/c_extension_example' do |g|
16 # g.cc.flags << '-g' # append cflags in this gem
18 # conf.gem 'examples/mrbgems/c_and_ruby_extension_example'
19 # conf.gem :core => 'mruby-eval'
20 # conf.gem :mgem => 'mruby-io'
21 # conf.gem :github => 'iij/mruby-io'
22 # conf.gem :git => '
[email protected]:iij/mruby-io.git', :branch => 'master', :options => '-v'
24 # include the default GEMs
28 # cc.command = ENV['CC'] || 'gcc'
29 # cc.flags = [ENV['CFLAGS'] || %w()]
30 # cc.include_paths = ["#{root}/include"]
31 # cc.defines = %w(DISABLE_GEMS)
32 # cc.option_include_path = '-I%s'
33 # cc.option_define = '-D%s'
34 # cc.compile_options = "%{flags} -MMD -o %{outfile} -c %{infile}"
39 # mrbc.compile_options = "-g -B%{funcname} -o-" # The -g option is required for line numbers
43 # conf.linker do |linker|
44 # linker.command = ENV['LD'] || 'gcc'
45 # linker.flags = [ENV['LDFLAGS'] || []]
46 # linker.flags_before_libraries = []
47 # linker.libraries = %w()
48 # linker.flags_after_libraries = []
49 # linker.library_paths = []
50 # linker.option_library = '-l%s'
51 # linker.option_library_path = '-L%s'
52 # linker.link_options = "%{flags} -o %{outfile} %{objs} %{libs}"
56 # conf.archiver do |archiver|
57 # archiver.command = ENV['AR'] || 'ar'
58 # archiver.archive_options = 'rs %{outfile} %{objs}'
61 # Parser generator settings
63 # yacc.command = ENV['YACC'] || 'bison'
64 # yacc.compile_options = '-o %{outfile} %{infile}'
68 # conf.gperf do |gperf|
69 # gperf.command = 'gperf'
70 # gperf.compile_options = '-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" %{infile} > %{outfile}'
76 # exts.executable = '' # '.exe' if Windows
81 # conf.file_separator = '/'
87 MRuby::Build.new('host-debug') do |conf|
88 # load specific toolchain settings
90 # Gets set by the VS command prompts.
91 if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
99 # include the default GEMs
100 conf.gembox 'default'
102 # C compiler settings
103 conf.cc.defines = %w(MRB_ENABLE_DEBUG_HOOK)
105 # Generate mruby debugger command (require mruby-eval)
106 conf.gem :core => "mruby-bin-debugger"
109 # conf.enable_bintest
112 MRuby::Build.new('test') do |conf|
113 # Gets set by the VS command prompts.
114 if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
124 conf.gembox 'default'
127 #MRuby::Build.new('bench') do |conf|
128 # # Gets set by the VS command prompts.
129 # if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
130 # toolchain :visualcpp
133 # conf.cc.flags << '-O3'
136 # conf.gembox 'default'
139 # Define cross build settings
140 # MRuby::CrossBuild.new('32bit') do |conf|
143 # conf.cc.flags << "-m32"
144 # conf.linker.flags << "-m32"
146 # conf.build_mrbtest_lib_only
148 # conf.gem 'examples/mrbgems/c_and_ruby_extension_example'
150 # conf.test_runner.command = 'env'