diff options
| author | realtradam <[email protected]> | 2022-04-09 03:53:22 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2022-04-09 03:53:22 -0400 |
| commit | 714e973bc0b107fc100af9981e5f730d977c4dbb (patch) | |
| tree | c5b1ab741fa4e6c29286f7a3cd8c68c4d0c2d6e5 /core | |
| parent | 8364eeb691a2f9994d35a5a7cf0b7f8f4fb97206 (diff) | |
| download | FelFlameEngine-714e973bc0b107fc100af9981e5f730d977c4dbb.tar.gz FelFlameEngine-714e973bc0b107fc100af9981e5f730d977c4dbb.zip | |
ease testing gems
Diffstat (limited to 'core')
| -rw-r--r-- | core/mruby_build.rb | 6 | ||||
| -rw-r--r-- | core/mruby_build_host.rb | 94 | ||||
| -rw-r--r-- | core/mruby_build_host.rb.lock | 4 |
3 files changed, 101 insertions, 3 deletions
diff --git a/core/mruby_build.rb b/core/mruby_build.rb index a0d0a56..f99d145 100644 --- a/core/mruby_build.rb +++ b/core/mruby_build.rb @@ -1,7 +1,9 @@ +require_relative 'mruby_build_host.rb' configure_project_root = File.expand_path('../..') configure_mrbgem_dir = File.expand_path("#{configure_project_root}/mrbgems") +=begin MRuby::Build.new do |conf| # load specific toolchain settings conf.toolchain :clang @@ -65,7 +67,6 @@ MRuby::Build.new do |conf| # -- YOUR GEMS -- # gems added into the mrbgems directory - puts "HERE: #{File.expand_path(configure_mrbgem_dir)}" Dir.each_child(configure_mrbgem_dir) do |mrb_gem| conf.gem "#{configure_mrbgem_dir}/#{mrb_gem}" end @@ -93,7 +94,7 @@ MRuby::Build.new do |conf| conf.enable_bintest conf.enable_test end - +=end =begin MRuby::CrossBuild.new("tux") do |conf| conf.toolchain :clang @@ -214,7 +215,6 @@ MRuby::CrossBuild.new("win") do |conf| # -- YOUR GEMS -- # gems added into the mrbgems directory - puts "HERE: #{File.expand_path(configure_mrbgem_dir)}" Dir.each_child(configure_mrbgem_dir) do |mrb_gem| conf.gem "#{configure_mrbgem_dir}/#{mrb_gem}" end diff --git a/core/mruby_build_host.rb b/core/mruby_build_host.rb new file mode 100644 index 0000000..7e0b77c --- /dev/null +++ b/core/mruby_build_host.rb @@ -0,0 +1,94 @@ +configure_project_root = File.expand_path('../..') +configure_mrbgem_dir = File.expand_path("#{configure_project_root}/mrbgems") + + +MRuby::Build.new do |conf| + # load specific toolchain settings + conf.toolchain :clang + #conf.toolchain + + disable_lock # disables being stuck on a single commit + + # -- CORE GEMS -- + conf.gembox "stdlib" + conf.gembox "stdlib-ext" + conf.gembox "math" + conf.gembox "metaprog" + #conf.gembox "stdlib-io" + + # Use standard IO/File class + conf.gem :core => "mruby-io" + + # TODO: this gem doesnt current work + # with windows export + #conf.gem :core => "mruby-socket" + + # Use standard print/puts/p + conf.gem :core => "mruby-print" + + # Generate mrbc command + conf.gem :core => "mruby-bin-mrbc" + + # Generate mirb command + conf.gem :core => "mruby-bin-mirb" + + # Generate mruby command + conf.gem :core => "mruby-bin-mruby" + + # Generate mruby-strip command + conf.gem :core => "mruby-bin-strip" + + # Generate mruby-config command + conf.gem :core => "mruby-bin-config" + + # -- POTENTIAL GEMS -- + # gems that we may want incorperated + + # Simple Http + #conf.gem :git => 'https://github.com/matsumotory/mruby-simplehttp' + + # Memory Profiler + #conf.gem :git => 'https://github.com/iij/mruby-memprof' + + # Testing Framework + #conf.gem :git => 'https://github.com/iij/mruby-mtest' + + # Regex + #conf.gem :git => 'https://github.com/iij/mruby-regexp-pcre' + + # JSON + #conf.gem :git => 'https://github.com/iij/mruby-iijson' + + # Dir + #conf.gem :git => 'https://github.com/iij/mruby-dir' + + # -- YOUR GEMS -- + # gems added into the mrbgems directory + + Dir.each_child(configure_mrbgem_dir) do |mrb_gem| + conf.gem "#{configure_mrbgem_dir}/#{mrb_gem}" + end + + # --- + + # C compiler settings + conf.cc do |cc| + cc.command = 'zig cc -target native -O2' + cc.include_paths << ["#{configure_project_root}/vendor/tux/include"] + end + + # Linker settings + conf.linker do |linker| + #linker.command = ENV['LD'] || 'gcc' + linker.command = 'zig c++ -target native -O2' + linker.flags << ['-lraylib -lGL -lm -lpthread -ldl -lrt -lX11'] + linker.library_paths << ["#{configure_project_root}/vendor/tux/lib"] + end + + conf.cxx.command = 'zig c++ -target native -O2' + + # Turn on `enable_debug` for better debugging + # conf.enable_debug + conf.enable_bintest + conf.enable_test +end diff --git a/core/mruby_build_host.rb.lock b/core/mruby_build_host.rb.lock new file mode 100644 index 0000000..bc3701e --- /dev/null +++ b/core/mruby_build_host.rb.lock @@ -0,0 +1,4 @@ +--- +mruby: + version: 3.0.0 + release_no: 30000 |
