Well, I'm biased too, but I'd rather have all the compile time optional stuff done more like I did the lua libs and games.
However, with a large number of options, we should probably generate a header file rather than putting all the defines in the command line. We should also move all the options to their own file, i.e. buildconf.inc
This will make things clearer, easier to maintain, easier for whim to parse, and make generating the header simpler too.
I would also say we don't need to get too carried away with compile time options (the level of detail for the boot logo strikes me as more trouble than it's worth). There's a valid argument to make something optional if:
- It is a broken/dangerous/experimental feature.
or
- It takes up a lot of memory and either doesn't add functionality, or is only needed by a few users.
Stuff that doesn't meet these criteria should just be runtime conf options IMO, with a warning if needed. You should also consider the cost of littering the code with even more #ifdefs, and having dozens of different possible variants of a given version.
There are better long term solutions to modularity, so spending a lot of time making every feature optional doesn't seem like a good investment. Just go for the big ones (ubasic/lua are probably the major ones left)
The games are already optional BTW, just comment out
OPT_GAME_REVERSI=1
OPT_GAME_SOKOBAN=1
in makefile.inc
It leaves the (empty) games menu behind, but that's a minor detail.
If you are going to make components like the text file reader optional, you should probably also avoid build/linking the .o files.