Sha256: 70ec0e3a157ad1a5b89a016b279b45ca1d5a6e69bad090f802c4cf10813c0b60

Contents?: true

Size: 1.3 KB

Versions: 1

Compression:

Stored size: 1.3 KB

Contents

MRuby::Build.new do |conf|

  conf.build_dir = "<%= build_directory %>/host"
  
  toolchain :gcc
  
  enable_debug
  
  conf.gembox 'default'
  
end


MRuby::Toolchain.new('emscripten') do |conf|

  toolchain :clang
  
  conf.cc.command = "emcc"
  conf.cxx.command = "emcc"
  conf.linker.command = "emcc"
  conf.archiver.command = "emar"

end


MRuby::CrossBuild.new('app') do |conf|

  conf.build_dir = "<%= build_directory %>/emscripten"
  
  toolchain :emscripten
  
  conf.compilers.each do |c|
    #c.defines += %w(MRB_GC_FIXED_ARENA)
    c.flags << "-Wall"
    c.flags << "-Wno-warn-absolute-paths"
    c.flags << "--bind"
    c.flags << "<%= optimization_argument %>"
    c.flags << "<%= closure_argument %>"
    c.flags << "<%= debug_argument %>"
  end
  
  conf.gembox('default')
  conf.gem :github => 'robfors/esruby-esruby'
  <% for gem in gems %>
  conf.gem(<%= gem.inspect %>)
  <% end %>
  
end


module MRuby
  module Gem
    class List
      
      old_check = instance_method(:check)
      define_method(:check) do |build|
        return_value = old_check.bind(self).call(build)
        if build.name == 'app'
          gem_paths = map { |gem| gem.dir }
          require 'json'
          File.write("<%= gem_paths_file %>", gem_paths.to_json)
        end
        return return_value
      end
      
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
esruby-0.0.11 resources/build_config.eruby