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.