source: EcnlProtoTool/trunk/mruby-1.2.0/tasks/toolchains/visualcpp.rake@ 270

Last change on this file since 270 was 270, checked in by coas-nagasima, 7 years ago

mruby版ECNLプロトタイピング・ツールを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-ruby
File size: 1.8 KB
Line 
1MRuby::Toolchain.new(:visualcpp) do |conf|
2 [conf.cc].each do |cc|
3 cc.command = ENV['CC'] || 'cl.exe'
4 # C4013: implicit function declaration
5 cc.flags = [ENV['CFLAGS'] || %w(/c /nologo /W3 /we4013 /Zi /MD /O2 /D_CRT_SECURE_NO_WARNINGS)]
6 cc.defines = %w(DISABLE_GEMS MRB_STACK_EXTEND_DOUBLING)
7 cc.option_include_path = '/I%s'
8 cc.option_define = '/D%s'
9 cc.compile_options = "%{flags} /Fo%{outfile} %{infile}"
10 end
11
12 [conf.cxx].each do |cxx|
13 cxx.command = ENV['CXX'] || 'cl.exe'
14 cxx.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || %w(/c /nologo /W3 /Zi /MD /O2 /EHs /D_CRT_SECURE_NO_WARNINGS)]
15 cxx.defines = %w(DISABLE_GEMS MRB_STACK_EXTEND_DOUBLING)
16 cxx.option_include_path = '/I%s'
17 cxx.option_define = '/D%s'
18 cxx.compile_options = "%{flags} /Fo%{outfile} %{infile}"
19 end
20
21 conf.linker do |linker|
22 linker.command = ENV['LD'] || 'link.exe'
23 linker.flags = [ENV['LDFLAGS'] || %w(/NOLOGO /DEBUG /INCREMENTAL:NO /OPT:ICF /OPT:REF)]
24 linker.libraries = %w()
25 linker.library_paths = %w()
26 linker.option_library = '%s.lib'
27 linker.option_library_path = '/LIBPATH:%s'
28 linker.link_options = "%{flags} /OUT:%{outfile} %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}"
29 end
30
31 conf.archiver do |archiver|
32 archiver.command = ENV['AR'] || 'lib.exe'
33 archiver.archive_options = '/nologo /OUT:%{outfile} %{objs}'
34 end
35
36 conf.yacc do |yacc|
37 yacc.command = ENV['YACC'] || 'bison.exe'
38 yacc.compile_options = '-o %{outfile} %{infile}'
39 end
40
41 conf.gperf do |gperf|
42 gperf.command = 'gperf.exe'
43 gperf.compile_options = '-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" %{infile} > %{outfile}'
44 end
45
46 conf.exts do |exts|
47 exts.object = '.obj'
48 exts.executable = '.exe'
49 exts.library = '.lib'
50 end
51
52 conf.file_separator = '\\'
53end
Note: See TracBrowser for help on using the repository browser.