# frozen_string_literal: true require "mkmf" require "fileutils" target = if RbConfig::CONFIG["host_os"].include?("darwin") "x86_64-apple-darwin" else "x86_64-unknown-linux-gnu" end library_path = File.join(__dir__, target) Dir.glob(File.join(library_path, "*.a")).each { |path| FileUtils.cp(path, __dir__) } have_library("lit_parser") have_library("lit_error_formatter") create_makefile "lit/lit_parser"