configure do check_cxx_compiler check_program "flex" check_program "bison" check_lib ":libfl.a" check_lib "pthread" check_lib "freeimage" end build do Environment.new do |env| subdirs = %w[util shapes main distrib parser] env["CCFLAGS"] += %w[-Wall -O2] env["CPPPATH"] += %w[.] + subdirs + ["#{env.build_root}/parser"] sources = glob("{#{subdirs.join(",")}}/*.cc") sources += ["^/parser/lexer.cc", "^/parser/parser.cc"] env.CFile("^/parser/lexer.cc", "parser/parser.ll") env.CFile("^/parser/parser.cc", "parser/parser.yy") env.Program("fart", sources) end end