2015-11-25 11:07:06 -05:00
|
|
|
require 'mkmf'
|
|
|
|
|
2015-11-27 11:42:53 -05:00
|
|
|
houdini_dir = File.expand_path('./houdini', __dir__)
|
|
|
|
$INCFLAGS << " -I#{houdini_dir}"
|
2015-11-27 14:50:49 -05:00
|
|
|
$CFLAGS << ' -Wall -Wextra'
|
2015-11-27 11:42:53 -05:00
|
|
|
|
|
|
|
$srcs = %w[hamlit.c]
|
|
|
|
Dir[File.join(houdini_dir, '*.c')].each do |path|
|
|
|
|
src = File.basename(path)
|
2016-02-06 01:33:21 -05:00
|
|
|
begin
|
|
|
|
FileUtils.ln_s(path, src, force: true)
|
|
|
|
rescue NotImplementedError
|
|
|
|
# For the error on windows:
|
|
|
|
# symlink() function is unimplemented on this machine (NotImplementedError)
|
|
|
|
FileUtils.cp(path, src)
|
|
|
|
end
|
2015-11-27 11:42:53 -05:00
|
|
|
$srcs << src
|
|
|
|
end
|
|
|
|
|
2015-11-25 11:07:06 -05:00
|
|
|
create_makefile('hamlit/hamlit')
|