From a817d1c13e9b352da8584047434633ac35b91a9f Mon Sep 17 00:00:00 2001 From: realtradam Date: Sun, 27 Feb 2022 21:11:09 -0500 Subject: cleanup of build process --- build_config/felflame_web.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 build_config/felflame_web.rb (limited to 'build_config/felflame_web.rb') diff --git a/build_config/felflame_web.rb b/build_config/felflame_web.rb new file mode 100644 index 000000000..bae9166d3 --- /dev/null +++ b/build_config/felflame_web.rb @@ -0,0 +1,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 => 'git@github.com: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 -- cgit v1.2.3