require 'mkmf' $objs = [''] $srcs = [''] TARGET = 'libzigrb_ackermann' create_makefile TARGET File.open('Makefile', 'a') do |f| f.puts <<~MFILE clean: clean-zig clean-zig: \t-$(Q)$(RM) -rf zig-cache zig-out #{TARGET}.so: Makefile build.zig src/main.zig \tenv -u DESTDIR RUBYLIBDIR=$(rubylibdir) RUBYHDRDIR=$(rubyhdrdir) RUBYARCHHDRDIR=$(rubyarchhdrdir) zig build -Doptimize=ReleaseSafe test install \tcp -v zig-out/lib/#{TARGET}.so . MFILE end