[281] | 1 | MRuby::Toolchain.new(:ccrx) do |conf|
|
---|
| 2 | [conf.cc, conf.cxx].each do |cc|
|
---|
| 3 | cc.command = ENV['CC'] || 'ccrx.exe'
|
---|
| 4 | cc.flags = [ENV['CFLAGS'] || %w(-debug -fpu -nologo)]
|
---|
| 5 | cc.include_paths = ["#{MRUBY_ROOT}\\include"]
|
---|
| 6 | cc.defines = %w(DISABLE_GEMS)
|
---|
| 7 | cc.option_include_path = '-include=%s'
|
---|
| 8 | cc.option_define = '-define=%s'
|
---|
| 9 | cc.compile_options = "%{infile} -isa=rxv1 -lang=c99 -output=obj=%{outfile} %{flags}"
|
---|
| 10 | end
|
---|
| 11 |
|
---|
| 12 | conf.linker do |linker|
|
---|
| 13 | linker.command = ENV['LD'] || 'rlink.exe'
|
---|
| 14 | linker.flags = [ENV['LDFLAGS']]
|
---|
| 15 | linker.flags_before_libraries = ''
|
---|
| 16 | linker.libraries = %w(m c r)
|
---|
| 17 | linker.option_library = '-library=%s'
|
---|
| 18 | linker.option_library_path = ''
|
---|
| 19 | linker.link_options = "-nologo -form=Absolute %{flags} %{objs} -output=%{outfile} %{flags_before_libraries} %{libs} %{flags_after_libraries}"
|
---|
| 20 | end
|
---|
| 21 |
|
---|
| 22 | conf.archiver do |archiver|
|
---|
| 23 | archiver.command = ENV['AR'] || 'rlink.exe'
|
---|
| 24 | archiver.archive_options = '-nologo -form=library -noprelink -nooptimize -output=%{outfile} %{objs}'
|
---|
| 25 | end
|
---|
| 26 |
|
---|
| 27 | conf.yacc do |yacc|
|
---|
| 28 | yacc.command = ENV['YACC'] || 'bison.exe'
|
---|
| 29 | yacc.compile_options = '-o %{outfile} %{infile}'
|
---|
| 30 | end
|
---|
| 31 |
|
---|
| 32 | conf.gperf do |gperf|
|
---|
| 33 | gperf.command = 'gperf.exe'
|
---|
| 34 | gperf.compile_options = '-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" %{infile} > %{outfile}'
|
---|
| 35 | end
|
---|
| 36 |
|
---|
| 37 | conf.exts do |exts|
|
---|
| 38 | exts.object = '.obj'
|
---|
| 39 | exts.executable = '.abs'
|
---|
| 40 | exts.library = '.lib'
|
---|
| 41 | end
|
---|
| 42 |
|
---|
| 43 | conf.file_separator = '\\'
|
---|
| 44 | end
|
---|