First cut at new build system. Tested on Mac

Here is a first cut at a new build system. Notes:

1. It builds fully static binaries.
2. It has been tested on Mac but not on Linux and probably won't work at all on Win.


Features which need to be added;

1. Better dependency management for include files and the like
2. Incremental builds of libraries
3. Semi-auto support for multiple configurations and platforms.