script to compile C code

Hi All,

I would like to get a sample script or Makefile that compiles C code and converts that to hex file. We need this for simulation.

I have a makefile already that accepts assembly code and then converts to hex but I would like to get a Makefile that accepts C code.

Thanks a lot