As a general rule, I have a little scratch pad Makefile that I use as a template for all my C++ apps. I thought I would post my basic template when I am prototyping some code, or just running a little test example.
rm -fr build/*
$(CXX) $(FLAGS) src/test.cpp -o build/test.bin -Isrc/
.PHONY: all clean test