Update Rsconscript and add main.d

This commit is contained in:
Josh Holtrop 2023-09-30 21:05:12 -04:00
parent c8658e5e00
commit 4c57df0774
3 changed files with 9 additions and 15 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
fart
/fart
*.bmp
*.png
/.rscons*

View File

@ -1,21 +1,11 @@
configure do
check_cxx_compiler
check_program "flex"
check_program "bison"
check_lib ":libfl.a"
check_lib "pthread"
check_lib "freeimage"
check_d_compiler
end
env do |env|
env["CCFLAGS"] += %w[-Wall -O2]
env["CPPPATH"] += glob("src/**")
env["DFLAGS"] += %w[-Werror -O2]
env["D_IMPORT_PATH"] += %w[src]
env.CFile("^/parser/lexer.cc", "src/parser/parser.ll")
env.CFile("^/parser/parser.cc", "src/parser/parser.yy")
env["CPPPATH"] += ["#{env.build_root}/parser"]
sources = glob("src/**/*.cc")
sources += ["^/parser/lexer.cc", "^/parser/parser.cc"]
sources = glob("src/**/*.d")
env.Program("fart", sources)
end

4
src/fart/main.d Normal file
View File

@ -0,0 +1,4 @@
int main(string[] args)
{
return 0;
}