Are you compiling with mode=release? The debug build takes a ton of memory (it’s a known issue we’re working on).
If you know which executeables you need, you might be able to get away with slicing away large chunks of code. There is unfortunately a lot of lateral dependency in the protocols library, which makes it harder.
You can “turn off” chunks of compiling by commenting out lines in the file apps.src.settings and protocols.src.settings. It won’t hurt to just try turning things off and on. Don’t touch the moves or jobdist (or jd2) directories, but many of the other ones are fair game. For example if you want to do docking, you can probably turn off the rna, dna, and abinitio folders. If you let me know which executeables you need I can attempt to tell you what you can safely excise.
If you do decide to try this, if you turn something off you shouldn’t, it will manifest as linker errors where certain functions cannot be found. That tells you that something is no longer compiling that’s necessary for some reason.