I used to detest creating multiple makefiles for all my programming projects. Sometimes I'd end up with one for Win16, one for Win32 and another for some esoteric Unix box. All command line programs, all supposedly written in ANSI C, but all using different compilers and language variants.
One solution is to use Conditional Compilation. This is slightly different from conditional execution - which amounts to an if statement - in that the decision process takes place during the evalution to the pre processor directives.
If this is Greek to you, then you definately need to read Conditional Compilation in C as it will help you to understand the concept, as well as it's application under the C language.
Many languages also share the concept, with varying degrees of efficacy and success. If you want to share your experiences and best practices, then drop me a line, and we'll start a discussion!