Considering that some game platforms are under NDA (mostly, the good old console trinity) and that publishing code using their SDK is not allowed, how do game engine usually manage keeping plugins for different platforms separated?
For example if I make a plugin for PS3 export, that will be distributed only to people that do have the PS3 license.
Platform code can happen in many places of the code, and keeping it entirely separated from the core engine seems really hard/impossible to manage to me.
Edit for example:
If I make an open source game engine that users are allowed to see the code, it means that the core engine is entirely viewable. Using preprocessors or anything like that would allow people to view code subjected to NDA, which doesn’t work.
So, the platform-specific code needs to be totally separate from the core engine, but the core engine needs to be able to use it. The most obvious solution is to duplicate implementations of system things for every platform, and when using a plugin you select which implementation you use, but it seems very hard to maintain.
Also, in my case preprocessors directives are not available. I am looking for a more general way of architecting the codebase to deal with these matters