diff --git a/Rakefile.rb b/Rakefile.rb new file mode 100644 index 0000000..06926ab --- /dev/null +++ b/Rakefile.rb @@ -0,0 +1,24 @@ +require "rscons" + +task :default do + Rscons::Environment.new do |env| + env.build_root = "build" + + lexer_source = "#{env.build_root}/lex.yy.cc" + env.CFile(lexer_source, "parser/parser.ll") + + parser_source = "#{env.build_root}/parser.tab.cc" + env.CFile(parser_source, "parser/parser.yy") + + sources = Dir["{util,shapes,main,distrib,parser}/**/*.cc"] + sources << lexer_source + sources << parser_source + + env["CXXFLAGS"] += ["-Wall", "-O2"] + env["CPPPATH"] += Dir["{util,shapes,main,distrib,parser}/**/"] + env["CPPPATH"] << "." + env["LIBS"] += ["fl", "pthread", "freeimage"] + + env.Program("fart", sources) + end +end