Since AGP is binary portable, I don't have to deal with multiple target platforms anymore.
However I do have to port other peoples code a lot, so I come across several different approaches.
The three main ones I come across are...
- Linux style configure (run a tool)
- Header based (define a platform code and use #if defined(__TARGET_PLATFORM__)
- Manual (do it all by hand)
All have their problems
The tool based solution requires all the source code to be in the correct path, often this isn't the case when it gets to me
The header based system is a pain in the proverbial as you often end up having to guess which files to include at first and if you miss an instance you may get strange errors that are hard to track down.
The manual system is the worst. The only way to port it is to stick everything in and deal with each compiler error one at a time.
Has anyone come across a better system?