| 1 |
MRuby::Build.new do |conf| |
| 2 |
# load specific toolchain settings |
| 3 |
conf.toolchain |
| 4 |
|
| 5 |
# Use mrbgems |
| 6 |
# conf.gem 'examples/mrbgems/ruby_extension_example' |
| 7 |
# conf.gem 'examples/mrbgems/c_extension_example' do |g| |
| 8 |
# g.cc.flags << '-g' # append cflags in this gem |
| 9 |
# end |
| 10 |
# conf.gem 'examples/mrbgems/c_and_ruby_extension_example' |
| 11 |
# conf.gem :core => 'mruby-eval' |
| 12 |
# conf.gem :mgem => 'mruby-onig-regexp' |
| 13 |
# conf.gem :github => 'mattn/mruby-onig-regexp' |
| 14 |
# conf.gem :git => '[email protected]:mattn/mruby-onig-regexp.git', :branch => 'master', :options => '-v' |
| 15 |
|
| 16 |
# include the GEM box |
| 17 |
conf.gembox 'default' |
| 18 |
|
| 19 |
# C compiler settings |
| 20 |
# conf.cc do |cc| |
| 21 |
# cc.command = ENV['CC'] || 'gcc' |
| 22 |
# cc.flags = [ENV['CFLAGS'] || %w()] |
| 23 |
# cc.include_paths = ["#{root}/include"] |
| 24 |
# cc.defines = %w() |
| 25 |
# cc.option_include_path = %q[-I"%s"] |
| 26 |
# cc.option_define = '-D%s' |
| 27 |
# cc.compile_options = %Q[%{flags} -MMD -o "%{outfile}" -c "%{infile}"] |
| 28 |
# end |
| 29 |
|
| 30 |
# mrbc settings |
| 31 |
# conf.mrbc do |mrbc| |
| 32 |
# mrbc.compile_options = "-g -B%{funcname} -o-" # The -g option is required for line numbers |
| 33 |
# end |
| 34 |
|
| 35 |
# Linker settings |
| 36 |
# conf.linker do |linker| |
| 37 |
# linker.command = ENV['LD'] || 'gcc' |
| 38 |
# linker.flags = [ENV['LDFLAGS'] || []] |
| 39 |
# linker.flags_before_libraries = [] |
| 40 |
# linker.libraries = %w() |
| 41 |
# linker.flags_after_libraries = [] |
| 42 |
# linker.library_paths = [] |
| 43 |
# linker.option_library = '-l%s' |
| 44 |
# linker.option_library_path = '-L%s' |
| 45 |
# linker.link_options = %Q[%{flags} -o "%{outfile}" %{objs} %{libs}] |
| 46 |
# end |
| 47 |
|
| 48 |
# Archiver settings |
| 49 |
# conf.archiver do |archiver| |
| 50 |
# archiver.command = ENV['AR'] || 'ar' |
| 51 |
# archiver.archive_options = 'rs "%{outfile}" %{objs}' |
| 52 |
# end |
| 53 |
|
| 54 |
# Parser generator settings |
| 55 |
# conf.yacc do |yacc| |
| 56 |
# yacc.command = ENV['YACC'] || 'bison' |
| 57 |
# yacc.compile_options = %q[-o "%{outfile}" "%{infile}"] |
| 58 |
# end |
| 59 |
|
| 60 |
# gperf settings |
| 61 |
# conf.gperf do |gperf| |
| 62 |
# gperf.command = 'gperf' |
| 63 |
# gperf.compile_options = %q[-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" "%{infile}" > "%{outfile}"] |
| 64 |
# end |
| 65 |
|
| 66 |
# file extensions |
| 67 |
# conf.exts do |exts| |
| 68 |
# exts.object = '.o' |
| 69 |
# exts.executable = '' # '.exe' if Windows |
| 70 |
# exts.library = '.a' |
| 71 |
# end |
| 72 |
|
| 73 |
# file separator |
| 74 |
# conf.file_separator = '/' |
| 75 |
|
| 76 |
# Turn on `enable_debug` for better debugging |
| 77 |
# conf.enable_debug |
| 78 |
conf.enable_bintest |
| 79 |
conf.enable_test |
| 80 |
end |