ruby/gc/mmtk/extconf.rb
Nobuyoshi Nakada 1758137ead Simplify gc/mmtk/extconf.rb
- Split static recipes to depend file.
- Modify makefile configurations in the block to `create_makefile`.
- Expand rust sources in extconf.rb instead of GNU make extension.

TODO: pass `CARGO_TARGET_DIR` without shell syntax.
2025-01-14 10:21:57 -05:00

20 lines
429 B
Ruby

# frozen_string_literal: true
require_relative "../extconf_base"
# Statically link `libmmtk_ruby.a`
$LIBS << " $(MMTK_BUILD)/$(LIBMMTK_RUBY)"
rustsrcs = Dir.glob("src/*.rs", base: __dir__).map {|s| "$(srcdir)/#{s}"}
create_gc_makefile("mmtk") do |makefile|
[
*makefile,
<<~MAKEFILE,
MMTK_BUILD = debug
LIBMMTK_RUBY = libmmtk_ruby.#$LIBEXT
RUSTSRCS = #{rustsrcs.join(" \\\n\t ")}
MAKEFILE
]
end