How can I run C or C++ in Unix console or a Mac terminal?
(I know it, forgets it and relearn it again. Time to write it down.)
If it is a simple single source program:
where the source file is foo.c or foo.cpp, etc.
You dont even need a makefile. Make has enough built-in rules to build your source file into an executable of the same name, minus extension.