blob: bae9166d3dec0de0c5530c11062319e6e6b5f6b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
MRuby::CrossBuild.new("web") do |conf|
@project_root = '../'
conf.toolchain :clang
# Use mrbgems
disable_lock # disables being stuck on a single commit
conf.gem :git => '[email protected]:realtradam/sample-mruby-gem.git', :branch => 'test', :options => '-v'
# include the GEM box
conf.gembox 'felflame'
conf.cc do |cc|
cc.command = 'emcc'
cc.include_paths = ["#{root}/include", "#{@project_root}/vendor/include/raylib"]
cc.flags = ['-Wall', '-std=c99', '-D_DEFAULT_SOURCE', '-Wno-missing-braces', '-Os', '-DPLATFORM_WEB']
end
conf.linker do |linker|
linker.command = 'emcc'
linker.flags = ["-lraylib -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces -Os -s USE_GLFW=3 -s TOTAL_MEMORY=67108864 -s FORCE_FILESYSTEM=1 --shell-file #{@project_root}/raylib/src/shell.html"]
linker.library_paths = ['.', "#{@project_root}/raylib/src", "#{@project_root}/vendor/lib/web/raylib"]
end
conf.archiver do |archiver|
archiver.command = 'emar'
end
conf.cxx do |cxx|
cxx.command = "em++"
end
end
|