Restructure the build files.
Add clean targets.
Add support for building static libraries and external dependencies.