I am looking for a tool which can generate makefile for Sun CC compiler from an existing makefile , which is actually written for GCC compiler.Is there any tool which does the same? I tried by setting CC on the command line.sometimes it worked. But there are a lot of compiler specific flags , hardcoded in the Makefile. How this can be handled?I could find this answer. https://stackoverflow.com/questions/2969222/make-gnu-make-use-a-different-compiler. But how this works if the makefile has compiler dependent hard coded flags?