add a Rakefile to build with rscons
This commit is contained in:
parent
cdfcbc7bb7
commit
df03a38be0
24
Rakefile.rb
Normal file
24
Rakefile.rb
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user