You just don't depend on weird libraries that mess up your preprocessor state. Then you make sure that even your static (file local) variables have unique names. And then you concatenate all the header and source files.
It shouldn't be very hard, but most projects fail already at the dependency stage.
That's true - but in order for it be able to be reduced to a single C file, a lot of thought had to go into the process.