Let me just say for the record here that SCons is a hellish nightmare to work with. Things that should be simple like pulling in sources from minisphere to use in Cell cause no end of grief under SCons because it doesn't make a clear distinction between source and object files and treats one as a stand-in for the other. That is, if you use the same source file in two programs, it compiles it once and tries to link the same object file into both programs. And then if you try to use different compiler options between the two, SCons throws up its hands and gives up ("Two environments with different options for same target").
It doesn't help either that the SCons documentation is absolutely atrocious. It took me forever just to find (on an obscure Stack Overflow question) that the solution was not to pass the .c file to Program() directly, but use the Object() method like so:
cell_sources = [
Object("duktape", "../msphere/duktape.c"),
Object("vector", "../msphere/vector.c"),
"engine.c",
"main.c" # <-- what this really means, to SCons, is "the object file created from main.c"
]
Ugh.
edit: GAAAAAAAAAAAAAAAHHHHHHHHHHHH *DBZ powerup* *goes Super Saiyan*
$ scons cell
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: obj/cell
scons: *** [obj/cell/engine.o] Implicit dependency `obj/cell/duktape.h' not found, needed by target `obj/cell/engine.o'.
scons: building terminated because of errors.
That didn't work either. At all. Seriously, whoever wrote this piece of software should be drug out into the street and shot.
edit 2: So it started building properly again for no apparent reason. Well, I'm not going to complain, but it doesn't do much for my faith in this build system. I wonder if CMake is any better. In any case, SCons provides a good baseline of what not to do in Cell.