Instead of compiling either the mock or the non-mock part of the file based on a compiler flag, split the mock part off to its own file.