The simplest Makefile I use is:
That is, I use no Makefile and rely on GNU Make's built-in rules. When I first start a project, or when I have a simple piece of C/C++ code that I want to test in a stand-alone form, I write a simple main() routine in, for example, a file called prog.cpp and run:
$ make prog
g++ prog.cpp -o prog
$