Changed build system to have sub-libraries build separately.