Fix Makefile so that make(1) can actually understand it.

There is a nasty hack here to test for mac and -std=libc++.
There is one bug here: .depend does not depend on the .cpp files.
This entire file should be converted to cmake.

Also, I am tired, and the .depend generation is buggy (make must be run twice for it be correct).  I will try to convert this to autojunk or cmake at some point