2016-11-28 14:48:06 +00:00
|
|
|
MRuby::Build.new do |conf|
|
2016-11-28 15:15:10 +00:00
|
|
|
toolchain :gcc
|
2016-11-28 14:48:06 +00:00
|
|
|
|
2016-11-28 15:15:10 +00:00
|
|
|
conf.gem File.expand_path(File.dirname(__FILE__))
|
2016-11-28 15:22:32 +00:00
|
|
|
|
2016-11-28 15:15:10 +00:00
|
|
|
conf.instance_eval do
|
|
|
|
# Allow showing backtrace.
|
|
|
|
@mrbc.compile_options += ' -g'
|
2016-11-28 14:48:06 +00:00
|
|
|
end
|
2016-11-28 15:22:32 +00:00
|
|
|
|
2016-11-28 16:49:07 +00:00
|
|
|
# Never support Visual C++.
|
|
|
|
# https://github.com/mruby/mruby/blob/1.2.0/CONTRIBUTING.md#comply-with-c99-isoiec-98991999
|
|
|
|
conf.cc.flags.first.reject! do |flag|
|
|
|
|
flag == '-Wdeclaration-after-statement'
|
|
|
|
end
|
|
|
|
|
2016-11-28 15:22:32 +00:00
|
|
|
conf.linker do |linker|
|
|
|
|
linker.libraries += %w(X11)
|
|
|
|
end
|
2016-11-28 14:48:06 +00:00
|
|
|
end
|