basic-c-compile aims to augment your C programming workflow.  It
provides commands to create a Makefile, compile file(s) and run
file(s).  The specifics of many of these commands can be changed
using the customisable variables for this package.  They are all
described in README.org.

Basic setup:
Add (require 'basic-c-compile) to you init file.