diff --git a/ext/hamlit/extconf.rb b/ext/hamlit/extconf.rb index 74153f9a..b777015c 100644 --- a/ext/hamlit/extconf.rb +++ b/ext/hamlit/extconf.rb @@ -1,4 +1,14 @@ require 'mkmf' +houdini_dir = File.expand_path('./houdini', __dir__) +$INCFLAGS << " -I#{houdini_dir}" $CFLAGS << ' -Wall -Wextra' + +$srcs = %w[hamlit.c] +Dir[File.join(houdini_dir, '*.c')].each do |path| + src = File.basename(path) + FileUtils.ln_s(File.join(houdini_dir, src), src, force: true) + $srcs << src +end + create_makefile('hamlit/hamlit')