Moved the bulk of Makefile to toolchain to keep things DRY.